From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Gaitzsch Subject: 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 11:24:47 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvN9Z-00022Q-Nl for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 05:24:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvN9W-00018h-JF for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 05:24:53 -0500 Received: from wp173.webpack.hosteurope.de ([80.237.132.180]:55200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvN9W-00018W-Cu for emacs-orgmode@gnu.org; Sun, 08 Nov 2015 05:24:50 -0500 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. ------------------------------------------------------------------------ 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))) Emacs : GNU Emacs 24.5.1 (x86_64-apple-darwin15.0.0, NS apple-appkit-1404.13) of 2015-11-07 on hal9000.local Package: Org-mode version 8.3.2 (8.3.2-10-g00dacd-elpaplus @ /Users/cg/.emacs.d/elpa/org-plus-contrib-20151005/)