emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)"
@ 2018-04-02 12:33 Gregor Zattler
  2018-04-03  8:26 ` Nicolas Goaziou
  2018-04-05 17:47 ` Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)" Gregor Zattler
  0 siblings, 2 replies; 6+ messages in thread
From: Gregor Zattler @ 2018-04-02 12:33 UTC (permalink / raw)
  To: emacs-orgmode

Hi org-mode developers,

with

GNU Emacs 26.0.91 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.22.11) of 2018-04-02

and 

Org mode version 9.1.9 (release_9.1.9-560-gf93aa7 @
/home/grfz/src/org-mode/lisp/)


I get

"Capture abort: (error Format specifier doesn’t match argument
type)"

after hitting the template key in order to capture something.

This is not the case in

Org mode version 9.1.9 (release_9.1.9-3-gb1a639 @
/home/grfz/src/org-mode/lisp/)
from maint as of b1a6395dfeadd9adc5ce7633f341dfbbb30bd39e.


I tried to bisect this with
make autoloads ; emacs-snapshot -nw --debug-init --eval '(org-capture 4 "t")'
as a test, but did not find the culprit.

As a workaround I switched to main.

Thanks for your attention, Gregor

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)"
  2018-04-02 12:33 Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)" Gregor Zattler
@ 2018-04-03  8:26 ` Nicolas Goaziou
  2018-04-03 15:58   ` Gregor Zattler
  2018-04-05 17:47 ` Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)" Gregor Zattler
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2018-04-03  8:26 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Gregor Zattler <telegraph@gmx.net> writes:

> Hi org-mode developers,
>
> with
>
> GNU Emacs 26.0.91 (build 2, x86_64-pc-linux-gnu, GTK+ Version
> 3.22.11) of 2018-04-02
>
> and 
>
> Org mode version 9.1.9 (release_9.1.9-560-gf93aa7 @
> /home/grfz/src/org-mode/lisp/)
>
>
> I get
>
> "Capture abort: (error Format specifier doesn’t match argument
> type)"
>
> after hitting the template key in order to capture something.

I cannot reproduce it with default template. Do you use a special one?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)"
  2018-04-03  8:26 ` Nicolas Goaziou
@ 2018-04-03 15:58   ` Gregor Zattler
       [not found]     ` <87zi2kvywv.fsf@nicolasgoaziou.fr>
  0 siblings, 1 reply; 6+ messages in thread
From: Gregor Zattler @ 2018-04-03 15:58 UTC (permalink / raw)
  To: Nicolas Goaziou

Hi Nicolas,
* Nicolas Goaziou <mail@nicolasgoaziou.fr> [2018-04-03; 10:26]:
> Gregor Zattler <telegraph@gmx.net> writes:
>> GNU Emacs 26.0.91 (build 2, x86_64-pc-linux-gnu, GTK+ Version
>> 3.22.11) of 2018-04-02
>> and 
>> Org mode version 9.1.9 (release_9.1.9-560-gf93aa7 @
>> /home/grfz/src/org-mode/lisp/)
>>
>>
>> I get
>>
>> "Capture abort: (error Format specifier doesn’t match argument
>> type)"
>>
>> after hitting the template key in order to capture something.
>
> I cannot reproduce it with default template. Do you use a special one?

Yes, sure.  Sorry, for my laziness.  None of my templates work any more
with git master.  This is a (for privacy reasons) shortend version of
my customizations, done with the customize system:

...
 '(org-capture-templates
   (quote
    (("c" "Computer" entry
      (file+olp "~/org/grfz.org" "Computer")
      "* TODO %? %^{}G
  %I
  %^{wann fällig?}T
  %a:  notiert am/um: %U")
     ("e" "Emacs" entry
      (file+olp "~/org/grfz.org" "Computer" "Emacs")
      "* TODO %? %^{}G
  %I
  %^{wann fällig?}T
  %a:  notiert am/um: %U")
     ("o" "Emacs org-mode" entry
      (file+olp "~/org/grfz.org" "Computer" "Emacs" "org-mode")
      "* TODO %? %^{}G
  %I
  %^{wann fällig?}T
  %a:  notiert am/um: %U")
     ("d" "diary the org-mode way" entry
      (file+headline "~/org/diary.org" "aktuell")
      "*** %? %^g
    %I
    %^{wann fällig?}T
    %a:  notiert am/um: %U")
     ("j" "Journal Entry" entry
      (file+olp+datetree "~/org/grfz.org")
      "* %? %^{}G
  %I
  %^{wann fällig?}T
  %a:  notiert am/um: %U")
     ("t" "Todo Entry" entry
      (file+olp "~/org/grfz.org" "Sonstiges")
      "* %? %^{}G
  %I
  %^{wann fällig?}T
  %a:  notiert am/um: %U"))))
...

Thanks for looking into this, Gregor

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)"
  2018-04-02 12:33 Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)" Gregor Zattler
  2018-04-03  8:26 ` Nicolas Goaziou
@ 2018-04-05 17:47 ` Gregor Zattler
  1 sibling, 0 replies; 6+ messages in thread
From: Gregor Zattler @ 2018-04-05 17:47 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas, org-mode devs,
* Gregor Zattler <telegraph@gmx.net> [2018-04-02; 14:33]:
[...]
> I get
>
> "Capture abort: (error Format specifier doesn’t match argument
> type)"
>
> after hitting the template key in order to capture something.
[...]
> I tried to bisect this with
> make autoloads ; emacs-snapshot -nw --debug-init --eval '(org-capture 4 "t")'
> as a test, but did not find the culprit.

This is, because the bisecting does not find the first bad commit,
but perhaps this helps somehow:

0 (master=) grfz@len:~/src/org-mode$ git bisect start
0 (master|BISECTING=) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
Your branch is up-to-date with 'origin/master'.
0 (master|BISECTING=) grfz@len:~/src/org-mode$ git bisect bad
0 (master|BISECTING=) grfz@len:~/src/org-mode$ git co -f 2348d1834351b57d5ff9bbdb2c74c3e69ed60cfb
Note: checking out '2348d1834351b57d5ff9bbdb2c74c3e69ed60cfb'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
  
  git checkout -b <new-branch-name>

HEAD is now at 2348d1834... Merge branch 'maint'
0 ((2348d1834...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((2348d1834...)|BISECTING) grfz@len:~/src/org-mode$ git bisect good
Bisecting: 843 revisions left to test after this (roughly 10 steps)
[b6c5a174da7523864d82f6d91cce272d38c1dc95] org-agenda: Refactor org-agenda-overriding-header code
0 ((b6c5a174d...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((b6c5a174d...)|BISECTING) grfz@len:~/src/org-mode$ git bisect good
Bisecting: 421 revisions left to test after this (roughly 9 steps)
[ef2485e7ce6e5ef4e47c42898d9bb1b956142df5] manual: Sync with org.texi
0 ((ef2485e7c...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((ef2485e7c...)|BISECTING) grfz@len:~/src/org-mode$ git bisect bad
Bisecting: 210 revisions left to test after this (roughly 8 steps)
[36578fda469b1f5cc48f05c5e07e4aba8c5ae7cb] Merge branch 'maint'
0 ((36578fda4...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((36578fda4...)|BISECTING) grfz@len:~/src/org-mode$ git bisect good
Bisecting: 104 revisions left to test after this (roughly 7 steps)
[a0e3f1d5050ffd0d03c68b35b2b5300fb89da1f0] Merge branch 'maint'
0 ((a0e3f1d50...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((a0e3f1d50...)|BISECTING) grfz@len:~/src/org-mode$ git bisect good
Bisecting: 52 revisions left to test after this (roughly 6 steps)
[9bbee7d3c883efac7c738c6ef66b476d2696fc9a] Add some `:safe' keywords
0 ((9bbee7d3c...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((9bbee7d3c...)|BISECTING) grfz@len:~/src/org-mode$ git bisect bad
Bisecting: 25 revisions left to test after this (roughly 5 steps)
[f8849e92e58fefc9fbea72f650cef50a5607f305] org-archive: Add a test
0 ((f8849e92e...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((f8849e92e...)|BISECTING) grfz@len:~/src/org-mode$ git bisect bad
Bisecting: 12 revisions left to test after this (roughly 4 steps)
[d435c75f543cce08b578a399c531a28c37a48b39] Merge branch 'maint'
0 ((d435c75f5...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((d435c75f5...)|BISECTING) grfz@len:~/src/org-mode$ git bisect good
Bisecting: 6 revisions left to test after this (roughly 3 steps)
[6f89177ee6f7fb5f52f10a54ae10846c803366c5] Move `org-unlogged-message' to "org-macs.el"
0 ((6f89177ee...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((6f89177ee...)|BISECTING) grfz@len:~/src/org-mode$ git bisect bad
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[3efb0007393624b555d1f1b4858e7523d8d4c4b1] org-tempo: Enable Tempo in all Org buffers after load
0 ((3efb00073...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((3efb00073...)|BISECTING) grfz@len:~/src/org-mode$ git bisect bad
Bisecting: 0 revisions left to test after this (roughly 1 step)
[4b80c62705723ffe1cf01820d8204baf7f0ea57a] Update README_mainter
0 ((4b80c6270...)|BISECTING) grfz@len:~/src/org-mode$ cd ~/src/org-mode; rm -rf * ; git co -f ; make autoloads > /dev/null 2> /dev/null; emacs-snapshot  --eval '(org-capture 4  "t")'
0 ((4b80c6270...)|BISECTING) grfz@len:~/src/org-mode$ git bisect bad
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[94f1a5843826ab332b601397aedb1f2b052fb0c0] org-tempo.el: New file for expansion of templates
0 ((94f1a5843...)|BISECTING) grfz@len:~/src/org-mode$ 



Thanks for looking into this, Grgeor

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)"
       [not found]     ` <87zi2kvywv.fsf@nicolasgoaziou.fr>
@ 2018-04-07 20:30       ` Gregor Zattler
  2018-04-08 13:22         ` Bug: master: "Capture abort: (error Format specifier Gregor Zattler
  0 siblings, 1 reply; 6+ messages in thread
From: Gregor Zattler @ 2018-04-07 20:30 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,
* Nicolas Goaziou <mail@nicolasgoaziou.fr> [2018-04-03; 22:05]:
> Gregor Zattler <telegraph@gmx.net> writes:
>
>> Yes, sure.  Sorry, for my laziness.  None of my templates work any more
>> with git master.  This is a (for privacy reasons) shortend version of
>> my customizations, done with the customize system:
>>
>> ...
>>  '(org-capture-templates
>>    (quote
>>     (("c" "Computer" entry
>>       (file+olp "~/org/grfz.org" "Computer")
>>       "* TODO %? %^{}G
>>   %I
>
> There is no such thing as a "%I" placeholder. Do you mean "%I"?

Yes, I mean %i, the capital %I in this quote is --as I realize
now, while typing this email-- an abbrev artefact.[1]  I assume I
pasted from the X11 selection and the abbrev capitalized it.

In my customizations file all templates have %I.  Sorry for this
very special noise: this capital I does not explain the capture
errors I experience with recent git master, since they are not
part of my templates.

Ciao; Gregor

[1] English is a foreign language to me, I always type the
    personal pronoun "I" with a small letter and once thought it
    would be a good idea to automatically correct this.  Later I
    forgot about this.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: master: "Capture abort: (error Format specifier
  2018-04-07 20:30       ` Gregor Zattler
@ 2018-04-08 13:22         ` Gregor Zattler
  0 siblings, 0 replies; 6+ messages in thread
From: Gregor Zattler @ 2018-04-08 13:22 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nicolas,
* Gregor Zattler <telegraph@gmx.net> [2018-04-07; 22:30]:
> * Nicolas Goaziou <mail@nicolasgoaziou.fr> [2018-04-03; 22:05]:
>> There is no such thing as a "%I" placeholder. Do you mean "%I"?
>
> Yes, I mean %i, the capital %I in this quote is --as I realize
> now, while typing this email-- an abbrev artefact.[1]  I assume I
> pasted from the X11 selection and the abbrev capitalized it.
>
> In my customizations file all templates have %I.  Sorry for this

arrgs: In my customizations file all templates have %i
                                                     ^
> very special noise: this capital I
in my email
> does not explain the capture
> errors I experience with recent git master, since they are not
> part of my templates.

OK, it was a typo in emails, not in the configuration.



I investigated further.  Long story short: My
org-structure-template-alist interfered with capturing.  I
deleted this customisation and capturing works again with org
from git master.




With this minimal .emacs:
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(org-capture-templates
   (quote
    (("t" "test" entry
      (file+olp "~/.notes.org" "test")
      "* %? %^{}G
%i
%^{wann fällig?}T
%a:  notiert am/um: %U")))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

I was *not* able to trigger the error with org-mode as of git
master.  Therefore the problem has to do with other parts of my
customization. 

Then I turned on debug-on-error and produced a backtrace (see
below).  This is way above my elisp skills, but I realize
something about org-tempo on top of the backtrace.  I have this
module enabled in my customization.  Therefore I disabled it in
org-modules and tested again.  Tada! disabling org-tempo "fixes"
the error.

I the enhanced my minimal .emacs and enabled org-tempo:

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(org-capture-templates
   (quote
    (("t" "test" entry
      (file+olp "~/.notes.org" "test")
      "* %? %^{}G
%i
%^{wann fällig?}T
%a:  notiert am/um: %U"))))
 '(org-modules
   (quote
    (org-bbdb org-bibtex org-docview org-gnus org-info org-irc org-mhe org-rmail org-tempo org-w3m))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )


But I was not able to produce the error with org-tempo enabled.

Digging further I discovered org-structure-template-alist which
was configured:

 '(org-structure-template-alist
   (quote
    (("s" "#+BEGIN_SRC ?

#+END_SRC")
     ("E" "#+begin_src emacs-lisp ?

#+end_src")
     ("e" "#+BEGIN_EXAMPLE
?
#+END_EXAMPLE")
     ("q" "#+BEGIN_QUOTE
?
#+END_QUOTE")
     ("v" "#+BEGIN_VERSE
?
#+END_VERSE")
     ("V" "#+BEGIN_VERBATIM
?
#+END_VERBATIM")
     ("c" "#+BEGIN_CENTER
?
#+END_CENTER")
     ("l" "#+BEGIN_EXPORT latex
?
#+END_EXPORT")
     ("L" "#+LaTeX: ")
     ("h" "#+BEGIN_EXPORT html
?
#+END_EXPORT")
     ("H" "#+HTML: ")
     ("a" "#+BEGIN_EXPORT ascii
?
#+END_EXPORT")
     ("A" "#+ASCII: ")
     ("i" "#+INDEX: ?")
     ("I" "#+INCLUDE: %file ?")
     ("u" "(use-package ?
;; :ensure nil
;; :commands
;; :bind
;; :init
;; :config
)"))))

I erased this customization and bingo: capturing works again.
Somehow tempo templates interfere with org capture.

Some day I will customize org-structure-template-alist again,
since templates for use-package and emacs lisp src blocks come in
handy.

Have a nice day, Gregor

Debugger entered--Lisp error: (error "Format specifier doesn’t match argument type")
  format("<%c" "s")
  (closure (t) (pair) (format "<%c" (car pair)))(("s" "#+BEGIN_SRC ?\n\n#+END_SRC"))
  mapcar((closure (t) (pair) (format "<%c" (car pair))) (("s" "#+BEGIN_SRC ?\n\n#+END_SRC") ("E" "#+begin_src emacs-lisp ?\n\n#+end_src") ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE") ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE") ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE") ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM") ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER") ("l" "#+BEGIN_EXPORT latex\n?\n#+END_EXPORT") ("L" "#+LaTeX: ") ("h" "#+BEGIN_EXPORT html\n?\n#+END_EXPORT") ("H" "#+HTML: ") ("a" "#+BEGIN_EXPORT ascii\n?\n#+END_EXPORT") ("A" "#+ASCII: ") ("i" "#+INDEX: ?") ("I" "#+INCLUDE: %file ?") ("u" "(use-package ?\n;; :ensure nil\n;; :commands\n;; :bind\n;; :init\n;; :config\n)") (76 . "latex") (72 . "html") (65 . "ascii") (105 . "index")))
  (let ((keys (mapcar (function (lambda (pair) (format "<%c" (car pair)))) (append org-structure-template-alist org-tempo-keywords-alist)))) (if (> (length keys) (length (delete-dups keys))) (progn (warn "Duplicated keys in `org-structure-template-alist' and `org-tempo-keywords-alist'"))) (setq org-tempo-tags (cl-remove-if (function (lambda (tag) (member (car tag) keys))) org-tempo-tags)) (mapc (function org-tempo-add-block) org-structure-template-alist) (mapc (function org-tempo-add-keyword) org-tempo-keywords-alist))
  org-tempo-add-templates()
  org-tempo-setup()
  run-hooks(change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook text-mode-hook outline-mode-hook org-mode-hook))
  run-mode-hooks(org-mode-hook)
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer grfz.org> "~/org/grfz.org" nil nil "~/org/grfz.org" (4197982 64770))
  find-file-noselect("/home/grfz/org/grfz.org")
  (if this-buffer (current-buffer) (find-file-noselect file))
  (let* ((file (if this-buffer buffer-file-name (car-safe (prog1 path (setq path (cdr path)))))) (buffer (if this-buffer (current-buffer) (find-file-noselect file))) (level 1) (lmin 1) (lmax 1) end found flevel) (if buffer nil (error "File not found :%s" file)) (save-current-buffer (set-buffer buffer) (if (derived-mode-p 'org-mode) nil (error "Buffer %s needs to be in Org mode" buffer)) (save-excursion (save-restriction (widen) (goto-char (point-min)) (let ((--dolist-tail-- path)) (while --dolist-tail-- (let ((heading (car --dolist-tail--))) (let ((re (format org-complex-heading-regexp-format (regexp-quote heading))) (cnt 0)) (while (re-search-forward re end t) (setq level (- (match-end 1) (match-beginning 1))) (if (and (>= level lmin) (<= level lmax)) (progn (setq found (match-beginning 0) flevel level cnt (1+ cnt))))) (if (= cnt 0) (progn (error "Heading not found on level %d: %s" lmax heading))) (if (> cnt 1) (progn (error "Heading not unique on level %d: %s" lmax heading))) (goto-char found) (setq lmin (1+ flevel) lmax (+ lmin (if org-odd-levels-only 1 0))) (setq end (save-excursion (org-end-of-subtree t t)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (if (org-at-heading-p) (progn (point-marker)))))))
  org-find-olp(("/home/grfz/org/grfz.org" "Computer"))
  (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil))
  (let ((outline-path x259) (path x258)) (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil)))
  (let* ((x258 (car x257)) (x259 (cdr x257))) (let ((outline-path x259) (path x258)) (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil))))
  (if (consp x257) (let* ((x258 (car x257)) (x259 (cdr x257))) (let ((outline-path x259) (path x258)) (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))
  (let* ((x257 (cdr val))) (if (consp x257) (let* ((x258 (car x257)) (x259 (cdr x257))) (let ((outline-path x259) (path x258)) (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))
  (cond ((eq x245 'file) (let* ((x246 (cdr val))) (if (consp x246) (let* ((x247 (car x246)) (x248 (cdr x246))) (if (null x248) (let ((path x247)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (setq target-entry-p nil)) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'id) (let* ((x249 (cdr val))) (if (consp x249) (let* ((x250 (car x249)) (x251 (cdr x249))) (if (null x251) (let ((id x250)) (let* ((val (org-id-find id))) (if (consp val) (let* ((x277 (car val)) (x278 (cdr val))) (let ((position x278) (path x277)) (set-buffer (org-capture-target-buffer path)) (widen) (org-capture-put-target-region-and-position) (goto-char position))) (error "Cannot find target ID \"%s\"" id)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+headline) (let* ((x252 (cdr val))) (if (consp x252) (let* ((x253 (car x252)) (x254 (cdr x252))) (if (consp x254) (let* ((x255 (car x254)) (x256 (cdr x254))) (if (null x256) (let ((headline x255) (path x253)) (set-buffer (org-capture-target-buffer path)) (if (derived-mode-p 'org-mode) nil (org-display-warning (format "Capture requirement: switching buffer %S to Org mode" (current-buffer))) (org-mode)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (re-search-forward (format org-complex-heading-regexp-format (regexp-quote headline)) nil t) (beginning-of-line) (goto-char (point-max)) (if (bolp) nil (insert "\n")) (insert "* " headline "\n") (beginning-of-line 0))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp) (let* ((x257 (cdr val))) (if (consp x257) (let* ((x258 (car x257)) (x259 (cdr x257))) (let ((outline-path x259) (path x258)) (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+regexp) (let* ((x260 (cdr val))) (if (consp x260) (let* ((x261 (car x260)) (x262 (cdr x260))) (if (consp x262) (let* ((x263 (car x262)) (x264 (cdr x262))) (if (null x264) (let ((regexp x263) (path x261)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (not (re-search-forward regexp nil t)) (error "No match for target regexp in file %s" path) (goto-char (if (org-capture-get :prepend) (match-beginning 0) (match-end 0))) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p))))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp+datetree) (let* ((x265 (cdr val))) (if (consp x265) (let* ((x266 (car x265)) (x267 (cdr x265))) (let ((outline-path x267) (path x266)) (let ((m (if outline-path (org-find-olp (cons (org-capture-expand-file path) outline-path)) (set-buffer (org-capture-target-buffer path)) (point-marker)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil) (require 'org-datetree) (org-capture-put-target-region-and-position) (widen) (funcall (if (eq (org-capture-get :tree-type) 'week) (function org-datetree-find-iso-week-create) (function org-datetree-find-date-create)) (calendar-gregorian-from-absolute (cond (org-overriding-default-time (time-to-days org-overriding-default-time)) ((or (org-capture-get :time-prompt) (equal current-prefix-arg 1)) (let ((prompt-time (org-read-date nil t nil "Date for tree entry:" (current-time)))) (org-capture-put :default-time (cond ((and (or (not (boundp 'org-time-was-given)) (not org-time-was-given)) (not (= (time-to-days prompt-time) (org-today)))) (apply (function encode-time) (append '(0 0 0) (cdr (cdr (cdr (decode-time prompt-time))))))) ((string-match "\\([^ ]+\\)--?[^ ]+[ ]+\\(.*\\)" org-read-date-final-answer) (apply (function encode-time) (org-read-date-analyze (replace-match "\\1 \\2" nil nil org-read-date-final-answer) prompt-time (decode-time prompt-time)))) (t prompt-time))) (time-to-days prompt-time))) (t (org-today)))) (if outline-path 'subtree-at-point))))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+function) (let* ((x268 (cdr val))) (if (consp x268) (let* ((x269 (car x268)) (x270 (cdr x268))) (if (consp x270) (let* ((x271 (car x270)) (x272 (cdr x270))) (if (null x272) (let ((function x271) (path x269)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (funcall function) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'function) (let* ((x273 (cdr val))) (if (consp x273) (let* ((x274 (car x273)) (x275 (cdr x273))) (if (null x275) (let ((fun x274)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'clock) (let* ((x276 (cdr val))) (if (null x276) (progn (if (and (markerp org-clock-hd-marker) (marker-buffer org-clock-hd-marker)) (progn (set-buffer (marker-buffer org-clock-hd-marker)) (org-capture-put-target-region-and-position) (widen) (goto-char org-clock-hd-marker)) (error "No running clock that could be used as capture target"))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) (t (let ((target val)) (error "Invalid capture target specification: %S" target))))
  (let* ((x245 (car val))) (cond ((eq x245 'file) (let* ((x246 (cdr val))) (if (consp x246) (let* ((x247 (car x246)) (x248 (cdr x246))) (if (null x248) (let ((path x247)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (setq target-entry-p nil)) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'id) (let* ((x249 (cdr val))) (if (consp x249) (let* ((x250 (car x249)) (x251 (cdr x249))) (if (null x251) (let ((id x250)) (let* ((val (org-id-find id))) (if (consp val) (let* ((x277 (car val)) (x278 (cdr val))) (let ((position x278) (path x277)) (set-buffer (org-capture-target-buffer path)) (widen) (org-capture-put-target-region-and-position) (goto-char position))) (error "Cannot find target ID \"%s\"" id)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+headline) (let* ((x252 (cdr val))) (if (consp x252) (let* ((x253 (car x252)) (x254 (cdr x252))) (if (consp x254) (let* ((x255 (car x254)) (x256 (cdr x254))) (if (null x256) (let ((headline x255) (path x253)) (set-buffer (org-capture-target-buffer path)) (if (derived-mode-p 'org-mode) nil (org-display-warning (format "Capture requirement: switching buffer %S to Org mode" (current-buffer))) (org-mode)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (re-search-forward (format org-complex-heading-regexp-format (regexp-quote headline)) nil t) (beginning-of-line) (goto-char (point-max)) (if (bolp) nil (insert "\n")) (insert "* " headline "\n") (beginning-of-line 0))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp) (let* ((x257 (cdr val))) (if (consp x257) (let* ((x258 (car x257)) (x259 (cdr x257))) (let ((outline-path x259) (path x258)) (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+regexp) (let* ((x260 (cdr val))) (if (consp x260) (let* ((x261 (car x260)) (x262 (cdr x260))) (if (consp x262) (let* ((x263 (car x262)) (x264 (cdr x262))) (if (null x264) (let ((regexp x263) (path x261)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (not (re-search-forward regexp nil t)) (error "No match for target regexp in file %s" path) (goto-char (if (org-capture-get :prepend) (match-beginning 0) (match-end 0))) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p))))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp+datetree) (let* ((x265 (cdr val))) (if (consp x265) (let* ((x266 (car x265)) (x267 (cdr x265))) (let ((outline-path x267) (path x266)) (let ((m (if outline-path (org-find-olp (cons (org-capture-expand-file path) outline-path)) (set-buffer (org-capture-target-buffer path)) (point-marker)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil) (require 'org-datetree) (org-capture-put-target-region-and-position) (widen) (funcall (if (eq (org-capture-get :tree-type) 'week) (function org-datetree-find-iso-week-create) (function org-datetree-find-date-create)) (calendar-gregorian-from-absolute (cond (org-overriding-default-time (time-to-days org-overriding-default-time)) ((or (org-capture-get :time-prompt) (equal current-prefix-arg 1)) (let ((prompt-time (org-read-date nil t nil "Date for tree entry:" (current-time)))) (org-capture-put :default-time (cond ((and (or (not (boundp 'org-time-was-given)) (not org-time-was-given)) (not (= (time-to-days prompt-time) (org-today)))) (apply (function encode-time) (append '(0 0 0) (cdr (cdr (cdr (decode-time prompt-time))))))) ((string-match "\\([^ ]+\\)--?[^ ]+[ ]+\\(.*\\)" org-read-date-final-answer) (apply (function encode-time) (org-read-date-analyze (replace-match "\\1 \\2" nil nil org-read-date-final-answer) prompt-time (decode-time prompt-time)))) (t prompt-time))) (time-to-days prompt-time))) (t (org-today)))) (if outline-path 'subtree-at-point))))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+function) (let* ((x268 (cdr val))) (if (consp x268) (let* ((x269 (car x268)) (x270 (cdr x268))) (if (consp x270) (let* ((x271 (car x270)) (x272 (cdr x270))) (if (null x272) (let ((function x271) (path x269)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (funcall function) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'function) (let* ((x273 (cdr val))) (if (consp x273) (let* ((x274 (car x273)) (x275 (cdr x273))) (if (null x275) (let ((fun x274)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'clock) (let* ((x276 (cdr val))) (if (null x276) (progn (if (and (markerp org-clock-hd-marker) (marker-buffer org-clock-hd-marker)) (progn (set-buffer (marker-buffer org-clock-hd-marker)) (org-capture-put-target-region-and-position) (widen) (goto-char org-clock-hd-marker)) (error "No running clock that could be used as capture target"))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) (t (let ((target val)) (error "Invalid capture target specification: %S" target)))))
  (if (consp val) (let* ((x245 (car val))) (cond ((eq x245 'file) (let* ((x246 (cdr val))) (if (consp x246) (let* ((x247 (car x246)) (x248 (cdr x246))) (if (null x248) (let ((path x247)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (setq target-entry-p nil)) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'id) (let* ((x249 (cdr val))) (if (consp x249) (let* ((x250 (car x249)) (x251 (cdr x249))) (if (null x251) (let ((id x250)) (let* ((val (org-id-find id))) (if (consp val) (let* ((x277 (car val)) (x278 (cdr val))) (let ((position x278) (path x277)) (set-buffer (org-capture-target-buffer path)) (widen) (org-capture-put-target-region-and-position) (goto-char position))) (error "Cannot find target ID \"%s\"" id)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+headline) (let* ((x252 (cdr val))) (if (consp x252) (let* ((x253 (car x252)) (x254 (cdr x252))) (if (consp x254) (let* ((x255 (car x254)) (x256 (cdr x254))) (if (null x256) (let ((headline x255) (path x253)) (set-buffer (org-capture-target-buffer path)) (if (derived-mode-p 'org-mode) nil (org-display-warning (format "Capture requirement: switching buffer %S to Org mode" (current-buffer))) (org-mode)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (re-search-forward (format org-complex-heading-regexp-format (regexp-quote headline)) nil t) (beginning-of-line) (goto-char (point-max)) (if (bolp) nil (insert "\n")) (insert "* " headline "\n") (beginning-of-line 0))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp) (let* ((x257 (cdr val))) (if (consp x257) (let* ((x258 (car x257)) (x259 (cdr x257))) (let ((outline-path x259) (path x258)) (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+regexp) (let* ((x260 (cdr val))) (if (consp x260) (let* ((x261 (car x260)) (x262 (cdr x260))) (if (consp x262) (let* ((x263 (car x262)) (x264 (cdr x262))) (if (null x264) (let ((regexp x263) (path x261)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (not (re-search-forward regexp nil t)) (error "No match for target regexp in file %s" path) (goto-char (if (org-capture-get :prepend) (match-beginning 0) (match-end 0))) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p))))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp+datetree) (let* ((x265 (cdr val))) (if (consp x265) (let* ((x266 (car x265)) (x267 (cdr x265))) (let ((outline-path x267) (path x266)) (let ((m (if outline-path (org-find-olp (cons (org-capture-expand-file path) outline-path)) (set-buffer (org-capture-target-buffer path)) (point-marker)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil) (require 'org-datetree) (org-capture-put-target-region-and-position) (widen) (funcall (if (eq (org-capture-get :tree-type) 'week) (function org-datetree-find-iso-week-create) (function org-datetree-find-date-create)) (calendar-gregorian-from-absolute (cond (org-overriding-default-time (time-to-days org-overriding-default-time)) ((or (org-capture-get :time-prompt) (equal current-prefix-arg 1)) (let ((prompt-time (org-read-date nil t nil "Date for tree entry:" (current-time)))) (org-capture-put :default-time (cond ((and (or (not (boundp 'org-time-was-given)) (not org-time-was-given)) (not (= (time-to-days prompt-time) (org-today)))) (apply (function encode-time) (append '(0 0 0) (cdr (cdr (cdr (decode-time prompt-time))))))) ((string-match "\\([^ ]+\\)--?[^ ]+[ ]+\\(.*\\)" org-read-date-final-answer) (apply (function encode-time) (org-read-date-analyze (replace-match "\\1 \\2" nil nil org-read-date-final-answer) prompt-time (decode-time prompt-time)))) (t prompt-time))) (time-to-days prompt-time))) (t (org-today)))) (if outline-path 'subtree-at-point))))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+function) (let* ((x268 (cdr val))) (if (consp x268) (let* ((x269 (car x268)) (x270 (cdr x268))) (if (consp x270) (let* ((x271 (car x270)) (x272 (cdr x270))) (if (null x272) (let ((function x271) (path x269)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (funcall function) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'function) (let* ((x273 (cdr val))) (if (consp x273) (let* ((x274 (car x273)) (x275 (cdr x273))) (if (null x275) (let ((fun x274)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'clock) (let* ((x276 (cdr val))) (if (null x276) (progn (if (and (markerp org-clock-hd-marker) (marker-buffer org-clock-hd-marker)) (progn (set-buffer (marker-buffer org-clock-hd-marker)) (org-capture-put-target-region-and-position) (widen) (goto-char org-clock-hd-marker)) (error "No running clock that could be used as capture target"))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) (t (let ((target val)) (error "Invalid capture target specification: %S" target))))) (let ((target val)) (error "Invalid capture target specification: %S" target)))
  (let* ((val (or target (org-capture-get :target)))) (if (consp val) (let* ((x245 (car val))) (cond ((eq x245 'file) (let* ((x246 (cdr val))) (if (consp x246) (let* ((x247 (car x246)) (x248 (cdr x246))) (if (null x248) (let ((path x247)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (setq target-entry-p nil)) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'id) (let* ((x249 (cdr val))) (if (consp x249) (let* ((x250 (car x249)) (x251 (cdr x249))) (if (null x251) (let ((id x250)) (let* ((val (org-id-find id))) (if (consp val) (let* ((x277 (car val)) (x278 (cdr val))) (let ((position x278) (path x277)) (set-buffer (org-capture-target-buffer path)) (widen) (org-capture-put-target-region-and-position) (goto-char position))) (error "Cannot find target ID \"%s\"" id)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+headline) (let* ((x252 (cdr val))) (if (consp x252) (let* ((x253 (car x252)) (x254 (cdr x252))) (if (consp x254) (let* ((x255 (car x254)) (x256 (cdr x254))) (if (null x256) (let ((headline x255) (path x253)) (set-buffer (org-capture-target-buffer path)) (if (derived-mode-p 'org-mode) nil (org-display-warning (format "Capture requirement: switching buffer %S to Org mode" (current-buffer))) (org-mode)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (re-search-forward (format org-complex-heading-regexp-format (regexp-quote headline)) nil t) (beginning-of-line) (goto-char (point-max)) (if (bolp) nil (insert "\n")) (insert "* " headline "\n") (beginning-of-line 0))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp) (let* ((x257 (cdr val))) (if (consp x257) (let* ((x258 (car x257)) (x259 (cdr x257))) (let ((outline-path x259) (path x258)) (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+regexp) (let* ((x260 (cdr val))) (if (consp x260) (let* ((x261 (car x260)) (x262 (cdr x260))) (if (consp x262) (let* ((x263 (car x262)) (x264 (cdr x262))) (if (null x264) (let ((regexp x263) (path x261)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (not (re-search-forward regexp nil t)) (error "No match for target regexp in file %s" path) (goto-char (if (org-capture-get :prepend) (match-beginning 0) (match-end 0))) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p))))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp+datetree) (let* ((x265 (cdr val))) (if (consp x265) (let* ((x266 (car x265)) (x267 (cdr x265))) (let ((outline-path x267) (path x266)) (let ((m (if outline-path (org-find-olp (cons (org-capture-expand-file path) outline-path)) (set-buffer (org-capture-target-buffer path)) (point-marker)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil) (require 'org-datetree) (org-capture-put-target-region-and-position) (widen) (funcall (if (eq (org-capture-get :tree-type) 'week) (function org-datetree-find-iso-week-create) (function org-datetree-find-date-create)) (calendar-gregorian-from-absolute (cond (org-overriding-default-time (time-to-days org-overriding-default-time)) ((or (org-capture-get :time-prompt) (equal current-prefix-arg 1)) (let ((prompt-time (org-read-date nil t nil "Date for tree entry:" (current-time)))) (org-capture-put :default-time (cond ((and (or (not (boundp 'org-time-was-given)) (not org-time-was-given)) (not (= (time-to-days prompt-time) (org-today)))) (apply (function encode-time) (append '(0 0 0) (cdr (cdr (cdr (decode-time prompt-time))))))) ((string-match "\\([^ ]+\\)--?[^ ]+[ ]+\\(.*\\)" org-read-date-final-answer) (apply (function encode-time) (org-read-date-analyze (replace-match "\\1 \\2" nil nil org-read-date-final-answer) prompt-time (decode-time prompt-time)))) (t prompt-time))) (time-to-days prompt-time))) (t (org-today)))) (if outline-path 'subtree-at-point))))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+function) (let* ((x268 (cdr val))) (if (consp x268) (let* ((x269 (car x268)) (x270 (cdr x268))) (if (consp x270) (let* ((x271 (car x270)) (x272 (cdr x270))) (if (null x272) (let ((function x271) (path x269)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (funcall function) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'function) (let* ((x273 (cdr val))) (if (consp x273) (let* ((x274 (car x273)) (x275 (cdr x273))) (if (null x275) (let ((fun x274)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'clock) (let* ((x276 (cdr val))) (if (null x276) (progn (if (and (markerp org-clock-hd-marker) (marker-buffer org-clock-hd-marker)) (progn (set-buffer (marker-buffer org-clock-hd-marker)) (org-capture-put-target-region-and-position) (widen) (goto-char org-clock-hd-marker)) (error "No running clock that could be used as capture target"))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) (t (let ((target val)) (error "Invalid capture target specification: %S" target))))) (let ((target val)) (error "Invalid capture target specification: %S" target))))
  (save-excursion (let* ((val (or target (org-capture-get :target)))) (if (consp val) (let* ((x245 (car val))) (cond ((eq x245 'file) (let* ((x246 (cdr val))) (if (consp x246) (let* ((x247 (car x246)) (x248 (cdr x246))) (if (null x248) (let ((path x247)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (setq target-entry-p nil)) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'id) (let* ((x249 (cdr val))) (if (consp x249) (let* ((x250 (car x249)) (x251 (cdr x249))) (if (null x251) (let ((id x250)) (let* ((val (org-id-find id))) (if (consp val) (let* ((x277 (car val)) (x278 (cdr val))) (let ((position x278) (path x277)) (set-buffer (org-capture-target-buffer path)) (widen) (org-capture-put-target-region-and-position) (goto-char position))) (error "Cannot find target ID \"%s\"" id)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+headline) (let* ((x252 (cdr val))) (if (consp x252) (let* ((x253 (car x252)) (x254 (cdr x252))) (if (consp x254) (let* ((x255 (car x254)) (x256 (cdr x254))) (if (null x256) (let ((headline x255) (path x253)) (set-buffer (org-capture-target-buffer path)) (if (derived-mode-p 'org-mode) nil (org-display-warning (format "Capture requirement: switching buffer %S to Org mode" (current-buffer))) (org-mode)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (re-search-forward (format org-complex-heading-regexp-format (regexp-quote headline)) nil t) (beginning-of-line) (goto-char (point-max)) (if (bolp) nil (insert "\n")) (insert "* " headline "\n") (beginning-of-line 0))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp) (let* ((x257 (cdr val))) (if (consp x257) (let* ((x258 (car x257)) (x259 (cdr x257))) (let ((outline-path x259) (path x258)) (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+regexp) (let* ((x260 (cdr val))) (if (consp x260) (let* ((x261 (car x260)) (x262 (cdr x260))) (if (consp x262) (let* ((x263 (car x262)) (x264 (cdr x262))) (if (null x264) (let ((regexp x263) (path x261)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (not (re-search-forward regexp nil t)) (error "No match for target regexp in file %s" path) (goto-char (if (org-capture-get :prepend) (match-beginning 0) (match-end 0))) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p))))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp+datetree) (let* ((x265 (cdr val))) (if (consp x265) (let* ((x266 (car x265)) (x267 (cdr x265))) (let ((outline-path x267) (path x266)) (let ((m (if outline-path (org-find-olp (cons (org-capture-expand-file path) outline-path)) (set-buffer (org-capture-target-buffer path)) (point-marker)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil) (require 'org-datetree) (org-capture-put-target-region-and-position) (widen) (funcall (if (eq (org-capture-get :tree-type) 'week) (function org-datetree-find-iso-week-create) (function org-datetree-find-date-create)) (calendar-gregorian-from-absolute (cond (org-overriding-default-time (time-to-days org-overriding-default-time)) ((or (org-capture-get :time-prompt) (equal current-prefix-arg 1)) (let ((prompt-time (org-read-date nil t nil "Date for tree entry:" (current-time)))) (org-capture-put :default-time (cond ((and (or (not (boundp 'org-time-was-given)) (not org-time-was-given)) (not (= (time-to-days prompt-time) (org-today)))) (apply (function encode-time) (append '(0 0 0) (cdr (cdr (cdr (decode-time prompt-time))))))) ((string-match "\\([^ ]+\\)--?[^ ]+[ ]+\\(.*\\)" org-read-date-final-answer) (apply (function encode-time) (org-read-date-analyze (replace-match "\\1 \\2" nil nil org-read-date-final-answer) prompt-time (decode-time prompt-time)))) (t prompt-time))) (time-to-days prompt-time))) (t (org-today)))) (if outline-path 'subtree-at-point))))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+function) (let* ((x268 (cdr val))) (if (consp x268) (let* ((x269 (car x268)) (x270 (cdr x268))) (if (consp x270) (let* ((x271 (car x270)) (x272 (cdr x270))) (if (null x272) (let ((function x271) (path x269)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (funcall function) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'function) (let* ((x273 (cdr val))) (if (consp x273) (let* ((x274 (car x273)) (x275 (cdr x273))) (if (null x275) (let ((fun x274)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'clock) (let* ((x276 (cdr val))) (if (null x276) (progn (if (and (markerp org-clock-hd-marker) (marker-buffer org-clock-hd-marker)) (progn (set-buffer (marker-buffer org-clock-hd-marker)) (org-capture-put-target-region-and-position) (widen) (goto-char org-clock-hd-marker)) (error "No running clock that could be used as capture target"))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) (t (let ((target val)) (error "Invalid capture target specification: %S" target))))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (org-capture-put :buffer (current-buffer) :pos (point) :target-entry-p target-entry-p :decrypted (and (featurep 'org-crypt) (org-at-encrypted-entry-p) (save-excursion (org-decrypt-entry) (and (org-back-to-heading t) (point))))))
  (let ((target-entry-p t)) (save-excursion (let* ((val (or target (org-capture-get :target)))) (if (consp val) (let* ((x245 (car val))) (cond ((eq x245 'file) (let* ((x246 (cdr val))) (if (consp x246) (let* ((x247 (car x246)) (x248 (cdr x246))) (if (null x248) (let ((path x247)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (setq target-entry-p nil)) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'id) (let* ((x249 (cdr val))) (if (consp x249) (let* ((x250 (car x249)) (x251 (cdr x249))) (if (null x251) (let ((id x250)) (let* ((val (org-id-find id))) (if (consp val) (let* ((x277 (car val)) (x278 (cdr val))) (let ((position x278) (path x277)) (set-buffer (org-capture-target-buffer path)) (widen) (org-capture-put-target-region-and-position) (goto-char position))) (error "Cannot find target ID \"%s\"" id)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+headline) (let* ((x252 (cdr val))) (if (consp x252) (let* ((x253 (car x252)) (x254 (cdr x252))) (if (consp x254) (let* ((x255 (car x254)) (x256 (cdr x254))) (if (null x256) (let ((headline x255) (path x253)) (set-buffer (org-capture-target-buffer path)) (if (derived-mode-p 'org-mode) nil (org-display-warning (format "Capture requirement: switching buffer %S to Org mode" (current-buffer))) (org-mode)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (re-search-forward (format org-complex-heading-regexp-format (regexp-quote headline)) nil t) (beginning-of-line) (goto-char (point-max)) (if (bolp) nil (insert "\n")) (insert "* " headline "\n") (beginning-of-line 0))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp) (let* ((x257 (cdr val))) (if (consp x257) (let* ((x258 (car x257)) (x259 (cdr x257))) (let ((outline-path x259) (path x258)) (let ((m (org-find-olp (cons (org-capture-expand-file path) outline-path)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+regexp) (let* ((x260 (cdr val))) (if (consp x260) (let* ((x261 (car x260)) (x262 (cdr x260))) (if (consp x262) (let* ((x263 (car x262)) (x264 (cdr x262))) (if (null x264) (let ((regexp x263) (path x261)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (goto-char (point-min)) (if (not (re-search-forward regexp nil t)) (error "No match for target regexp in file %s" path) (goto-char (if (org-capture-get :prepend) (match-beginning 0) (match-end 0))) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p))))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+olp+datetree) (let* ((x265 (cdr val))) (if (consp x265) (let* ((x266 (car x265)) (x267 (cdr x265))) (let ((outline-path x267) (path x266)) (let ((m (if outline-path (org-find-olp (cons (org-capture-expand-file path) outline-path)) (set-buffer (org-capture-target-buffer path)) (point-marker)))) (set-buffer (marker-buffer m)) (org-capture-put-target-region-and-position) (widen) (goto-char m) (set-marker m nil) (require 'org-datetree) (org-capture-put-target-region-and-position) (widen) (funcall (if (eq (org-capture-get :tree-type) 'week) (function org-datetree-find-iso-week-create) (function org-datetree-find-date-create)) (calendar-gregorian-from-absolute (cond (org-overriding-default-time (time-to-days org-overriding-default-time)) ((or (org-capture-get :time-prompt) (equal current-prefix-arg 1)) (let ((prompt-time (org-read-date nil t nil "Date for tree entry:" (current-time)))) (org-capture-put :default-time (cond ((and (or (not (boundp 'org-time-was-given)) (not org-time-was-given)) (not (= (time-to-days prompt-time) (org-today)))) (apply (function encode-time) (append '(0 0 0) (cdr (cdr (cdr (decode-time prompt-time))))))) ((string-match "\\([^ ]+\\)--?[^ ]+[ ]+\\(.*\\)" org-read-date-final-answer) (apply (function encode-time) (org-read-date-analyze (replace-match "\\1 \\2" nil nil org-read-date-final-answer) prompt-time (decode-time prompt-time)))) (t prompt-time))) (time-to-days prompt-time))) (t (org-today)))) (if outline-path 'subtree-at-point))))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'file+function) (let* ((x268 (cdr val))) (if (consp x268) (let* ((x269 (car x268)) (x270 (cdr x268))) (if (consp x270) (let* ((x271 (car x270)) (x272 (cdr x270))) (if (null x272) (let ((function x271) (path x269)) (set-buffer (org-capture-target-buffer path)) (org-capture-put-target-region-and-position) (widen) (funcall function) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'function) (let* ((x273 (cdr val))) (if (consp x273) (let* ((x274 (car x273)) (x275 (cdr x273))) (if (null x275) (let ((fun x274)) (funcall fun) (org-capture-put :exact-position (point)) (setq target-entry-p (and (derived-mode-p 'org-mode) (org-at-heading-p)))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) ((eq x245 'clock) (let* ((x276 (cdr val))) (if (null x276) (progn (if (and (markerp org-clock-hd-marker) (marker-buffer org-clock-hd-marker)) (progn (set-buffer (marker-buffer org-clock-hd-marker)) (org-capture-put-target-region-and-position) (widen) (goto-char org-clock-hd-marker)) (error "No running clock that could be used as capture target"))) (let ((target val)) (error "Invalid capture target specification: %S" target))))) (t (let ((target val)) (error "Invalid capture target specification: %S" target))))) (let ((target val)) (error "Invalid capture target specification: %S" target)))) (org-capture-put :buffer (current-buffer) :pos (point) :target-entry-p target-entry-p :decrypted (and (featurep 'org-crypt) (org-at-encrypted-entry-p) (save-excursion (org-decrypt-entry) (and (org-back-to-heading t) (point)))))))
  org-capture-set-target-location()
  (cond ((equal entry "C") (customize-variable 'org-capture-templates)) ((equal entry "q") (user-error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep 'dired) (car (rassq orig-buf dired-buffers)))) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto 0) (org-capture-insert-template-here) (condition-case error (org-capture-place-template (eq (car (org-capture-get :target)) 'function)) ((error quit) (if (and (buffer-base-buffer (current-buffer)) (string-prefix-p "CAPTURE-" (buffer-name))) (kill-buffer (current-buffer))) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 error)))) (if (and (derived-mode-p 'org-mode) (org-capture-get :clock-in)) (condition-case nil (progn (if (org-clock-is-active) (org-capture-put :interrupted-clock (copy-marker org-clock-marker))) (org-clock-in) (set (make-local-variable 'org-capture-clock-was-started) t)) (error "Could not start the clock in this capture buffer"))) (if (org-capture-get :immediate-finish) (org-capture-finalize)))))
  (let* ((orig-buf (current-buffer)) (annotation (if (and (boundp 'org-capture-link-is-already-stored) org-capture-link-is-already-stored) (plist-get org-store-link-plist :annotation) (condition-case nil (progn (org-store-link nil)) (error nil)))) (entry (or org-capture-entry (org-capture-select-template keys))) initial) (setq initial (or org-capture-initial (and (org-region-active-p) (buffer-substring (point) (mark))))) (if (stringp initial) (progn (remove-text-properties 0 (length initial) '(read-only t) initial))) (if (stringp annotation) (progn (remove-text-properties 0 (length annotation) '(read-only t) annotation))) (cond ((equal entry "C") (customize-variable 'org-capture-templates)) ((equal entry "q") (user-error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep 'dired) (car (rassq orig-buf dired-buffers)))) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto 0) (org-capture-insert-template-here) (condition-case error (org-capture-place-template (eq (car (org-capture-get :target)) 'function)) ((error quit) (if (and (buffer-base-buffer (current-buffer)) (string-prefix-p "CAPTURE-" (buffer-name))) (kill-buffer (current-buffer))) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 error)))) (if (and (derived-mode-p 'org-mode) (org-capture-get :clock-in)) (condition-case nil (progn (if (org-clock-is-active) (org-capture-put :interrupted-clock (copy-marker org-clock-marker))) (org-clock-in) (set (make-local-variable 'org-capture-clock-was-started) t)) (error "Could not start the clock in this capture buffer"))) (if (org-capture-get :immediate-finish) (org-capture-finalize))))))
  (cond ((equal goto '(4)) (org-capture-goto-target)) ((equal goto '(16)) (org-capture-goto-last-stored)) (t (let* ((orig-buf (current-buffer)) (annotation (if (and (boundp 'org-capture-link-is-already-stored) org-capture-link-is-already-stored) (plist-get org-store-link-plist :annotation) (condition-case nil (progn (org-store-link nil)) (error nil)))) (entry (or org-capture-entry (org-capture-select-template keys))) initial) (setq initial (or org-capture-initial (and (org-region-active-p) (buffer-substring (point) (mark))))) (if (stringp initial) (progn (remove-text-properties 0 (length initial) '(read-only t) initial))) (if (stringp annotation) (progn (remove-text-properties 0 (length annotation) '(read-only t) annotation))) (cond ((equal entry "C") (customize-variable 'org-capture-templates)) ((equal entry "q") (user-error "Abort")) (t (org-capture-set-plist entry) (org-capture-get-template) (org-capture-put :original-buffer orig-buf :original-file (or (buffer-file-name orig-buf) (and (featurep 'dired) (car (rassq orig-buf dired-buffers)))) :original-file-nondirectory (and (buffer-file-name orig-buf) (file-name-nondirectory (buffer-file-name orig-buf))) :annotation annotation :initial initial :return-to-wconf (current-window-configuration) :default-time (or org-overriding-default-time (org-current-time))) (org-capture-set-target-location) (condition-case error (org-capture-put :template (org-capture-fill-template)) ((error quit) (if (get-buffer "*Capture*") (kill-buffer "*Capture*")) (error "Capture abort: %s" error))) (setq org-capture-clock-keep (org-capture-get :clock-keep)) (if (equal goto 0) (org-capture-insert-template-here) (condition-case error (org-capture-place-template (eq (car (org-capture-get :target)) 'function)) ((error quit) (if (and (buffer-base-buffer (current-buffer)) (string-prefix-p "CAPTURE-" (buffer-name))) (kill-buffer (current-buffer))) (set-window-configuration (org-capture-get :return-to-wconf)) (error "Capture template `%s': %s" (org-capture-get :key) (nth 1 error)))) (if (and (derived-mode-p 'org-mode) (org-capture-get :clock-in)) (condition-case nil (progn (if (org-clock-is-active) (org-capture-put :interrupted-clock (copy-marker org-clock-marker))) (org-clock-in) (set (make-local-variable 'org-capture-clock-was-started) t)) (error "Could not start the clock in this capture buffer"))) (if (org-capture-get :immediate-finish) (org-capture-finalize))))))))
  org-capture(nil)
  funcall-interactively(org-capture nil)
  call-interactively(org-capture nil nil)
  command-execute(org-capture)



Ciao; Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-08 13:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-02 12:33 Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)" Gregor Zattler
2018-04-03  8:26 ` Nicolas Goaziou
2018-04-03 15:58   ` Gregor Zattler
     [not found]     ` <87zi2kvywv.fsf@nicolasgoaziou.fr>
2018-04-07 20:30       ` Gregor Zattler
2018-04-08 13:22         ` Bug: master: "Capture abort: (error Format specifier Gregor Zattler
2018-04-05 17:47 ` Bug: master: "Capture abort: (error Format specifier doesn’t match argument type)" Gregor Zattler

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).