reverse notes order in org mode

emacs, org-mode

Solution

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` .

Problem

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 - is there any way or command to reverse the order in org file directly ? - is there any way to reverse the order while I export the org file to html/latex ? either should be fine I think.

Original source