GNU bug report logs - #20832
25.0.50; todo-show accidentally deleted my todo file.

Previous Next

Package: emacs;

Reported by: Nicolas Richard <youngfrog <at> members.fsf.org>

Date: Wed, 17 Jun 2015 05:41:02 UTC

Severity: normal

Found in version 25.0.50

Done: Stephen Berman <stephen.berman <at> gmx.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: Nicolas Richard <nrichard <at> members.fsf.org>, 20832 <at> debbugs.gnu.org
Subject: bug#20832: 25.0.50; todo-show accidentally deleted my todo file.
Date: Fri, 19 Jun 2015 17:39:49 +0200
>>       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.

Nothing has changed.  The term "normally" stands more or less for "when
you use ‘set-window-buffer’ you are supposed to know what you do".  This
is a low level function and should be allowed to set the buffer of any
window (like the minibuffer or a tooltip window) just as ‘window-buffer’
returns the buffer shown in any live window.

OTOH I don't recall any restrictions on using ‘switch-to-buffer’
programmatically.  Just that you should _not_ expect it to always use
the selected window.

martin





This bug report was last modified 10 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.