You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
At present, I don't see how I can pass e.g. frame parameters to the mu4e-compose frame created by mu4e.
Describe the solution you'd like
An option to let display-buffer-alist do its thing. I suggest an additional option for mu4e-compose-switch: display-buffer-alist which translates to (mu4e--compose-switch-function) becoming a noop. In addition, I think switch-to-buffer in mu4e--compose-setup should be replaced by display-buffer.
Describe alternatives you've considered
I've patched this behaviour as follows:
Additional context
diff --git a/mu4e/mu4e-compose.el b/mu4e/mu4e-compose.el
index 082665a0..2830f9c9 100644
--- a/mu4e/mu4e-compose.el+++ b/mu4e/mu4e-compose.el@@ -776,13 +776,13 @@ Optionally, SWITCH determines how to find a buffer for the message
(mu4e--context-autoswitch parent mu4e-compose-context-policy)
(with-current-buffer
(mu4e--compose-setup-buffer compose-type compose-func parent)
- (funcall (or switch (mu4e--compose-switch-function)) (current-buffer))+ ;; (funcall (or switch (mu4e--compose-switch-function)) (current-buffer))
(unless (eq compose-type 'edit)
(set-visited-file-name ;; make it a draft file
(mu4e--draft-message-path (mu4e--message-basename) parent)))
(mu4e--compose-setup-post compose-type parent)
(setq buf (current-buffer))
- (switch-to-buffer buf)+ (display-buffer buf)
(let* ((msgframe (selected-frame))
(actions (list
(lambda () ;; kill frame when it was created for this
I then use:
(defunmalb/frame-dispatch (bufferalist)
"Assigning buffers to frames."
(cond;; a mu4e compose buffer
((eq (buffer-local-value'major-mode buffer) 'mu4e-compose-mode)
(malb/display-mu4e-draft-buffer buffer alist)
nil)
((eq (buffer-local-value'major-mode (current-buffer)) 'mu4e-compose-mode)
(malb/switch-away-from-special-and-tab (string-match-p".*helm.*" (buffer-name buffer)))
nil)
;; an mu4e buffer
((or (malb/mu4e-buffer-p buffer nil))
(malb/switch-to-mu4e)
nil)
;; this is not a mu4e buffer but we’re in the mu4e frame
((and (string-match"*mu4e*" (frame-parameternil'name))
(not (malb/mu4e-buffer-p buffer nil))
(not (malb/regexp-match-p malb/mu4e-buffer-allowed-regexps (buffer-name buffer))))
(malb/switch-away-from-special-and-tab (string-match-p".*helm.*" (buffer-name buffer)))
nil)
(tnil)))
I suppose when you let mu4e create the frame, it's a little too late to influence it; but gess what you could do is leave mu4e-compose-switch at its default, and handle the frame creation yourself with your display-buffer-alist customization?
I don't think I can do this at present. The buffer is currently shown before being in mu4e-compose-mode (in mu4e--compose-setup-post) and I thus struggle to come up with a rule to "catch it". If I could make mu4e--compose-switch-function a noop then I know how to make it work.
Is your feature request related to a problem? Please describe.
At present, I don't see how I can pass e.g. frame parameters to the mu4e-compose frame created by mu4e.
Describe the solution you'd like
An option to let
display-buffer-alist
do its thing. I suggest an additional option formu4e-compose-switch
:display-buffer-alist
which translates to(mu4e--compose-switch-function)
becoming a noop. In addition, I thinkswitch-to-buffer
inmu4e--compose-setup
should be replaced bydisplay-buffer
.Describe alternatives you've considered
I've patched this behaviour as follows:
Additional context
I then use:
and
with the desired effect.
See https://github.com/malb/emacs.d/blob/master/malb.org#dispatch-buffers-to-frames and https://github.com/malb/emacs.d/blob/master/malb.org#window-management-1
The text was updated successfully, but these errors were encountered: