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

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

bug#20832: 25.0.50; todo-show accidentally deleted my todo file.


From: Stephen Berman
Subject: bug#20832: 25.0.50; todo-show accidentally deleted my todo file.
Date: Fri, 19 Jun 2015 17:15:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

On Fri, 19 Jun 2015 08:43:50 +0200 martin rudalics <rudalics@gmx.at> wrote:

>> This is bad :'( It seems one should not change the buffer in a minibuffer
>> window. Perhaps it would be good if this was documented in
>> the docstring of set-window-buffer.
>
> You should use ‘set-window-buffer’ in application programs only if you
> know what you're doing.  From the Elisp manual:
>
>      When writing an application, you should normally use the
>      higher-level functions described in *Note Switching Buffers::,
>      instead of calling `set-window-buffer' directly.

Is this a change from previous policy?  In earlier versions of
todo-mode.el I had several instances of switch-to-buffer, but some time
ago replaced them with set-window-buffer and I'm pretty sure I did that
because I was given to understand that programmatic use of
switch-to-buffer was discouraged.  If this is no longer the case (or if
I was mistaken back then), I'll have check (when I have time) all of the
uses of set-window-buffer in todo-mode.el for unanticipated side
effects.

> While the minibuffer window is selected, ‘minibuffer-selected-window’
> can be used to get the previously selected window.

Thanks.

Steve Berman





reply via email to

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