Comments (10)
No worries. We should continue support the window/frame switches in mu4e as display-buffer-alist
is a bit too complex, IMO, to expect people to set up out of the box.
Thanks for raising this issue. I think the diff you posted would work out OK. Can you raise a PR with it?
from mu.
@mickeynp: should we update mu4e-display-buffer
for this?
from mu.
FWIW, this worked for me:
@@ -285,22 +285,30 @@ for BUFFER-OR-NAME to be displayed in."
('(view . vertical) '((window-min-width . fit-window-to-buffer)))
(`(,_ . t) nil)))
(window-action (cond
- ((eq buffer-type 'main) '(display-buffer-full-frame))
+ ((eq buffer-type 'main) '(display-buffer-reuse-window
+ display-buffer-reuse-mode-window
+ display-buffer-full-frame))
((and (eq buffer-type 'compose) mu4e-compose-in-new-frame)
'(display-buffer-pop-up-frame))
((memq buffer-type '(headers compose))
- '(display-buffer-reuse-mode-window display-buffer-same-window))
+ '(display-buffer-reuse-window
+ display-buffer-reuse-mode-window
+ display-buffer-same-window))
((memq mu4e-split-view '(horizontal vertical))
- '(display-buffer-in-direction))
+ '(display-buffer-reuse-window
+ display-buffer-reuse-mode-window
+ display-buffer-in-direction))
((memq mu4e-split-view '(single-window))
- '(display-buffer-same-window))
+ '(display-buffer-reuse-window
+ display-buffer-reuse-mode-window
+ display-buffer-same-window))
;; I cannot discern a difference between
;; `single-window' and "anything else" in
;; `mu4e-split-view'.
- (t '(display-buffer-same-window))))
- (arg `((display-buffer-reuse-window
- display-buffer-reuse-mode-window
- ,@window-action)
+ (t '(display-buffer-reuse-window
+ display-buffer-reuse-mode-window
+ display-buffer-same-window))))
+ (arg `((,@window-action)
,@window-size
,direction
)))
from mu.
@djcb updating the function makes sense. Ideally, people would write their own display buffer actions to handle window display --- but that horse has bolted already.
Malb's patch seems like a good fit too. We'll just need to watch out for regressions in other areas.
from mu.
Is there a way to replace the display buffer actions, i.e. override the choices made in mu4e-display-buffer
?
from mu.
Yes, with display-buffer-alist
. That is the purpose of the new display logic in mu4e: to facilitate complete customisation by the user.
from mu.
Ah, I didn't get that! I thought a user can only add to but not supersede what is hardcoded in mu4e-display-buffer
. But reading the documentation of display-buffer
(sorry for failing to do that properly earlier), I see that display-buffer-alist
takes precedence over ACTION
. So perhaps the "correct fix" is to add a documentation entry showing how to achieve what e.g. I want above?
from mu.
Another issue is, unless I'm overlooking something here, that display-buffer-alist
is buffer name based but the compose buffers don't have a predictable name (they're named after the subject). This can be handled by writing a custom handler for ".*" but this adds complexity.
FWIW I do the latter in malb/frame-dispatch
in https://github.com/malb/emacs.d/blob/master/malb.org#dispatch-buffers-to-frames and malb/display-mu4e-draft-buffer
in https://github.com/malb/emacs.d/blob/master/malb.org#window-management-1
from mu.
I guess a few more examples in the documentation would help, and some mu4e-specific predicate functions to match various buffer types. I'm only slowly learning the magic of display-buffer-alist
...
from mu.
You can pass a function to display-buffer-alist
so it uses that to determine eligibility.
I've written about how to do that here for Magit (a million modes and different buffer names) and how to make windows "project-specific" using Emacs's project.el:
https://www.masteringemacs.org/article/demystifying-emacs-window-manager
So I agree with DJ that a simple mu4e-buffer-p
function that checks if it's any one of mu4e's modes would be useful. If only to save people some typing.
from mu.
Related Issues (20)
- [mu bug] Wrong type argument: char-or-string-p, nil with SOME attachments HOT 3
- [mu4e rfe] Duplicate Message Indication HOT 3
- [mu4e bug] Garbled headers when editing a saved msg with no body HOT 4
- [mu4e bug] mu4e-compose-pre-hook is broken in v1.12+ HOT 4
- [mu4e rfe] Save all attachments in one time HOT 2
- Unable to set bookmark from mu4e view HOT 1
- [mu4e bug] Saved drafts not deleted after send HOT 7
- Encoding issue for some types of emails HOT 8
- [misc] [mu4e] [documentation] Incomplete sentence on section `5.6.2 MIME-part actions` HOT 2
- [mu4e rfe] Adding mailing list commands HOT 1
- Broken `meson setup` command in `README.org`
- [mu4e rfe] Way to jump between fields in compose mode HOT 1
- [misc] [mu4e] [documentation] install instructions for HOT 1
- mu4e-compose-pre-hook not triggering anymore HOT 1
- [mu4e bug] How to silence tip on `user-mail address` HOT 2
- [misc] support a post imapnotify `mu index` while mu4e is running HOT 2
- [mu/mu4e bug] updates made via mu4e not visible to external mu queries anymore HOT 4
- [mu4e rfe] Opening attachments directly in external programs HOT 1
- [mu4e bug] mu loses track of messages marked as (un)read in mu4e HOT 5
- [mu4e bug] Attachments with identical name: mu4e-view-save-attachments can only save one HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mu.