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: Carsten Dominik
Subject: [Orgmode] Re: [PATCH] Always return refreshed category
Date: Fri, 24 Dec 2010 17:33:41 +0100

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 <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




reply via email to

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