emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Julien Danjou <julien@danjou.info>
Cc: emacs-orgmode@gnu.org, Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: [PATCH] Always return refreshed category
Date: Fri, 24 Dec 2010 10:46:28 -0500	[thread overview]
Message-ID: <87r5d7xjfv.fsf@fastmail.fm> (raw)
In-Reply-To: <sa3ei98fpe3.fsf@cigue.easter-eggs.fr> (Julien Danjou's message of "Thu, 23 Dec 2010 17:03:00 +0100")

Hi Julien,

Julien Danjou <julien@danjou.info> 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	other threads:[~2010-12-24 15:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 14:06 [PATCH] Always return refreshed category Julien Danjou
2010-12-23  7:43 ` [Accepted] " Carsten Dominik
2010-12-23  7:43 ` [PATCH] " Carsten Dominik
2010-12-23 15:42   ` Matt Lundin
2010-12-23 16:03     ` Julien Danjou
2010-12-24 15:46       ` Matt Lundin [this message]
2010-12-24 16:33         ` Carsten Dominik
2010-12-27 10:56           ` Julien Danjou
2010-12-27 14:23             ` Julien Danjou
2011-01-03  8:39               ` Carsten Dominik
2011-01-03 10:57                 ` Julien Danjou
2011-01-03 12:14                   ` Carsten Dominik
2010-12-24 16:33         ` Julien Danjou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r5d7xjfv.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=julien@danjou.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).