diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el index bec7bf29..0434e9c3 100644 --- a/mu4e/mu4e-compose.el +++ b/mu4e/mu4e-compose.el @@ -1,3 +1,4 @@ +;; -*-mode: emacs-lisp; tab-width: 8; indent-tabs-mode: t -*- ;; mu4e-compose.el -- part of mu4e, the mu mail user agent for emacs ;; ;; Copyright (C) 2011-2012 Dirk-Jan C. Binnema @@ -401,7 +402,14 @@ the appropriate flag at the message forwarded or replied-to." (when (and (buffer-file-name buf) (string= (buffer-file-name buf) path) message-kill-buffer-on-exit) - (kill-buffer buf))) + (if (and mu4e-compose-in-new-frame (window-system)) + (progn + (switch-to-buffer buf) + (when (and (get-buffer-window buf) + (window-frame (get-buffer-window buf))) + (kill-buffer buf) + (delete-frame (window-frame (get-buffer-window buf)))) + (kill-buffer buf))))) ;; now, try to go back to some previous buffer, in the order ;; view->headers->main (if (buffer-live-p mu4e~view-buffer) diff --git a/mu4e/mu4e-draft.el b/mu4e/mu4e-draft.el index bb5e93cc..4fb76216 100644 --- a/mu4e/mu4e-draft.el +++ b/mu4e/mu4e-draft.el @@ -73,6 +73,12 @@ message; if nil, only do so when sending the message." :type 'boolean :group 'mu4e-compose) +(defcustom mu4e-compose-in-new-frame nil + "Whether to compose messages in a new frame instead of the +current window." + :type 'boolean + :group 'mu4e-compose) + (defun mu4e~draft-user-agent-construct () "Return the User-Agent string for mu4e. This is either the value of `mu4e-user-agent', or, if not set, a @@ -414,7 +420,9 @@ from either `mu4e~draft-reply-construct', or ;; path, but we cannot really know 'drafts folder'... we make a guess (progn (setq draft-dir (mu4e~guess-maildir (mu4e-message-field msg :path))) - (find-file (mu4e-message-field msg :path))) + (if (and mu4e-compose-in-new-frame (window-system)) + (find-file-other-frame (mu4e-message-field msg :path)) + (find-file (mu4e-message-field msg :path)))) ;; case-2: creating a new message; in this case, we can determing ;; mu4e-get-drafts-folder (progn @@ -424,7 +432,9 @@ from either `mu4e~draft-reply-construct', or mu4e-maildir draft-dir (mu4e~draft-message-filename-construct "DS")))) - (find-file draft-path)) + (if (and mu4e-compose-in-new-frame (window-system)) + (find-file-other-frame draft-path) + (find-file draft-path))) (insert (case compose-type (reply (mu4e~draft-reply-construct msg)) diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index 445b8ce2..3404fe90 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -3428,6 +3428,8 @@ Sending...done @end verbatim The first and final messages are the most important, and there may be considerable time between them, depending on the size of the message. +@item @emph{Is it possible to compose messages in a separate frame?} +Yes - set the variable @code{mu4e-compose-in-new-frame} to @code{t}. @item @emph{How can I apply format=flowed to my outgoing messages, enabling receiving clients that support this feature to reflow my paragraphs?} Plain text emails with @t{Content-Type: text/plain; format=flowed} can @@ -3486,8 +3488,8 @@ when sending a reply to some e-mail. This seems to be caused by @t{mu4e} is working on it. To prevent this, deactivate @t{notmuch} in your Emacs setup. @item @emph{The PDF-version of the manual does not show any of the non-ASCII -characters} - this is because, sadly, @t{texi2pdf} documentation system -does not support those. There is not much we can do about that. +characters} - this is because the @t{texi2pdf} documentation system does +not support those. There is not much we can do about that. @end itemize For a more complete list, please refer to the issues-list in the