[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Looking for a sample function to find a location for org-c
From: |
Bastien |
Subject: |
Re: [Orgmode] Looking for a sample function to find a location for org-capture |
Date: |
Thu, 12 Aug 2010 16:37:53 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) |
Charles Cave <address@hidden> writes:
> I'm exploring the many features of org-capture and I see the
> documentation about a function for finding the location for refiling.
Let's say you have this capture template:
,----
| (setq org-capture-templates
| '(("w" "WP TEST" entry (function bzg-find-location)
| "* TODO Put this after abcde\n\n" :prepend t)))
`----
And this finding function:
,----
| (defun bzg-find-location ()
| "Example: find my bzg.org file and the abcde string in the current buffer"
| (find-file "~/org/bzg.org")
| (goto-char (point-min))
| (re-search-forward "abcde" nil t)
| (newline 2))
`----
Capturing with "w" will put the entry after the "abcde" string in
bzg.org.
HTH,
--
Bastien