Live data from Hacker News

Deft -- easy note taking for Emacs

jblevins.org

11–20 of 41 posts

Re: Deft -- easy note taking for Emacs

#13
post #10

It's when I see gems like these that I feel like spending time to learn emacs. I've tried a couple of times.. but it is so damn hard. I feel like vim keybindings are burnt in my memory/fingers.. and it makes it so unproductive to relearn something totally different. Any vim power user successfully switched to Emacs? If so, did you switch back missing Vim or you're still using emacs and couldn't be happier? (I'm still…

Exact same situation here. :)

Re: Deft -- easy note taking for Emacs

#14
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")

Re: Deft -- easy note taking for Emacs

#15
post #10

It's when I see gems like these that I feel like spending time to learn emacs. I've tried a couple of times.. but it is so damn hard. I feel like vim keybindings are burnt in my memory/fingers.. and it makes it so unproductive to relearn something totally different. Any vim power user successfully switched to Emacs? If so, did you switch back missing Vim or you're still using emacs and couldn't be happier? (I'm still…

I'm a vim user who started to really get into Lisp (and now ML for school). Emacs (especially with SLIME) is really the Right Thing for Lisp, so I started using it. I've definitely gotten to the point where `C-a C-k` is as well burned into my fingers as `dd` is...it's just that

a) `dd` seems like a more natural keybinding--both because I'd rather double-tap a home row button than involve three fingers and two hands, and because, if you do stop to think about it, `dd` makes sense--`d` means delete, and a double-tap usually makes something apply to a whole line. (Of course, `dd` / `C-a C-k` is just an example--this applies in general.)

b) There's more of a zen to vim. It's been discussed before, but it's worth repeating--vim commands form a language with nouns and verbs. `w` means word and `(` means sentence. Now you know two commands. `d` means delete, `y` means yank, and `c` means change. Now you know 8 commands--`w`, `dw`, `yw`, `cw`, `(`, `d(`, etc. And adding a few more "nouns" brings you up to several dozen with minimal effort. Emacs has no direct equivalent * .

So I like emacs for the ecosystem, I like it for the freakish integration it can achieve between a REPL and a source file...as they say, it's a great operating system--it just needs a good editor.

* - This is not quite true--emacs does try to do sane things with the use of `C` and `M`. `C-f` means "forward one character", and `M-f` means "forward one word"--a "bigger" form of the same thing. In the same way, `C-d` deletes a character and `M-d` deletes a word. But now you want to delete a line? Time to learn something completely new.

Edited to make a lame effort to fix my formatting problems...thus the asterisks surrounded by a sea of whitespace.

Re: Deft -- easy note taking for Emacs

#16

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 (downcas…

I haven't used either of these, but they seem to fill a useful niche. What do you find are the pros and cons of deft vs. org-velocity?

Re: Deft -- easy note taking for Emacs

#17
post #15
post #10

It's when I see gems like these that I feel like spending time to learn emacs. I've tried a couple of times.. but it is so damn hard. I feel like vim keybindings are burnt in my memory/fingers.. and it makes it so unproductive to relearn something totally different. Any vim power user successfully switched to Emacs? If so, did you switch back missing Vim or you're still using emacs and couldn't be happier? (I'm still…

I'm a vim user who started to really get into Lisp (and now ML for school). Emacs (especially with SLIME) is really the Right Thing for Lisp, so I started using it. I've definitely gotten to the point where `C-a C-k` is as well burned into my fingers as `dd` is...it's just that a) `dd` seems like a more natural keybinding--both because I'd rather double-tap a home row button than involve three fingers and two hands,…

I had the exact same experience, and agree with everything you said.

I'll note that I tried vimpulse for a while. Then I stopped. I wish I could be more helpful, but that's all I remember. I don't even know if stopping was an actual decision that I made, or if I just didn't start again after reinstalling everything.

(vimpulse-mode is an attempt to bring vim keybindings to emacs.)

Re: Deft -- easy note taking for Emacs

#18
post #10

It's when I see gems like these that I feel like spending time to learn emacs. I've tried a couple of times.. but it is so damn hard. I feel like vim keybindings are burnt in my memory/fingers.. and it makes it so unproductive to relearn something totally different. Any vim power user successfully switched to Emacs? If so, did you switch back missing Vim or you're still using emacs and couldn't be happier? (I'm still…

I've had the same feeling. When I learned about org mode, I actually spent a week using emacs exclusively trying to get used to it and failed.

But whenever I feel this way I wonder why these sorts of applications don't exist for vim. I don't know many people who would argue that vimscript is as good a language as lisp is, but isn't it complete enough to do stuff like this? Or you could use python to do it.

Is it a cultural thing? Is there some infrastructure support in emacs that makes applications much easier to write?

Re: Deft -- easy note taking for Emacs

#19
post #16

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 (downcas…

I haven't used either of these, but they seem to fill a useful niche. What do you find are the pros and cons of deft vs. org-velocity?

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.

Re: Deft -- easy note taking for Emacs

#20
post #17
post #15

Earlier quoted context omitted.

I'm a vim user who started to really get into Lisp (and now ML for school). Emacs (especially with SLIME) is really the Right Thing for Lisp, so I started using it. I've definitely gotten to the point where `C-a C-k` is as well burned into my fingers as `dd` is...it's just that a) `dd` seems like a more natural keybinding--both because I'd rather double-tap a home row button than involve three fingers and two hands,…

I had the exact same experience, and agree with everything you said. I'll note that I tried vimpulse for a while. Then I stopped. I wish I could be more helpful, but that's all I remember. I don't even know if stopping was an actual decision that I made, or if I just didn't start again after reinstalling everything. (vimpulse-mode is an attempt to bring vim keybindings to emacs.)

I tried using viper, and eventually just got confused and realized that I should just learn emacs...and the best way of learning emacs was to go cold turkey. Some things emulated vi, not vim (delete key would not remove a newline, pressing undo twice resulted in undo->redo (and no net change)). Some things were intercepted by emacs (C-v to try to enter visual block mode). It was just a confusing and unhappy time.
Post reply on HN