emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: [PATCH] Always return refreshed category


From: Julien Danjou
Subject: [Orgmode] Re: [PATCH] Always return refreshed category
Date: Thu, 23 Dec 2010 17:03:00 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

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.

-- 
Julien Danjou
❱ http://julien.danjou.info

Attachment: pgp5LGfmFrw1L.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]