emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Paul Sexton <psexton@xnet.co.nz>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch] make 'org-save-outline-visibility' return a useful value
Date: Mon, 2 May 2011 09:44:04 +0200	[thread overview]
Message-ID: <84ADCA5E-43CF-4E35-B7F2-77CC63BE8C92@gmail.com> (raw)
In-Reply-To: <loom.20110422T050353-1@post.gmane.org>

Hi Paul,

I think this patch is buggy, if only because it introduces an extra
closing parenthesis.

I have applied a different version - please verify that it does
behave as intended.

- Carsten

On Apr 22, 2011, at 5:11 AM, Paul Sexton wrote:

> The macro 'org-save-outline-visibility' in org-macs.el seems like 
> it should return the value of the last statement in its body (like 
> save-excursion and save-restriction do). Instead it discards this
> value and returns nothing useful.
> The macro is only used in 2 places in the org sources, and its
> return value is ignored in both. I feel it would be more useful if 
> it returned the value of the last expression in its body. A patch 
> to this effect is attached.
> Paul
> --- C:/Users/paul/org-macs.el	Fri Apr 22 14:57:07 2011
> +++ C:/Users/paul/org-macs-new.el	Fri Apr 22 14:56:51 2011
> @@ -325,8 +325,9 @@
>   (declare (indent 1))
>   `(let ((data (org-outline-overlay-data ,use-markers)))
>      (unwind-protect
> +	 (prog1
> 	 (progn
> -	   ,@body
> +               ,@body)
> 	   (org-set-outline-overlay-data data))
>        (when ,use-markers
> 	 (mapc (lambda (c)

- Carsten

      reply	other threads:[~2011-05-02  7:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22  3:11 Paul Sexton
2011-05-02  7:44 ` Carsten Dominik [this message]

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:

  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=84ADCA5E-43CF-4E35-B7F2-77CC63BE8C92@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=psexton@xnet.co.nz \
    --subject='Re: [patch] make '\''org-save-outline-visibility'\'' return a useful value' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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