[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: [PATCH] Always return refreshed category
From: |
Matt Lundin |
Subject: |
[Orgmode] Re: [PATCH] Always return refreshed category |
Date: |
Fri, 24 Dec 2010 10:46:28 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Hi Julien,
Julien Danjou <address@hidden> 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