Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reverse notes order in org mode

Tags:

emacs

org-mode

I make my notes in this order:

* FIRST
* SECOND
* THIRD
...
* LAST

what I want when I export to html or latex is the reverse order:

* LAST
...
* FIRST

so

  1. is there any way or command to reverse the order in org file directly ?
  2. is there any way to reverse the order while I export the org file to html/latex ?

either should be fine I think.

like image 616
liuminzhao Avatar asked Oct 13 '12 15:10

liuminzhao


1 Answers

I don't think there is a predefined command you are looking for. You can implement it by yourself.

If it's a one-time task I would use emacs macro:

You show only top-level headlines. Then you go to the first headline and start macro C-x ( . You select the line C-SPACE C-n and you type C-u M-x prepend-to-register . C-u deletes the line as well. You stop the macro C-x ) .

Now you repeat the macro for all top-level headlines M-0 C-x e .

And you insert the register C-x r i .

like image 176
Oleg Pavliv Avatar answered Nov 03 '22 02:11

Oleg Pavliv