emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] %( in capture template


From: Samuel Wales
Subject: Re: [O] %( in capture template
Date: Sun, 12 Mar 2017 18:45:32 -0700

===
* 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 "" "" "
===

On 1/10/17, Nicolas Goaziou <address@hidden> wrote:
> Hello,
>
> Samuel Wales <address@hidden> 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
>


-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

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’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]