HN user

matthewsnyder

163 karma
Posts6
Comments8
View on HN

`git u $branch` checks out $branch, updates it against whatever remote it's synced to, and then attempts to rebase the current branch against it. `git ud $branch` does the same think, except it also performs the merge of the current branch onto $branch.

`git prep` Simply greps the commit for use of Python/JS print debugging statements, things that shouldn't make it into the codebase.

The advantage for me is entirely in terms of separating notes into separate files; something that Deft does and org-velocity isn't really built for. I was planning on implementing something like that for org-velocity, but with the arrival of Deft I no longer have to.

Thank you so much for this. This immediately replaced my usage of org-velocity. I used this function to convert my (10,000 line) velocity.org file into separate files for Deft:

  (defun generate-files-from-velocity (buffername)
    (save-excursion
      (switch-to-buffer buffername)
      (org-map-entries (lambda ()
                         (progn
                           (org-mark-subtree)
                           (if (and (= 1 (org-outline-level)) (org-export-get-title-from-subtree))
                               (let* ((title (downcase (org-export-get-title-from-subtree)))
                                      (filename (replace-regexp-in-string " " "-" (concat title ".org"))))
                                 (append-to-file (region-beginning) (region-end) (concat "~/Documents/Org/Notes/" filename)))))))))
  
  (generate-files-from-velocity "velocity.org")