From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: %( in capture template Date: Sun, 12 Mar 2017 18:45:32 -0700 Message-ID: References: <87mveyv528.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnF3H-0003yF-1h for emacs-orgmode@gnu.org; Sun, 12 Mar 2017 21:45:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnF3G-00014R-14 for emacs-orgmode@gnu.org; Sun, 12 Mar 2017 21:45:35 -0400 Received: from mail-vk0-x234.google.com ([2607:f8b0:400c:c05::234]:33812) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnF3F-00014N-T1 for emacs-orgmode@gnu.org; Sun, 12 Mar 2017 21:45:33 -0400 Received: by mail-vk0-x234.google.com with SMTP id r136so28866710vke.1 for ; Sun, 12 Mar 2017 18:45:33 -0700 (PDT) In-Reply-To: <87mveyv528.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode =3D=3D=3D * ecm capture literally inserts. i was told this is not normal, but a bug. recent maint to reproduce, evaluate the following code, select the lines in the scratch buffer, and run m-x org-capture RET p. set the notes file to whatever works for you. *** code (require 'org-capture) (setq org-default-notes-file (substitute-in-file-name "$dorg/alpha-org-testcase.org")) ;; (find-file org-default-notes-file) (defun alpha-org-testcase--create-capture-bug () (add-to-list 'org-capture-templates `("p" "Protocol p" entry (file+headline ,org-default-notes-file "xyzzy-remember") "%(alpha-org-protocol-string \"%:link\" \"%:description\" \"%i\")" :prepend t :immediate-finish t :jump-to-captured t)) (defun alpha-org-protocol-string (link description region) (format "* debug org-capture - link %s - description %s - region %s \ " link description region))) *** the bug is below ***** debug org-capture - link - description - region ;; This buffer is for notes you don't want to save, and for Lisp evaluation. %(alpha-org-protocol-string "" "" ";; If you want to create a file, visit that file with C-x C-f, %(alpha-org-protocol-string "" "" ";; then enter the text in that file's own buffer. %(alpha-org-protocol-string "" "" " %(alpha-org-protocol-string "" "" " =3D=3D=3D On 1/10/17, Nicolas Goaziou wrote: > Hello, > > Samuel Wales writes: > >> i have "%(my-function \"%:link\" \"%:description\" \"%i\")" in a >> capture template, which now does not run the function but treats it as >> text. > > It should. Do you have an ECM? > > Regards, > > -- > Nicolas Goaziou > --=20 The Kafka Pandemic: The disease DOES progress. MANY people have died from it. And ANYBODY can get it at any time. The NIH, FDA, and CDC are not there for you. Not without activism. "You=E2=80=99ve really gotta quit this and get moving, because this is murd= er by neglect." --- .