Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;; my defadvice to store bibtex notes under org-headings
- (defcustom helm-bibtex-notes-org-file "~/helm-bibtex-notes.org"
- "The path and name of an org-mode file where notes are stored, used by the defadvice 'org-filed-notes' on helm-bibtex-edit-notes. This advice assumes that notes are stored under a unique headline that begins with a BibTeX-key."
- :group 'helm-bibtex
- :type 'file)
- (defadvice helm-bibtex-edit-notes (around org-filed-notes)
- "Attach notes as a headline in an org file, instead of as a file in a folder. If no headline found, creates a new top-level headline at the end of the file."
- (setq target-note-headline (concat "* " key))
- (find-file helm-bibtex-notes-org-file)
- (goto-char (point-min))
- (unless (search-forward target-note-headline nil t)
- (goto-char (point-max))
- (newline)
- (beginning-of-line)
- (insert target-note-headline))
- (org-show-context)
- (end-of-line))
- (ad-activate 'helm-bibtex-edit-notes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement