From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: [PATCH] org-agenda: Fix category string for agenda Date: Thu, 2 Dec 2010 14:37:54 -0500 Message-ID: <87d3pkvtz8.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=33190 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POF6V-0001yJ-P4 for emacs-orgmode@gnu.org; Thu, 02 Dec 2010 14:46:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POF6U-0000iA-Nr for emacs-orgmode@gnu.org; Thu, 02 Dec 2010 14:46:07 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:42088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POF6U-0000i5-IS for emacs-orgmode@gnu.org; Thu, 02 Dec 2010 14:46:06 -0500 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id EB2F2C0A for ; Thu, 2 Dec 2010 14:46:05 -0500 (EST) Received: from archeee (67-197-63-212.rh2.dyn.cm.comporium.net [67.197.63.212]) by mail.messagingengine.com (Postfix) with ESMTPSA id A59465E377C for ; Thu, 2 Dec 2010 14:46:05 -0500 (EST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode * lisp/org-agenda.el: (org-format-agenda-item) The value of org-category is not converted to a string unless it is defined. This fixes commit 3061c7083d8caa849cf2d3f2f53b8b71d45dd6de, which resulted in org-format-agenda-item always returning the symbol-name for org-category even if it was not defined. I.e., in some instances, org-format-agenda-item returned the string "nil", thus bypassing the buffer-file-name method of deriving the category. --- lisp/org-agenda.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 48856c9..c339f60 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5097,7 +5097,7 @@ Any match of REMOVE-RE will be removed from TXT." (let* ((category (or category (if (stringp org-category) org-category - (symbol-name org-category)) + (and org-category (symbol-name org-category))) (if buffer-file-name (file-name-sans-extension (file-name-nondirectory buffer-file-name)) -- 1.7.3.2