all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Olum <kdo@cosmos.phy.tufts.edu>
To: emacs-devel@gnu.org
Subject: sent mail buffers not thoroughly buried
Date: Mon, 06 Jan 2014 19:39:58 -0500	[thread overview]
Message-ID: <q52ppo4iq01.fsf@cosmos.phy.tufts.edu> (raw)

After you have sent a message in message mode, sometimes the sent mail
buffer gets reselected when it shouldn't.  A specific sequence of
events that causes the problem is this:

Read mail in rmail.
Push "m" or "r" so that you have one window with your inbox and one
  with your unsent mail.  
Change buffers in the window with the inbox.
Send the mail that you're composing.  Now you get your inbox back in
  the window in which you were composing the mail.
Quit rmail.  The window that used to have your inbox will now have
  your sent mail.

The problem is in message-bury.  If you don't do anything special,
this function calls (with-current-buffer buffer (bury-buffer)), which
not only buries the buffer but removes it from the window-prev-buffers
list.  But rmail sets message-return-action so that your inbox gets
reselected when you're done sending the mail.  In that case,
message-bury calls (bury-buffer buffer), which does not remove the
buffer from the window-prev-buffers list.  Thus when you're done with
your inbox, that window goes back to what it was viewing before, which
is your sent mail.

Is there any good reason for this behavior in message-bury?  I propose
to change it to always do (with-current-buffer buffer (bury-buffer)).

                                        Ken



             reply	other threads:[~2014-01-07  0:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07  0:39 Ken Olum [this message]
2014-01-09 20:02 ` sent mail buffers not thoroughly buried Glenn Morris

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=q52ppo4iq01.fsf@cosmos.phy.tufts.edu \
    --to=kdo@cosmos.phy.tufts.edu \
    --cc=emacs-devel@gnu.org \
    /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.