From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Always return refreshed category Date: Fri, 24 Dec 2010 17:33:41 +0100 Message-ID: References: <1293026785-12467-1-git-send-email-julien@danjou.info> <74C83FF2-959A-4C7D-B161-0C333EEE36DD@gmail.com> <87d3osa42b.fsf@fastmail.fm> <87r5d7xjfv.fsf@fastmail.fm> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=50636 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWAaQ-0003yd-Fh for emacs-orgmode@gnu.org; Fri, 24 Dec 2010 11:33:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PWAaP-0000jf-AZ for emacs-orgmode@gnu.org; Fri, 24 Dec 2010 11:33:46 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:58006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PWAaP-0000jI-50 for emacs-orgmode@gnu.org; Fri, 24 Dec 2010 11:33:45 -0500 Received: by bwz16 with SMTP id 16so11169315bwz.0 for ; Fri, 24 Dec 2010 08:33:43 -0800 (PST) In-Reply-To: <87r5d7xjfv.fsf@fastmail.fm> 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: Matt Lundin Cc: Julien Danjou , emacs-orgmode@gnu.org Hi Matt, hi Julien, I have reverted the patch for now. It would be great if the two of you could continue to try to fix it before we make another attempt. Thanks - Carsten On Dec 24, 2010, at 4:46 PM, Matt Lundin wrote: > Hi Julien, > > Julien Danjou writes: > >> On Thu, Dec 23 2010, Matt Lundin wrote: >> >>> Another observation: org-refresh-category-properties returns t >> >> That's the 't' you see as category. >> >>> and thus >>> short-circuits the "or" here. Is the following perhaps the intended >>> behavior? >>> >>> diff --git a/lisp/org.el b/lisp/org.el >>> index e80d2fc..55f1bf1 100644 >>> --- a/lisp/org.el >>> +++ b/lisp/org.el >>> @@ -8143,8 +8143,8 @@ call CMD." >>> "Get the category applying to position POS." >>> (let ((pos (or pos (point)))) >>> (or (get-text-property pos 'org-category) >>> - (org-refresh-category-properties) >>> - (get-text-property pos 'org-category)))) >>> + (progn (org-refresh-category-properties) >>> + (get-text-property pos 'org-category))))) >>> >>> (defun org-refresh-category-properties () >>> "Refresh category text properties in the buffer." >> >> Good catch indeed, I missed a progn. > > With your original patch, I am also frequently seeing "???" as a > category in the agenda buffer. E.g., > > ???: In -1 d.: TODO Christmas gifts > wrapped :home: > > This occurs with files/entries that do not have an in-buffer category > statement (e.g, #+CATEGORY: or :CATEGORY:). > > Thanks, > Matt