unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* set_window_buffer
@ 2008-09-12 16:39 Richard M. Stallman
  2008-09-12 17:14 ` set_window_buffer Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Richard M. Stallman @ 2008-09-12 16:39 UTC (permalink / raw
  To: emacs-devel

    +2008-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
    +
    +	* window.c (set_window_buffer): Always preserve current-buffer.
    +

That may be a good change, but I suspect it leads to changes in Lisp
primitives that ought to be documented in NEWS and in the Lisp Manual.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: set_window_buffer
  2008-09-12 16:39 set_window_buffer Richard M. Stallman
@ 2008-09-12 17:14 ` Stefan Monnier
  2008-09-12 18:05   ` set_window_buffer martin rudalics
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2008-09-12 17:14 UTC (permalink / raw
  To: rms; +Cc: emacs-devel

>     +2008-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>
>     +
>     +	* window.c (set_window_buffer): Always preserve current-buffer.

> That may be a good change, but I suspect it leads to changes in Lisp
> primitives that ought to be documented in NEWS and in the Lisp Manual.

While nowhere does it say that the buffer is preserved, I couldn't find
any place where set-window-buffer is said to sometimes change
current-buffer (not even a vague hint).  I think this is a pure bug fix.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: set_window_buffer
  2008-09-12 17:14 ` set_window_buffer Stefan Monnier
@ 2008-09-12 18:05   ` martin rudalics
  2008-09-12 19:55     ` set_window_buffer Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: martin rudalics @ 2008-09-12 18:05 UTC (permalink / raw
  To: Stefan Monnier; +Cc: rms, emacs-devel

 >> That may be a good change, but I suspect it leads to changes in Lisp
 >> primitives that ought to be documented in NEWS and in the Lisp Manual.
 >
 > While nowhere does it say that the buffer is preserved, I couldn't find
 > any place where set-window-buffer is said to sometimes change
 > current-buffer (not even a vague hint).  I think this is a pure bug fix.

IMHO we should mention it in NEWS.  I suppose a couple of applications
not distributed with Emacs might rely on the faulty behavior.

martin





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: set_window_buffer
  2008-09-12 18:05   ` set_window_buffer martin rudalics
@ 2008-09-12 19:55     ` Stefan Monnier
  2008-09-12 21:23       ` set_window_buffer martin rudalics
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2008-09-12 19:55 UTC (permalink / raw
  To: martin rudalics; +Cc: rms, emacs-devel

>>> That may be a good change, but I suspect it leads to changes in Lisp
>>> primitives that ought to be documented in NEWS and in the Lisp Manual.
>> 
>> While nowhere does it say that the buffer is preserved, I couldn't find
>> any place where set-window-buffer is said to sometimes change
>> current-buffer (not even a vague hint).  I think this is a pure bug fix.

> IMHO we should mention it in NEWS.  I suppose a couple of applications
> not distributed with Emacs might rely on the faulty behavior.

I'd be really impressed if that's the case.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: set_window_buffer
  2008-09-12 19:55     ` set_window_buffer Stefan Monnier
@ 2008-09-12 21:23       ` martin rudalics
  0 siblings, 0 replies; 5+ messages in thread
From: martin rudalics @ 2008-09-12 21:23 UTC (permalink / raw
  To: Stefan Monnier; +Cc: rms, emacs-devel

 >> IMHO we should mention it in NEWS.  I suppose a couple of applications
 >> not distributed with Emacs might rely on the faulty behavior.
 >
 > I'd be really impressed if that's the case.

I probably can't impress you but in one routine I originally wrote for
Emacs 21 I found

;;; (defsubst set-window-buffer-only (window buffer &optional keep-margins)
;;;   "As `set-window-buffer' but don't change current buffer."
;;;   (let ((current-buffer (current-buffer)))
;;;     (set-window-buffer window buffer keep-margins)
;;;     (set-buffer current-buffer)))

so this already was a problem for me.  Later I apparently changed my
mind, used `set-window-buffer' instead, and had to fix this today again.
I recall a similar problem with `save-selected-window' which in certain
cases refused to restore the current buffer.

martin




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-09-12 21:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-12 16:39 set_window_buffer Richard M. Stallman
2008-09-12 17:14 ` set_window_buffer Stefan Monnier
2008-09-12 18:05   ` set_window_buffer martin rudalics
2008-09-12 19:55     ` set_window_buffer Stefan Monnier
2008-09-12 21:23       ` set_window_buffer martin rudalics

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

	https://git.savannah.gnu.org/cgit/emacs.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).