help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: display-buffer and save-current-buffer


From: Stefan Monnier
Subject: Re: display-buffer and save-current-buffer
Date: Sun, 26 Jul 2015 12:26:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>     (save-excursion
>       (todo-show)

This looks fishy.

>       (save-restriction
>         (save-current-buffer

This looks even more fishy.

>           (widen)
>           (copy-to-buffer todo-print-buffer-name (point-min) (point-max))

Clearly these two lines should go before save-current-buffer (since
they don't affect current-buffer).

>           (set-buffer todo-print-buffer-name)

After moving those two lines, this set-buffer can be combined with
save-current-buffer into with-current-buffer.

> Clearly, the intention is to show the buffer which was temporarily
> selected within the save-current-buffer form.  However no such thing
> happens;

Could it be that `interactive' is nil?

> Is there perhaps a known bug with the interaction of save-current-buffer
> and display-buffer in emacs 23.4 ?
      
No.  And the above fishiness should have no impact either.


        Stefan




reply via email to

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