Live data from Hacker News

Org Mode Syntax Cheat Sheet (2017)

nhigham.com

61–70 of 73 posts

Re: Org Mode Syntax Cheat Sheet (2017)

#61
post #24

An org mode syntax I use heavily that I rarely see mentioned, including in this cheat sheet, is the obscurely named Radio Targets. Enclose any term or phrase in >>, hit C-c C-c on it, and then any previous or further instance of it in the same buffer will be automatically linked to it from then on. Incredibly useful when you're wroting notes on a long book for example and want to keep track of the instance when a ter…

This is amusing to read because I just started learning org-mode the other day and ran into these immediately while trying to figure out how to link to a bulletpoint in a list later in the document (couldn't figure it out but it ended up being unnecessary in the end, so... progress).

Re: Org Mode Syntax Cheat Sheet (2017)

#62
post #61
post #24

An org mode syntax I use heavily that I rarely see mentioned, including in this cheat sheet, is the obscurely named Radio Targets. Enclose any term or phrase in >>, hit C-c C-c on it, and then any previous or further instance of it in the same buffer will be automatically linked to it from then on. Incredibly useful when you're wroting notes on a long book for example and want to keep track of the instance when a ter…

This is amusing to read because I just started learning org-mode the other day and ran into these immediately while trying to figure out how to link to a bulletpoint in a list later in the document (couldn't figure it out but it ended up being unnecessary in the end, so... progress).

To quickly link to bullet points, just use [[*My bullet point]] (if you omit the *, it may still work but Org also finds non-heading elements like table names with the same text).

Personally, I like to create custom ids for bullet points so that I can easily change the text in the bullet point later without breaking my links:

  * My bullet point
  :PROPERTIES:
  :CUSTOM_ID: foo
  :END:
This is easier with C-c C-x p (org-set-property).

Elsewhere, I can just write [[#foo]] to create a link to that bullet.

Re: Org Mode Syntax Cheat Sheet (2017)

#63
post #58
post #49

Earlier quoted context omitted.

No, that wouldn't work. Radio Targets are intended for the precise repetitions of the same characters. If you surround a regular org link in three angle brackets, eg https://www.bbc.com][bbc] ]>>>, then the Radio link will clobber the web link on the target itself (ie C-c C-o won't take you anywhere), and it will only highlight repetitions of [[ https://www.bbc.com][bbc] ] rather than just bbc. For something similar…

I couldn’t find the command you mentioned “org-insert-radio-target-brackets” in my Emacs and it doesn’t appear to be in the manual[1] either. But of course it is very trivial to write, in case anyone else needs this: (defun org-insert-radio-target-brackets (start end) "Wraps a region with angular brackets to create a radio target." (interactive "r") (save-excursion (goto-char end) (insert ">>>") (goto-char start) (in…

Apologies, you're right - this was a function I'd forgotten that I'd defined myself! The main thing I would add to your definition is to finish with org-update-radio-target-regexp which does what C-c C-c would otherwise do in this context.

Here's how I defined it.

  (defun org-insert-radio-target-brackets (&optional arg)
    "Surround selected text with Org Radio Target angle brackets (eg. >>) and then find and update all radio targets"
    (interactive)
    (progn
      (insert-pair arg ">>")
      (org-update-radio-target-regexp)))

Re: Org Mode Syntax Cheat Sheet (2017)

#64

Earlier quoted context omitted.

I should try roam, it might help with my scattered brain (or maybe it will make it worse :) do you know good videos of people demonstrating their workflow habits ?

I don't know about videos, but here's my general workflow. 1. "Huh, I wonder at what point SSDs of today are comparable to RAM speeds of yester-year?" 2. `C-c n c` (create-node) "ssd_ram_yearly" (title) 3. (a document spawns) "\* SSD vs RAM comparison" (I give it a better unofficial title) 4. I do googling, drag and drop images into the document (org-download is a must have) 5. Satisfied with the document, I decide t…

Gonna try.. it seems well suited to multiple contexts switches

Re: Org Mode Syntax Cheat Sheet (2017)

#65
post #24

An org mode syntax I use heavily that I rarely see mentioned, including in this cheat sheet, is the obscurely named Radio Targets. Enclose any term or phrase in >>, hit C-c C-c on it, and then any previous or further instance of it in the same buffer will be automatically linked to it from then on. Incredibly useful when you're wroting notes on a long book for example and want to keep track of the instance when a ter…

This is amazing. If anyone likes this kind of functionality and doesn’t mind expanding beyond vanilla org mode I recommend org-roam. https://www.orgroam.com/ Roam Research, what it’s based on, might also be of interest.

See also Logseq, which is an open-source privacy-centric offline-first plaintext-based reimplementation of the UI/UX of Roam Research. The main author is an Emacs user, so obviously a lot of Org-mode influence too, and Org is a supported format.

Basically, think Org Roam, just with Electron instead of Emacs.

Re: Org Mode Syntax Cheat Sheet (2017)

#66
post #2

If there is one tool (if I can call it that) that changed my life, it is Org Mode. I was a Vim guy who in a desperate attempt to get digitally organised was forced to give Org Mode a try and got sucked into Emacs. I now live better organised, with far less anxiety and remain unfazed at the multi-tasking demands of the corporate world, all thanks to this major mode.

org is absolutely the gateway drug to the whole Emacs ecosystem. I started using org after 16 years on vim and slowly found myself replacing my entire text/code workflow with it. I stopped using vim at all about 5 years ago and I never looked back.

Re: Org Mode Syntax Cheat Sheet (2017)

#67
post #63
post #58

Earlier quoted context omitted.

I couldn’t find the command you mentioned “org-insert-radio-target-brackets” in my Emacs and it doesn’t appear to be in the manual[1] either. But of course it is very trivial to write, in case anyone else needs this: (defun org-insert-radio-target-brackets (start end) "Wraps a region with angular brackets to create a radio target." (interactive "r") (save-excursion (goto-char end) (insert ">>>") (goto-char start) (in…

Apologies, you're right - this was a function I'd forgotten that I'd defined myself! The main thing I would add to your definition is to finish with org-update-radio-target-regexp which does what C-c C-c would otherwise do in this context. Here's how I defined it. (defun org-insert-radio-target-brackets (&optional arg) "Surround selected text with Org Radio Target angle brackets (eg. >>) and then find and update all…

Good idea to update the radio targets along with the wrapping. Also, I didn’t know `insert-pair` exists, could have saved me some typing. :)

Re: Org Mode Syntax Cheat Sheet (2017)

#68
post #5
post #2

If there is one tool (if I can call it that) that changed my life, it is Org Mode. I was a Vim guy who in a desperate attempt to get digitally organised was forced to give Org Mode a try and got sucked into Emacs. I now live better organised, with far less anxiety and remain unfazed at the multi-tasking demands of the corporate world, all thanks to this major mode.

I keep hearing anecdotes like this and truly want to give Emacs a shot. Do you use it exclusively on a PC? My big blocker is that a significant portion of my time is on a phone rather than a computer these days and I have to think that all the chording with Emacs would get impossibly cumbersome. Anyone here have a good way to leverage Emacs on the go?

It doesn't look like anyone has mentioned Beorg yet? [1]

I'm not an org power user (yet), but I find this iphone app works great to quickly add todos, view outlines, see my agenda, etc whilst I am out. I have it synced via Dropbox so when I get back to my desktop everything is waiting to be properly organized.

[1] https://www.beorgapp.com/

Re: Org Mode Syntax Cheat Sheet (2017)

#69
post #7

Earlier quoted context omitted.

I faced this problem too. I am a Linux user personally, but use Windows at work. I am not a phone person, but do use it regularly. I sync org files to phone (using Syncthing) and use Orgzly to access these from Android. Although it is possible to install Emacs in Android as a terminal tool in Termux or even as a GUI tool, you need to connect a keyboard to do something sensible. Long story short, if your phone is your…

I moved from Orgzly to Orgro. Now updating the files on the phone is exactly like any other note-taking phone application (for better or worse). It's not as good as experience as the Emacs desktop, but no worse than anything else on the phone.

https://orgro.org

This was new to me. Can install with F-Droid or support the author by purchasing from an app store.

Re: Org Mode Syntax Cheat Sheet (2017)

#70
post #5
post #2

If there is one tool (if I can call it that) that changed my life, it is Org Mode. I was a Vim guy who in a desperate attempt to get digitally organised was forced to give Org Mode a try and got sucked into Emacs. I now live better organised, with far less anxiety and remain unfazed at the multi-tasking demands of the corporate world, all thanks to this major mode.

I keep hearing anecdotes like this and truly want to give Emacs a shot. Do you use it exclusively on a PC? My big blocker is that a significant portion of my time is on a phone rather than a computer these days and I have to think that all the chording with Emacs would get impossibly cumbersome. Anyone here have a good way to leverage Emacs on the go?

[flagged]
Post reply on HN