[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug: org-batch-agenda will not search for tags of length 2 [8.3.
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Bug: org-batch-agenda will not search for tags of length 2 [8.3.2 (8.3.2-10-g00dacd-elpaplus @ /Users/cg/.emacs.d/elpa/org-plus-contrib-20151005/)] |
Date: |
Sun, 08 Nov 2015 20:15:14 +0100 |
Hello,
Christoph Gaitzsch <address@hidden> writes:
> Calling e.g. (org-batch-agenda 'ab') will report "Invalid agenda key"
> instead of printing headlines with tag "ab".
>
> To fix, change the macro line 10 to
>
> (defmacro org-batch-agenda (cmd-key &rest parameters)
> "Run an agenda command in batch mode and send the result to STDOUT.
> If CMD-KEY is a string of length 1, it is used as a key in
> `org-agenda-custom-commands' and triggers this command. If it is a
> longer string it is used as a tags/todo match string.
> Parameters are alternating variable names and values that will be bound
> before running the agenda command."
> (org-eval-in-environment (org-make-parameter-alist parameters)
> (let (org-agenda-sticky)
> (if (> (length cmd-key) 1) ;; CHANGE HERE TO 1
> (org-tags-view nil cmd-key)
> (org-agenda nil cmd-key))))
> (set-buffer org-agenda-buffer-name)
> (princ (buffer-string)))
Applied. Thank you.
Regards,
--
Nicolas Goaziou