On Sun, 25 Dec 2011 23:54:41 -0500, Aaron Ecay <aaronecay@gmail.com> wrote: > On Thu, 15 Dec 2011 19:50:36 -0400, David Bremner <david@tethera.net> wrote: > > I think the problem is related to emacsclient. > > > > With 'm' I have the following behaviour: > > > > emacs -q --daemon > > M-x notmuch (to load variable definitions) > > M-x customize-variable notmuch-mua-compose-in > > (select compose in new window, save for current session) > > M-x notmuch > > m ;; new window is opened as it should be > > C-c C-c ;; frame is closed. > > I just tried, and I cannot reproduce this behavior. IIUC, here is what > happened to you: you set nm-mua-compose-in to 'new-window. You began a > new message, this opened a new window as expected. Your emacs frame now > has two windows in it. You sent this message, which deleted the window > showing it. Your emacs frame was deleted as well, which made the other > window, showing notmuch-hello (or some other notmuch buffer, from which > you began writing the email message) disappear as well, unexpectedly. > Is this a correct description of what happened? > > Here’s the recipe I used for replicating: > > emacs -q --daemon > emacsclient -c > C-x b *scratch* > (add-to-list 'load-path "/path/to/notmuch/emacs/") C-j > (load-library "notmuch") C-j > C-x C-f /path/to/notmuch/emacs/notmuch-mua.el > M-x eval-buffer (in order to pick up changes not in byte-compiled file) > M-x customize-variable notmuch-mua-compose-in (set to 'new-window, save for session) > M-x notmuch > m (new window is created in current frame, below the window showing notmuch-hello) > (type mail) > C-c C-c (enter smtp settings, since emacs doesn’t know them) > (new window disappears, the window with notmuch-hello fills whole frame) I've used something like this (+setting message-send-mail-function, sendmail-program, sendmail extra arguments, message-signature and notmuch-fcc-dirs) and done the following tests: - Emacs 23.3 vs Emacs 24.0.92 (23.3 from Arch [extra] repo, 24.0.92 compiled from AUR emacs-pretest package) - with and without --daemon - setting message-kill-buffer-on-exit to nil and t In every case, the new mail composition window opened correctly next to the notmuch-hello window. Here is what I got after successfully sending a test mail in every situation: - when message-kill-buffer-on-exit is "t": * E23: mail buffer killed, window closed, frame still there (OK) * E23 daemon: same thing (OK) * E24: same thing (OK) * E24 daemon: same thing (OK) - when message-kill-buffer-on-exit is "nil": * E23: mail buffer buried, window still there, frame still there * E23 daemon: frame was killed after sending. When restarting emacsclient: buffer buried but still there * E24: mail buffer buried, window closed, frame still there (OK) * E24 daemon: same thing (OK) So basically everything works as expected when mkboe is "t", and there are issues with Emacs 23 when mkboe is "nil". I'm very sorry for these issues, I should have done more testing with mkboe set to "nil", and I don't think I tested Emacs 23 at all with the latest versions of this patch. I'll try to fix that and post a new patch in a few days. Best regards, -- Thomas/Schnouki