I'm not even sure I'm asking the right question, but here goes: I followed this guide which introduces a function to search an org-mode file for a reftex/bibtex key and jump to that position in the file. The function is as follows:
(defun org-mode-reftex-search ()
;;jump to the notes for the paper pointed to at from reftex search
(interactive)
(org-open-link-from-string (format "[[notes:%s]]" (first (reftex-citation t)))))
When I use the function and search reftex for a file that is in the buffer, everything works beautifully. When I search for a file that is not in the buffer, however, I get asked No match - create this as a new heading? (y or n)
. If I say y
, a new top level entry is put into the buffer with the format:
* #BibtexKey
The problem is that I've taken the time to set up a better format for new entries in my org-mode notes file. What I would like is to use that format when the entry doesn't already exist. The format I'm using, again from that tutorial, is:
** %t
:PROPERTIES:
:Custom_ID: %l
:END:
Where %t is the title of the paper and %l is the Bibtex key. How do I replace the default format of a reftex search?