* Bug: Org Capture with Concatenated filenames [9.0 (9.0-elpa @ .emacs.d/elpa/org-20161102/)]
@ 2016-11-04 22:17 Klarre N
2016-11-04 22:36 ` Kaushal Modi
0 siblings, 1 reply; 5+ messages in thread
From: Klarre N @ 2016-11-04 22:17 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 793 bytes --]
Hi,
concatenated filenames for org-capture templates no longer works (since
9.0).
ECM:
(setq org-default-notes-file "absolute-path/default.org")
(defvar absolute "absolute-path/"
"Path to Desired directory.")
(setq org-capture-templates '(
("e" "Example" entry
(file+headline (concat absolute "example.org") "Example")
"* Capture"
:empty-lines 1)))
Expected result:
Add "* Capture" to absolute-path/example.org.
Result: "* Capture" is added to "absolute-path/default.org".
This provides the desired result, but unable to use variable filenames
(very useful):
(setq org-default-notes-file "absolute-path/default.org")
(setq org-capture-templates '(
("e" "Example" entry
(file+headline "absolute-path/example.org" "Example")
"* Capture"
:empty-lines 1)))
Thanks!
[-- Attachment #2: Type: text/html, Size: 2039 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: Org Capture with Concatenated filenames [9.0 (9.0-elpa @ .emacs.d/elpa/org-20161102/)]
2016-11-04 22:17 Bug: Org Capture with Concatenated filenames [9.0 (9.0-elpa @ .emacs.d/elpa/org-20161102/)] Klarre N
@ 2016-11-04 22:36 ` Kaushal Modi
2016-11-04 22:45 ` Klarre N
0 siblings, 1 reply; 5+ messages in thread
From: Kaushal Modi @ 2016-11-04 22:36 UTC (permalink / raw)
To: Klarre N, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1512 bytes --]
Hi Klarre,
The org 9.0 release had deprecated use of S-exps in org-capture-templates.
That, though, went undocumented. So for now, that deprecation is reverted
on the main branch and moved to the master/dev branch.
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=f5645675a336d8f56fa9e6bd63832bdbac71f315
So when org stable next updates on Elpa (probably on Monday?), that will
have this reverted commit in it. But going forward, when org 9.1 is
released, the use of S-exp will once again be deprecated. So it would be
best to replace that S-exp with a function wrapper.
On Fri, Nov 4, 2016 at 6:19 PM Klarre N <klarre@gmail.com> wrote:
> Hi,
> concatenated filenames for org-capture templates no longer works (since
> 9.0).
>
> ECM:
> (setq org-default-notes-file "absolute-path/default.org")
> (defvar absolute "absolute-path/"
> "Path to Desired directory.")
> (setq org-capture-templates '(
> ("e" "Example" entry
> (file+headline (concat absolute "example.org") "Example")
> "* Capture"
> :empty-lines 1)))
>
> Expected result:
> Add "* Capture" to absolute-path/example.org.
>
> Result: "* Capture" is added to "absolute-path/default.org".
>
> This provides the desired result, but unable to use variable filenames
> (very useful):
> (setq org-default-notes-file "absolute-path/default.org")
> (setq org-capture-templates '(
> ("e" "Example" entry
> (file+headline "absolute-path/example.org" "Example")
> "* Capture"
> :empty-lines 1)))
>
>
> Thanks!
>
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 4426 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: Org Capture with Concatenated filenames [9.0 (9.0-elpa @ .emacs.d/elpa/org-20161102/)]
2016-11-04 22:36 ` Kaushal Modi
@ 2016-11-04 22:45 ` Klarre N
2016-11-05 0:03 ` Kaushal Modi
0 siblings, 1 reply; 5+ messages in thread
From: Klarre N @ 2016-11-04 22:45 UTC (permalink / raw)
To: Kaushal Modi, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2194 bytes --]
Thanks for the quick answer!
Oh I see, could you please provide an example how to write such a function
wrapper (I am new to Elisp)?
I defined several variables to directories where I have org-files, and
capture to one or more files in those directories, for example:
(defvar logs "path-to-logs/") then capture to logs.org, events.org and
services.org in that directory. How could I do that with a function wrapper?
Thanks you!
On Fri, Nov 4, 2016 at 11:36 PM, Kaushal Modi <kaushal.modi@gmail.com>
wrote:
> Hi Klarre,
>
> The org 9.0 release had deprecated use of S-exps in org-capture-templates.
> That, though, went undocumented. So for now, that deprecation is reverted
> on the main branch and moved to the master/dev branch.
>
> http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=
> f5645675a336d8f56fa9e6bd63832bdbac71f315
>
> So when org stable next updates on Elpa (probably on Monday?), that will
> have this reverted commit in it. But going forward, when org 9.1 is
> released, the use of S-exp will once again be deprecated. So it would be
> best to replace that S-exp with a function wrapper.
>
> On Fri, Nov 4, 2016 at 6:19 PM Klarre N <klarre@gmail.com> wrote:
>
>> Hi,
>> concatenated filenames for org-capture templates no longer works (since
>> 9.0).
>>
>> ECM:
>> (setq org-default-notes-file "absolute-path/default.org")
>> (defvar absolute "absolute-path/"
>> "Path to Desired directory.")
>> (setq org-capture-templates '(
>> ("e" "Example" entry
>> (file+headline (concat absolute "example.org") "Example")
>> "* Capture"
>> :empty-lines 1)))
>>
>> Expected result:
>> Add "* Capture" to absolute-path/example.org.
>>
>> Result: "* Capture" is added to "absolute-path/default.org".
>>
>> This provides the desired result, but unable to use variable filenames
>> (very useful):
>> (setq org-default-notes-file "absolute-path/default.org")
>> (setq org-capture-templates '(
>> ("e" "Example" entry
>> (file+headline "absolute-path/example.org" "Example")
>> "* Capture"
>> :empty-lines 1)))
>>
>>
>> Thanks!
>>
> --
>
> Kaushal Modi
>
--
Med vänliga hälsningar
Klaus
[-- Attachment #2: Type: text/html, Size: 7598 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: Org Capture with Concatenated filenames [9.0 (9.0-elpa @ .emacs.d/elpa/org-20161102/)]
2016-11-04 22:45 ` Klarre N
@ 2016-11-05 0:03 ` Kaushal Modi
2016-11-05 20:33 ` Klarre N
0 siblings, 1 reply; 5+ messages in thread
From: Kaushal Modi @ 2016-11-05 0:03 UTC (permalink / raw)
To: Klarre N, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2488 bytes --]
I am on phone, but the link I pasted had an example.
Here's another example:
https://www.reddit.com/r/emacs/comments/5b3mtr/slug/d9llo30
You just need to wrap the sexp in (lambda () ..... ).
On Fri, Nov 4, 2016, 6:45 PM Klarre N <klarre@gmail.com> wrote:
> Thanks for the quick answer!
> Oh I see, could you please provide an example how to write such a function
> wrapper (I am new to Elisp)?
> I defined several variables to directories where I have org-files, and
> capture to one or more files in those directories, for example:
> (defvar logs "path-to-logs/") then capture to logs.org, events.org and
> services.org in that directory. How could I do that with a function
> wrapper?
>
> Thanks you!
>
> On Fri, Nov 4, 2016 at 11:36 PM, Kaushal Modi <kaushal.modi@gmail.com>
> wrote:
>
> Hi Klarre,
>
> The org 9.0 release had deprecated use of S-exps in org-capture-templates.
> That, though, went undocumented. So for now, that deprecation is reverted
> on the main branch and moved to the master/dev branch.
>
>
> http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=f5645675a336d8f56fa9e6bd63832bdbac71f315
>
> So when org stable next updates on Elpa (probably on Monday?), that will
> have this reverted commit in it. But going forward, when org 9.1 is
> released, the use of S-exp will once again be deprecated. So it would be
> best to replace that S-exp with a function wrapper.
>
> On Fri, Nov 4, 2016 at 6:19 PM Klarre N <klarre@gmail.com> wrote:
>
> Hi,
> concatenated filenames for org-capture templates no longer works (since
> 9.0).
>
> ECM:
> (setq org-default-notes-file "absolute-path/default.org")
> (defvar absolute "absolute-path/"
> "Path to Desired directory.")
> (setq org-capture-templates '(
> ("e" "Example" entry
> (file+headline (concat absolute "example.org") "Example")
> "* Capture"
> :empty-lines 1)))
>
> Expected result:
> Add "* Capture" to absolute-path/example.org.
>
> Result: "* Capture" is added to "absolute-path/default.org".
>
> This provides the desired result, but unable to use variable filenames
> (very useful):
> (setq org-default-notes-file "absolute-path/default.org")
> (setq org-capture-templates '(
> ("e" "Example" entry
> (file+headline "absolute-path/example.org" "Example")
> "* Capture"
> :empty-lines 1)))
>
>
> Thanks!
>
> --
>
> Kaushal Modi
>
>
>
>
> --
> Med vänliga hälsningar
> Klaus
>
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 11572 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: Org Capture with Concatenated filenames [9.0 (9.0-elpa @ .emacs.d/elpa/org-20161102/)]
2016-11-05 0:03 ` Kaushal Modi
@ 2016-11-05 20:33 ` Klarre N
0 siblings, 0 replies; 5+ messages in thread
From: Klarre N @ 2016-11-05 20:33 UTC (permalink / raw)
To: kaushal.modi, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 181 bytes --]
Wasn't sure what the (sexp) part was, and tried to switch out file+headline
to function (got invalid function), but with the help of the second link I
got it working, thanks!
[-- Attachment #2: Type: text/html, Size: 342 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-05 20:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-04 22:17 Bug: Org Capture with Concatenated filenames [9.0 (9.0-elpa @ .emacs.d/elpa/org-20161102/)] Klarre N
2016-11-04 22:36 ` Kaushal Modi
2016-11-04 22:45 ` Klarre N
2016-11-05 0:03 ` Kaushal Modi
2016-11-05 20:33 ` Klarre N
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).