[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Best way to implement project specific captures
From: |
Richard Riley |
Subject: |
[O] Best way to implement project specific captures |
Date: |
Wed, 22 Aug 2012 04:00:17 +0100 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux) |
Currently I maintain a datetree journal capture using a template so
,----
| ("j" "journal" entry (file+datetree "journal.org")
| "* %?\n\t:PROPERTIES:\n\t:DateCreated:
%T\n\t:Link: %a\n\t:END:\n")
`----
I also use j rockways' eproject set up that allows a hook to be run when
a file is opened inside a "project". e.g
,----
| (add-hook 'web-project-file-visit-hook '(lambda ()
| (ignore-errors
| (message "Web Project : %s"
eproject-root)
| )))
`----
where "web-project" is created this:-
,----
| (define-project-type web (generic)
| (look-for "plan.org")
| :relevant-files ("\\.php$" "\\.js$" "\\.org$" "\\.sql$" "\\.css$"
"authinfo" "vhost"))
`----
So whenever I open a file in a directory hierarchy which contains a
plan.org matching those types then my web-project-file-visit-hook is run.
What is the best emacs/elisp approach to setting a capture file
destination specific to a particular project? THe main point being that
the default capture template above should only be replaced if I am
actually in a "project" : any capture done in a file NOT contained
within a project should default to the capture template above. Is it
someting to do with buffer-locals perhaps or is there a
better/alternative way? e.g Perhaps "journal.org" becomes a variable and
this is overwritten (or whatever the elisp jargon is) in the project
hook as a buffer local?
Hope was clear!
regards
r.
- [O] Best way to implement project specific captures,
Richard Riley <=
- Re: [O] Best way to implement project specific captures, Sylvain Rousseau, 2012/08/22
- Re: [O] Best way to implement project specific captures, Bastien, 2012/08/22
- Re: [O] Best way to implement project specific captures, Bastien, 2012/08/22
- Re: [O] Best way to implement project specific captures, Sylvain Rousseau, 2012/08/22
- Re: [O] Best way to implement project specific captures, Bastien, 2012/08/23
- Re: [O] Best way to implement project specific captures, Carsten Dominik, 2012/08/23
- Re: [O] Best way to implement project specific captures, Jambunathan K, 2012/08/23
- Re: [O] Best way to implement project specific captures, Bastien, 2012/08/23
- Re: [O] Best way to implement project specific captures, Sylvain Rousseau, 2012/08/23
Re: [O] Best way to implement project specific captures, Richard Riley, 2012/08/22