I'm using org to store a list of links, I capture the links with org-capture and a custom template, but I want to write the new entries at top of the file. how I can do this?
From the Org-Mode Manual, you can add the following template element to your custom captures:
:prepend t
Normally new captured information will be appended at the target location (last child, last table line, last list item...). Setting this property will change that.
See the related post Using properties in org-mode capture templates, where for example you can achieve the desired effect using:
("w" "Default template" entry (file+headline (concat --org-directory "journal.org")"Notes")
"* TODO [#C] %^{Title} %? :prepend t)
-
by the way,
t
is missing from the manual AFAICT, otherwise:prepend
alone won't work. This gave me headache couple of days ago. – doctorate Apr 26 at 11:01
org-reverse-note-order
. – glucas Jan 24 '17 at 1:24:prepend t
is correct that it ensures new entries are added above older ones, that applies only within a date header. The date headers themselves are still added latest after previous. Andorg-reverse-note-order
doesn't change that either. Because the:prepend t
answer has been marked as accepted, I've asked a similar question to this but specifying more completely what is required. It's here. – tkp Feb 10 '17 at 1:53