Hacker News new | ask | show | jobs
by lelanthran 1663 days ago
> I hear this a lot, can you give some concrete examples?

You can get a good example of what is possible by using org mode for a little while.

For example, keystroke <TAB> on an issue marked as TODO moves it to the next state IN-PROGRESS, <TAB> again moves it to the next state DONE and changes the color from red to green, and if you continue <TAB>ing you will cycle through all states.

That's the default 3 states.

If you don't like the default states, at the top of your file you can simply list the state progression in plain text like this:

#+TODO: TODO INVESTIGATING IN-PROGESS BLOCKED | DONE

And now your <TAB>ing will cycle through those states.

Another example of the programmability of Emacs is when editing tables in org mode - it's so painless and intuitive to have text tables with columns all aligned as you move to the next column or row. That's also behaviour that is not hardwired into Emacs, it's simply some sort of hook that's registered when org mode is set up.

As a final example, here's a snippet from my .emacs file:

; Set the postamble for org html export

; %t stands for the title.

; %a stands for the author's name.

; %e stands for the author's email.

; %d stands for the date.

; %c will be replaced by `org-html-creator-string'.

; %v will be replaced by `org-html-validation-link'.

; %T will be replaced by the export time.

; %C will be replaced by the last modification time.

(setq org-html-postamble-format

   '(("en" "<p class=\"author\">Author: %a</p>

            <p class=\"date\">Date: %C</p>

            <p class=\"creator\">Powered by %c</p>

            <p class=\"validation\">%v</p>")))
(setq org-html-postamble

   '(("en" "<p class=\"author\">Author: %a</p>

            <p class=\"date\">Date: %C</p>

            <p class=\"creator\">Powered by %c</p>

            <p class=\"validation\">%v</p>")))

Those are callbacks - you don't get any more programmability than telling the application "call me back when the user requests an export, but only for HTML use these functions".

> I am really curious to know how Emacs and Vim fits in your daily workflow?

I use Vim primarily for writing code and code navigation. I use Emacs primarily for writing text and text navigation (for example, Emacs shortcuts for paragraph formatting and navigation are great (C-u M-q)). Emacs org mode is also great for maintaining tasklists, time-spent on tasks (it calculates that for you using a date-picker), reorganising the task hierarchy, etc.

Vim, even with plugins, doesn't come close to org mode.

1 comments

I have heard many good things about org-mode. Question:

- Have you ever used Vimwiki? I know it is no org-mode, but even I am a regular notetaker and I never felt it really lacked in anything, but yeah, it doesn't have task planning.

If you use Emacs for email or reading PDF files, you can have links in your org files which open the linked email/pdf page inside of emacs.
I've used VimWiki, and org mode was an upgrade :-)