7
votes

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.

1
in orgmode.org/worg/org-configs/org-customization-guide.html there is reference to org-reverse-note-order but it doesn't seem to be there in org mode for me, shame as it would be useful - bph

1 Answers

9
votes

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 .