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


[-- Attachment #1.1: Type: text/plain, Size: 924 bytes --]

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 #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2010-12-23 16:03 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 [this message]
2010-12-24 15:46       ` Matt Lundin
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=sa3ei98fpe3.fsf@cigue.easter-eggs.fr \
    --to=julien@danjou.info \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mdl@imapmail.org \
    /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).