4 ms·
I've been using Emacs for about 3 months now and enjoying it. I'm only just scratching the surface though and not really dived too deep, I find it quite overwhe
by djhworld 6y ago
I've been using Emacs for about 3 months now and enjoying it. I'm only just scratching the surface though and not really dived too deep, I find it quite overwhelming tbh, it feels like the text editing part is really just the tip of the iceberg when it comes to Emacs.
Org-mode is pretty cool and I love the note capturing feature, I've bound Cmd+N to this feature so I can take notes quickly.
One thing that I've not fully figured out yet is how to share notes between my work life and personal life. Sometimes I make notes at work about some cool programming trick or something useful to know, but that stays on my work machine. I don't want work related information to be accessible from my personal machines but I want access to those 'general' notes. Obviously I could set up separate files that sync, but I really like the quick-capture workflow and introducing a "should I save this here or there" type of action would slow that down...
- stinkytaco 6y agoIf you use separate files for each, I would set up a new capture template, one for work that goes to a work file, one for personal that goes to a personal file. Then it's Cmd+N p (personal notes that save to personal.org) and Cmd+N w or something like that. EDIT: The gist of that is here: https://orgmode.org/manual/Capture-templates.html https://orgmode.org/manual/Capture-templates.html
- throwanem 6y agoAnd some elisp to create and bind a keymap for those capture invocations might look like: (let ((capture-map (make-sparse-keymap))) (global-set-key (kbd "C-n" capture-map) (define-key capture-map (kbd "w") #'(lambda nil (interactive) (org-capture nil "work"))) (define-key capture-map (kbd "h") #'(lambda nil (interactive) (org-capture nil "home")))) Doing it as a separate keymap makes it easier to change the keybindings if you later decide to leave C-n at its default binding of next-line - something I actually recommend, since being able to perform cursor movement with keybindings that don't require moving your hands away from the default position has actually proven a lot faster in my experience than using the arrow keys. Navigation via isearch (C-s forward, C-r backward) is faster still, and something I'd really recommend making some time to try out as a newish Emacs user.
- stinkytaco 6y agoThis seems unnecessary when all you need to do is define a key for org capture (I'm assuming here that Cmd-N is mapped to org-capture), which effectively drops you into its own keymap interface. Then the keys for each template are easily defined within template. Or is there something I'm missing here? EDIT: Also, the user's reference to Cmd+N leads me to believe they are still using C-n for navigation but has a Mac, which has an additional key called "Command".
- throwanem 6y agoAh, that's fair. Generally a buffer on a relevant Org file is never not visible to me, so I don't really need org-capture and went with a keymap based on the direct-to-template invocation described in the linked documentation. I also use a Mac for work, but tend to forget about all the complex gymkhana I go through with keyboard prefs and Karabiner-Elements to get its keyboard to behave like those of the Linux and Windows machines I use. Since that includes remapping Caps to Command outside Emacs, and Command to Control inside it, that all probably makes my keybinding advice a little useless, or at least worth more consideration of how things would be in a closer-to-stock configuration.