Re: [PATCH v3 1/4] emacs: Let the user choose where to compose new mails

Subject: Re: [PATCH v3 1/4] emacs: Let the user choose where to compose new mails

Date: Mon, 23 Apr 2012 00:25:38 +0200

To: David Bremner, Jameson Graef Rollins,


From: Thomas Jost

Le 15 avril 2012 à 16:52 CEST, David Bremner a écrit :
> Jameson Graef Rollins <> writes:
>> I think the issues that David was experiencing have to do with flakiness
>> in emacs's dedicated windows, not in this patch itself.
> Thomas,
> Did you have a change to investigate this as proposed in
> id:""?


Sorry for the delay. I did investigate a little bit, but I did not try
to write a patch to fix the wrong behaviour in Emacs 23.

AFAICT, Emacs 23 is just buggy in this case. By reading the code of
message-send-and-exit and message-bury [1], here is what happens when
you call message-send-buffer-and-exit with message-kill-buffer-on-exit
set to nil:
- message is sent
- buffer is buried with burry-buffer
- message-bury: if the window is dedicated and its frame not the only
  visible frame, then this frame is deleted

which explains what happens in Emacs 23 both in daemon and non-daemon

In Emacs 24 [2], here is what happens:
- message is sent
- message-bury: buffer is buried with bury-buffer

which is (obviously?) correct.

Really, this looks like a bug in Emacs 23 to me. Emacs 24 has been fixed
by Gnus commits [3] and [4] (maybe [3] is enough, I didn't try). Users
of Emacs 23 can probably just use an up-to-date version of Gnus to have
this issue fixed.

So I'm not sure it would make sense to try to come up with a workaround
in my patch, nor if it would be worth it. Maybe just adding a message
suggesting Emacs 23 users to enable message-kill-buffer-on-exit if they
use the Gnus version shipped with Emacs?

Other than that, Jameson's commit [5] is exactly the same as the one in
my tree with a better commit message, so I'm in favor of pulling it.

[5] id:""


part-000.sig (application/pgp-signature)