Re: [Orgmode] Looking for a sample function to find a location for org-capture
On Aug 12, 2010, at 3:30 AM, Charles Cave wrote: I'm exploring the many features of org-capture and I see the documentation about a function for finding the location for refiling. What exactly are you referring to? I would like to see some sample code on how to do this. At the moment I am using a date tree to file my TODO items and notes. (I am writing an article about this and will publish soon) Let's say I had a headline structure for weeks of the year and I would like a function to add an item to the heading corresponding to the week of the year. Today (12th Aug) we are in Week 32. What would the function be to file under the appropriate heading: * 2010 ** 2010-Week-28 ** 2010-Week-29 ** 2010-Week-30 ** 2010-Week-31 ** 2010-Week-32 ** 2010-Week-33 Could the function create the heading if it didnt exist . just like org-capture handles creation of new brances on a date tree? Well, the datetree is a special library that does create the headings for a date tree. If you want a different structure (weeks instead of months), code for this would have to be written, and I guess org-capture would have to be extended to call this code. But I am not sure if I understand what you are asking. - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Looking for a sample function to find a location for org-capture
Charles Cave charles_c...@optusnet.com.au 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 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Looking for a sample function to find a location for org-capture
I'm exploring the many features of org-capture and I see the documentation about a function for finding the location for refiling. I would like to see some sample code on how to do this. At the moment I am using a date tree to file my TODO items and notes. (I am writing an article about this and will publish soon) Let's say I had a headline structure for weeks of the year and I would like a function to add an item to the heading corresponding to the week of the year. Today (12th Aug) we are in Week 32. What would the function be to file under the appropriate heading: * 2010 ** 2010-Week-28 ** 2010-Week-29 ** 2010-Week-30 ** 2010-Week-31 ** 2010-Week-32 ** 2010-Week-33 Could the function create the heading if it didnt exist . just like org-capture handles creation of new brances on a date tree? Charles ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode