emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Christoph Gaitzsch <privat@christophgaitzsch.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: 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	[thread overview]
Message-ID: <877fls716l.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <m2h9kwyej4.fsf@christophgaitzsch.de> (Christoph Gaitzsch's message of "Sun, 08 Nov 2015 11:24:47 +0100")

Hello,

Christoph Gaitzsch <privat@christophgaitzsch.de> 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

      reply	other threads:[~2015-11-08 19:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-08 10:24 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/)] Christoph Gaitzsch
2015-11-08 19:15 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fls716l.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=privat@christophgaitzsch.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).