* Default location for "./" with respect to capture file+headline
@ 2016-02-06 3:19 John Hendy
2016-02-06 3:55 ` Kyle Meyer
0 siblings, 1 reply; 4+ messages in thread
From: John Hendy @ 2016-02-06 3:19 UTC (permalink / raw)
To: emacs-orgmode
Greetings,
I'm trying to show an Org-mode demo within a folder for a talk. I
can't show my actual work stuff as it's confidential, so I'm trying to
create a self-contained org directory.
I have a dir with a setup like so:
dir/
dir/setup/example-config
dir/libs/{org-mode, ESS, others}
dir/demo/demo-file.org
I'm loading emacs like this (after cd-ing to dir)
emacs -q -l setup/example-config
It's loading org-mode from the ./libs directory (vs. ~/.elisp) and the
first line is:
(cd "/path/to/dir/")
When I do =C-c c= to try a capture example, it's trying to file it
with respect to ~/org and I'm not sure why. Here's the capture section
of dir/setup/example-config:
(setq org-capture-templates
'(("l" "log" entry (file+headline "./demo/org-demo_capture.org" "Log")
"* %? \n%u " :clock-in t :clock-resume t)
("t" "task" entry (file+headline "./demo/org-demo_article.org" "Tasks")
"* todo %? %^g\n%u" :prepend t)
("c" "clock" entry (file+datetree "./demo/org-demo_clocking.org")
"* %?\n%u" :clock-in t :clock-keep t)))
The capture buffer wants to create the directory ~/org/demo.
Thanks for any pointers!
John
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Default location for "./" with respect to capture file+headline
2016-02-06 3:19 Default location for "./" with respect to capture file+headline John Hendy
@ 2016-02-06 3:55 ` Kyle Meyer
2016-02-07 15:30 ` John Hendy
0 siblings, 1 reply; 4+ messages in thread
From: Kyle Meyer @ 2016-02-06 3:55 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
Hello,
John Hendy <jw.hendy@gmail.com> writes:
> When I do =C-c c= to try a capture example, it's trying to file it
> with respect to ~/org and I'm not sure why. Here's the capture section
> of dir/setup/example-config:
>
> (setq org-capture-templates
> '(("l" "log" entry (file+headline "./demo/org-demo_capture.org" "Log")
> "* %? \n%u " :clock-in t :clock-resume t)
> ("t" "task" entry (file+headline "./demo/org-demo_article.org" "Tasks")
> "* todo %? %^g\n%u" :prepend t)
> ("c" "clock" entry (file+datetree "./demo/org-demo_clocking.org")
> "* %?\n%u" :clock-in t :clock-keep t)))
>
> The capture buffer wants to create the directory ~/org/demo.
The variable org-directory affects this:
--8<---------------cut here---------------start------------->8---
Documentation:
Directory with Org files.
This is just a default location to look for Org files. There is no need
at all to put your files into this directory. It is used in the
following situations:
1. When a capture template specifies a target file that is not an
absolute path. The path will then be interpreted relative to
‘org-directory’
2. When the value of variable ‘org-agenda-files’ is a single file, any
relative paths in this file will be taken as relative to
‘org-directory’.
--8<---------------cut here---------------end--------------->8---
--
Kyle
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Default location for "./" with respect to capture file+headline
2016-02-06 3:55 ` Kyle Meyer
@ 2016-02-07 15:30 ` John Hendy
2016-02-07 17:00 ` Kyle Meyer
0 siblings, 1 reply; 4+ messages in thread
From: John Hendy @ 2016-02-07 15:30 UTC (permalink / raw)
To: Kyle Meyer; +Cc: emacs-orgmode
On Fri, Feb 5, 2016 at 9:55 PM, Kyle Meyer <kyle@kyleam.com> wrote:
> Hello,
>
> John Hendy <jw.hendy@gmail.com> writes:
>
>> When I do =C-c c= to try a capture example, it's trying to file it
>> with respect to ~/org and I'm not sure why. Here's the capture section
>> of dir/setup/example-config:
>>
>> (setq org-capture-templates
>> '(("l" "log" entry (file+headline "./demo/org-demo_capture.org" "Log")
>> "* %? \n%u " :clock-in t :clock-resume t)
>> ("t" "task" entry (file+headline "./demo/org-demo_article.org" "Tasks")
>> "* todo %? %^g\n%u" :prepend t)
>> ("c" "clock" entry (file+datetree "./demo/org-demo_clocking.org")
>> "* %?\n%u" :clock-in t :clock-keep t)))
>>
>> The capture buffer wants to create the directory ~/org/demo.
>
> The variable org-directory affects this:
>
> --8<---------------cut here---------------start------------->8---
> Documentation:
> Directory with Org files.
> This is just a default location to look for Org files. There is no need
> at all to put your files into this directory. It is used in the
> following situations:
>
> 1. When a capture template specifies a target file that is not an
> absolute path. The path will then be interpreted relative to
> ‘org-directory’
> 2. When the value of variable ‘org-agenda-files’ is a single file, any
> relative paths in this file will be taken as relative to
> ‘org-directory’.
> --8<---------------cut here---------------end--------------->8---
Thank you very much! That did it and let me run my "sandbox" org
capture demonstration nicely.
So I can fish for myself next time, did you happen to just know this
relationship, or search the manuals for "capture"? I took a look at
the templates manual page and simply say file+headline used, though
with an absolute path.
- http://orgmode.org/manual/Capture-templates.html#Capture-templates
In any case, thanks again for the tip.
John
>
> --
> Kyle
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Default location for "./" with respect to capture file+headline
2016-02-07 15:30 ` John Hendy
@ 2016-02-07 17:00 ` Kyle Meyer
0 siblings, 0 replies; 4+ messages in thread
From: Kyle Meyer @ 2016-02-07 17:00 UTC (permalink / raw)
To: John Hendy; +Cc: emacs-orgmode
John Hendy <jw.hendy@gmail.com> writes:
[...]
> Thank you very much! That did it and let me run my "sandbox" org
> capture demonstration nicely.
>
> So I can fish for myself next time, did you happen to just know this
> relationship, or search the manuals for "capture"? I took a look at
> the templates manual page and simply say file+headline used, though
> with an absolute path.
> - http://orgmode.org/manual/Capture-templates.html#Capture-templates
It doesn't seem to be mentioned in the capture documentation (either the
manual or org-capture-templates's docstring). I think I knew about
org-directory from looking into something with
org-read-agenda-file-list, which is another place it is used. Until
recently, org-directory's docstring was stale for a long time and nobody
noticed, so I'm guessing few people use the variable.
I've updated org-capture-templates and the capturing section of the
manual to mention org-directory.
--
Kyle
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-07 17:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-06 3:19 Default location for "./" with respect to capture file+headline John Hendy
2016-02-06 3:55 ` Kyle Meyer
2016-02-07 15:30 ` John Hendy
2016-02-07 17:00 ` Kyle Meyer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).