* Capture template stopped working: nil @ 2017-06-25 19:04 Florian Lindner 2017-06-25 19:09 ` Nicolas Goaziou 0 siblings, 1 reply; 12+ messages in thread From: Florian Lindner @ 2017-06-25 19:04 UTC (permalink / raw) To: emacs-orgmode Hello, since recently, one of my capture templates stopped working. Message is: Template key: org-capture: Capture template ‘j’: nil and: - %? is added to journal.org. I have also tried some other template text like "foo" (without any keys), but the message is the same. value of org-capture-templates is: (("t" "Todo" entry (file+headline "" "Tasks") "* TODO %?\n%t\n%i") ("q" "Question" entry (file+headline "" "Questions") "* %?\n%t\n%i") ("c" "Code Question" entry (file+headline "" "Code Questions") "* %?\n%t %F\n%i") ("j" "Journal" item (file+datetree (concat org-directory "/journal.org")) "%?\n%i" :kill-buffer t) ("m" "Mail" entry (file+headline "" "Mail") "* TODO %? %a\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\nFrom: %:from") ("h" "CSC Todo" entry (file+headline "~/Dropbox/CSC/CSC.org" "TODOs") "* TODO %?\n%t\n%i")) All templates are working just fine, only the Journal one not. Org mode version 9.0.9 (9.0.9-elpa @ /home/florian/.emacs.d/elpa/org-20170622/) Any idea anyone? Thanks! Florian ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-25 19:04 Capture template stopped working: nil Florian Lindner @ 2017-06-25 19:09 ` Nicolas Goaziou 2017-06-25 19:23 ` Florian Lindner 2017-06-25 19:44 ` Bastien 0 siblings, 2 replies; 12+ messages in thread From: Nicolas Goaziou @ 2017-06-25 19:09 UTC (permalink / raw) To: Florian Lindner; +Cc: emacs-orgmode Hello, Florian Lindner <mailinglists@xgm.de> writes: > since recently, one of my capture templates stopped working. Message is: > > Template key: > org-capture: Capture template ‘j’: nil > > and: > > - %? > > is added to journal.org. I have also tried some other template text like "foo" (without any keys), but the message is the same. > > value of org-capture-templates is: > ("j" "Journal" item > (file+datetree > (concat org-directory "/journal.org")) It should be (lambda () (concat org-directory "/journal.org")). See ORG-NEWS. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-25 19:09 ` Nicolas Goaziou @ 2017-06-25 19:23 ` Florian Lindner 2017-06-30 10:20 ` Florian Lindner 2017-06-25 19:44 ` Bastien 1 sibling, 1 reply; 12+ messages in thread From: Florian Lindner @ 2017-06-25 19:23 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: emacs-orgmode Am 25.06.2017 um 21:09 schrieb Nicolas Goaziou: > Hello, > > Florian Lindner <mailinglists@xgm.de> writes: > > >> since recently, one of my capture templates stopped working. Message is: >> >> Template key: >> org-capture: Capture template ‘j’: nil >> >> and: >> >> - %? >> >> is added to journal.org. I have also tried some other template text like "foo" (without any keys), but the message is the same. >> >> value of org-capture-templates is: > >> ("j" "Journal" item >> (file+datetree >> (concat org-directory "/journal.org")) > > It should be (lambda () (concat org-directory "/journal.org")). > > See ORG-NEWS. Hey, ok, found it there. However, it seems that I don't need it anyways, since "When an absolute path is not specified for a target, it is taken as relative to ‘org-directory’." So, I changed it to: ("j" "Journal" item (file+datetree "journal.org") "%?\n%i" :kill-buffer t) which still gives the same error. Sorry... what is still wrong there? Best, Florian ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-25 19:23 ` Florian Lindner @ 2017-06-30 10:20 ` Florian Lindner 2017-06-30 11:13 ` Alan Schmitt 2017-06-30 12:39 ` Nicolas Goaziou 0 siblings, 2 replies; 12+ messages in thread From: Florian Lindner @ 2017-06-30 10:20 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: bzg, emacs-orgmode Hey Nicolas, hey Bastien, might you give a hint why ("j" "Journal" item (file+datetree "journal.org") "%?\n%i" :kill-buffer t) which still gives the same error: org-capture: Capture template ‘j’: nil Thanks a lot, Florian Am 25.06.2017 um 21:23 schrieb Florian Lindner: > Am 25.06.2017 um 21:09 schrieb Nicolas Goaziou: >> Hello, >> >> Florian Lindner <mailinglists@xgm.de> writes: >> >> >>> since recently, one of my capture templates stopped working. Message is: >>> >>> Template key: >>> org-capture: Capture template ‘j’: nil >>> >>> and: >>> >>> - %? >>> >>> is added to journal.org. I have also tried some other template text like "foo" (without any keys), but the message is the same. >>> >>> value of org-capture-templates is: >> >>> ("j" "Journal" item >>> (file+datetree >>> (concat org-directory "/journal.org")) >> >> It should be (lambda () (concat org-directory "/journal.org")). >> >> See ORG-NEWS. > > Hey, > > ok, found it there. > > However, it seems that I don't need it anyways, since "When an absolute path is not specified for a target, it is taken as relative to ‘org-directory’." > > So, I changed it to: > > ("j" "Journal" item > (file+datetree "journal.org") > "%?\n%i" :kill-buffer t) > > which still gives the same error. > > Sorry... what is still wrong there? > > Best, > Florian > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-30 10:20 ` Florian Lindner @ 2017-06-30 11:13 ` Alan Schmitt 2017-06-30 12:39 ` Nicolas Goaziou 1 sibling, 0 replies; 12+ messages in thread From: Alan Schmitt @ 2017-06-30 11:13 UTC (permalink / raw) To: Florian Lindner; +Cc: bzg, emacs-orgmode, Nicolas Goaziou [-- Attachment #1: Type: text/plain, Size: 780 bytes --] Hello, "FL" == Florian Lindner <mailinglists@xgm.de> writes: FL> Hey Nicolas, hey Bastien, FL> might you give a hint why FL> ("j" "Journal" item FL> (file+datetree "journal.org") FL> "%?\n%i" :kill-buffer t) FL> which still gives the same error: org-capture: Capture template ‘j’: nil I'm having the same problem (see the thread "Capture template 'C': nil"), also with an "item" template. I suspect there is a bug in that specific case (since "entry" template works fine) where one must specify the full path of the file. The really surprising thing is that org actually finds the file (there is text appended to it). Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-05: 409.65, 2016-05: 407.70 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-30 10:20 ` Florian Lindner 2017-06-30 11:13 ` Alan Schmitt @ 2017-06-30 12:39 ` Nicolas Goaziou 1 sibling, 0 replies; 12+ messages in thread From: Nicolas Goaziou @ 2017-06-30 12:39 UTC (permalink / raw) To: Florian Lindner; +Cc: bzg, emacs-orgmode Hello, Florian Lindner <mailinglists@xgm.de> writes: > might you give a hint why > > ("j" "Journal" item > (file+datetree "journal.org") > "%?\n%i" :kill-buffer t) > > which still gives the same error: org-capture: Capture template ‘j’: > nil Fixed. Thank you. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-25 19:09 ` Nicolas Goaziou 2017-06-25 19:23 ` Florian Lindner @ 2017-06-25 19:44 ` Bastien 2017-06-25 20:24 ` Nicolas Goaziou 1 sibling, 1 reply; 12+ messages in thread From: Bastien @ 2017-06-25 19:44 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: Florian Lindner, emacs-orgmode Hi Nicolas, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes: > It should be (lambda () (concat org-directory "/journal.org")). > > See ORG-NEWS. What is the reason for this change? Thanks, -- Bastien ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-25 19:44 ` Bastien @ 2017-06-25 20:24 ` Nicolas Goaziou 2017-06-25 21:25 ` Bastien Guerry 0 siblings, 1 reply; 12+ messages in thread From: Nicolas Goaziou @ 2017-06-25 20:24 UTC (permalink / raw) To: Bastien; +Cc: Florian Lindner, emacs-orgmode Hello, Bastien <bzg@gnu.org> writes: > Hi Nicolas, > > Nicolas Goaziou <mail@nicolasgoaziou.fr> writes: > >> It should be (lambda () (concat org-directory "/journal.org")). >> >> See ORG-NEWS. > > What is the reason for this change? I don't like `eval' in the code base. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-25 20:24 ` Nicolas Goaziou @ 2017-06-25 21:25 ` Bastien Guerry 2017-06-25 21:38 ` Nicolas Goaziou 0 siblings, 1 reply; 12+ messages in thread From: Bastien Guerry @ 2017-06-25 21:25 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: Florian Lindner, emacs-orgmode Hi Nicolas, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes: >> What is the reason for this change? > > I don't like `eval' in the code base. May I ask you why `eval' in the code base is problematic? This change may break current configurations. Such changes should be made with extreme parcimony and for very consensual reasons. -- Bastien ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-25 21:25 ` Bastien Guerry @ 2017-06-25 21:38 ` Nicolas Goaziou 2017-06-30 12:23 ` Bastien 0 siblings, 1 reply; 12+ messages in thread From: Nicolas Goaziou @ 2017-06-25 21:38 UTC (permalink / raw) To: Bastien Guerry; +Cc: Florian Lindner, emacs-orgmode Bastien Guerry <bzg@gnu.org> writes: > May I ask you why `eval' in the code base is problematic? Because 1. it is hideous, 2. it doesn't cope well with lexical binding. Using `eval' should be made with extreme parcimony and for very consensual reasons. > This change may break current configurations. Such changes should > be made with extreme parcimony and for very consensual reasons. The breakage is trivial to fix, as specified in the ORG-NEWS file. Regards, ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-25 21:38 ` Nicolas Goaziou @ 2017-06-30 12:23 ` Bastien 2017-07-01 9:03 ` Nicolas Goaziou 0 siblings, 1 reply; 12+ messages in thread From: Bastien @ 2017-06-30 12:23 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: Florian Lindner, emacs-orgmode Hi Nicolas, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes: > Bastien Guerry <bzg@gnu.org> writes: > >> May I ask you why `eval' in the code base is problematic? > > Because 1. it is hideous, 2. it doesn't cope well with lexical > binding. Can you provide with an example on how `eval' can lead to trouble due to lexical binding for the org-capture configuration? I'm trying to understand. > Using `eval' should be made with extreme parcimony and for very > consensual reasons. Yes, but unless we fix a realistic bug, not bothering the user with backward-incompatible changes should take over IMHO. Thanks for further details! -- Bastien ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Capture template stopped working: nil 2017-06-30 12:23 ` Bastien @ 2017-07-01 9:03 ` Nicolas Goaziou 0 siblings, 0 replies; 12+ messages in thread From: Nicolas Goaziou @ 2017-07-01 9:03 UTC (permalink / raw) To: Bastien; +Cc: Florian Lindner, emacs-orgmode Hello, Bastien <bzg@gnu.org> writes: > Nicolas Goaziou <mail@nicolasgoaziou.fr> writes: > >> Bastien Guerry <bzg@gnu.org> writes: >> >>> May I ask you why `eval' in the code base is problematic? >> >> Because 1. it is hideous, 2. it doesn't cope well with lexical >> binding. > > Can you provide with an example on how `eval' can lead to trouble > due to lexical binding for the org-capture configuration? > > I'm trying to understand. I never said `eval' could lead to trouble due to lexical binding in Org capture configuration. I said `eval' is a problem in the code base, notwithstanding its location. Moreover, allowing Sexp in a capture template is really abusing homoiconicity of the language. As soon as the S-exp becomes mildly complex, the resulting template is unreadable. OTOH, using a function right from the start clarifies the structure of the template. The occasional `(concat a b)' is not a sufficient reason, IMO, to allow `eval' there. We should encourage saner practices. >> Using `eval' should be made with extreme parcimony and for very >> consensual reasons. > > Yes, but unless we fix a realistic bug, not bothering the user with > backward-incompatible changes should take over IMHO. Let's consider `eval' in the code base a coding design bug, then. A clearer code base (e.g., more comments, less obscure variable names, more expressive syntax) is something we should strive for. Anyway, this is a rather small incompatible change we're talking about here. In particular, it doesn't change document syntax. It's a straightforward modification of some configuration. Not as bad as it sounds, really. Note we already did the same for `org-file-apps' in Org 9.0 (although the reason was different). Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2017-07-01 9:03 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-06-25 19:04 Capture template stopped working: nil Florian Lindner 2017-06-25 19:09 ` Nicolas Goaziou 2017-06-25 19:23 ` Florian Lindner 2017-06-30 10:20 ` Florian Lindner 2017-06-30 11:13 ` Alan Schmitt 2017-06-30 12:39 ` Nicolas Goaziou 2017-06-25 19:44 ` Bastien 2017-06-25 20:24 ` Nicolas Goaziou 2017-06-25 21:25 ` Bastien Guerry 2017-06-25 21:38 ` Nicolas Goaziou 2017-06-30 12:23 ` Bastien 2017-07-01 9:03 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.