all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jeffrey C Honig" <jch@honig.net>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: 23.1: Is delete-windows-on supposed to change the current buffer?
Date: Fri, 31 Jul 2009 11:49:52 -0400	[thread overview]
Message-ID: <14318.1249055392@schlepp.honig.net> (raw)
In-Reply-To: Message from martin rudalics <rudalics@gmx.at> on Fri, 31 Jul 2009 11:08:01 +0200.<4A72B471.5030701@gmx.at>

martin rudalics <rudalics@gmx.at> wrote:

> > I'm debugging a problem with mh-e with 23.1.  In particular
> > (mh-yank-cur-msg) in lisp/mh-e/mh-letter.el.
> >
> > In 23.1, unlike prior releases, this sequence changes the current
> > buffer:
> >
> >           (if mh-delete-yanked-msg-window-flag
> >               (delete-windows-on mh-show-buffer)))
> >
> > Is this change in behavior expected so that we should fix mh-e?  Or is
> > this a bug in emacs 23.1 that I should report?
> 
> What is your window configuration like before and after that form gets
> executed?

In my case (which is not standard mh-e as I pop up new frames for draft
buffers):

Before:
	Current buffer:
	     mh-sent-from-folder
	Main Frame:
	     mh-sent-from-folder
	     mh-show-buffer
	New Frame:
	    draft-1

After:
	Current buffer:
	     draft-1
	Main Frame:
	     mh-sent-from-folder
	New Frame
	    draft-1

So the surprise is that the current buffer changed at all.

The issue with the current buffer changing is that we are relying on
mh-show-buffer not changing, which is a buffer local variable.

This is easy to fix in mh-e.  But if this is an unexpected change in the
behavior of emacs it should probably be fixed there instead.

> `delete-windows-on' deletes all windows showing `mh-show-buffer'.  If,
> for example, `mh-show-buffer' is shown in the selected window and that
> window is the only window on its frame, and that frame is the only
> frame, another buffer is shown in that window and becomes the current
> buffer.  window_loop handles this as
> 
> 		    if (EQ (window, selected_window))
> 		      Fset_buffer (w->buffer);
> 
> unchanged since the past release.  A similar behavior applies when the
> frame can be deleted or there's another window on the frame.
> 
> Can you exclude that there was some change in the `mh-' part handling
> this?

This code has not changed in three years, so yes, something has changed
in emacs.

I've also been running the current mh-e code (from emacs CVS) with emacs
22 up until yesterday).

Thanks (谢谢).

Jeff

-- 
Jeffrey C. Honig <jch@honig.net>
http://www.honig.net/jch
GnuPG ID:14E29E13 <http://www.honig.net/jch/key.shtml>




  reply	other threads:[~2009-07-31 15:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30 22:13 23.1: Is delete-windows-on supposed to change the current buffer? Jeffrey C Honig
2009-07-31  9:08 ` martin rudalics
2009-07-31 15:49   ` Jeffrey C Honig [this message]
2009-07-31 16:11     ` martin rudalics
2009-07-31 17:11   ` Bill Wohler
2009-07-31 18:56   ` Stefan Monnier
2009-07-31 20:17     ` Bill Wohler

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14318.1249055392@schlepp.honig.net \
    --to=jch@honig.net \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.