From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: %( in capture template Date: Tue, 14 Mar 2017 09:13:49 +0100 Message-ID: <878to8xole.fsf@nicolasgoaziou.fr> References: <87mveyv528.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnhaf-0001nf-GY for emacs-orgmode@gnu.org; Tue, 14 Mar 2017 04:13:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnhad-0002pF-Kc for emacs-orgmode@gnu.org; Tue, 14 Mar 2017 04:13:56 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:57924) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cnhad-0002nb-EZ for emacs-orgmode@gnu.org; Tue, 14 Mar 2017 04:13:55 -0400 In-Reply-To: (Samuel Wales's message of "Sun, 12 Mar 2017 18:45:32 -0700") 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: Samuel Wales Cc: emacs-orgmode Hello, Samuel Wales writes: > === > * 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 "" "" " > === Thank you. I think it is fixed, now. Could you test maint branch and report your result? Regards, -- Nicolas Goaziou