I occasionally find myself pressing escape to exit a menu choice in mu4e
and it's a bit unfortunate that nothing happens. As best I could tell,
since this is a C call, none of the keymaps are checked for
`(keyboard-quit)' so we need to explicitly check for ESC here
This was previously fixed in 02b5bc805c
but was inadvertently removed in
0354fa4fac, so more detail was added to
the comment.
So that the type definitions reflects the docstrings more closely. In additon,
fixed warnings from flymake about docstring.
* mu4e/mu4e-draft.el
mu4e-compose-keep-self-cc: should be a comma
* mu4e/mu4e-folders.el
mu4e-maildir-shortcuts: recognize new (plist) format
* mu4e/mu4e-helpers.el
mu4e-debug: removed unnecessary double space in docstring
* mu4e/mu4e-query-items.el
mu4e-query-rewrite-function: prepend "\\=" before column 0 "(" in docstring
* mu4e/mu4e-search.el
mu4e-search-sort-field mu4e-search-sort-direction: used radio in types
* mu4e/mu4e-server.el
mu4e-mu-binary: "mu" executable must exist
* mu4e/mu4e-view.el
mu4e-view-fields: fixed type
mu4e-view-actions: for function refs, prefer "#'" rather than "'"
Instead of using mu4e's tradional completion UI, allow for delegating to
some implementation of completing-read.
Default
mu4e-read-option-use-builtin t
means that things work more-or-less as before.
Let the main-screen show a representation of the *actual* keybindings
rather than assuming the defaults.
For that to work, we need to invoke mu4e-main-mode earlier; add a new
hook mu4e-main-mode-rendered-hook which is invoked after rendering is
complete.
Add a few helpers for this to mu4e-helpers.
Add the concept of a query results baseline, i.e., the result for
bookmark-queries at some particular point in time. Later, we can compare
the results with the then-current query-results.
Show the delta in the main view. Add mu4e-reset-baseline-query-results
to reset the baseline to 'now'. By default, we automatically reset when
explicitly (interactively) going to the main-view, i.e., M-x mu4e.
The support for emacs in bookmarks in mu4e-contrib has been broken for a while;
we removed it an now re-implement it as part of mu4e-proper.
Fixes: issue #2255.
All these changes to avoid:
,----
| mu4e/meson.build:92: WARNING: Source item '/home/djcb/Sources/mu/build/mu4e/mu4e-meta.el' cannot be converted to File object, because it is a generated file. This will become a hard error in the future
`----
This is because we want to byte-compile a file we just before generated using
configure_file. This does not seem like a crazy thing, but meson threatens with
breaking the build at some point in the future.
So instead, we decide _not_ to compile this (very boring) file. But, users may
still have an older mu4e-meta.elc lying around, leading to confusion.
So, let's rename that file and we're golden.
This allows to have a function returning a window as value of
`mu4e-split-view`. I'm using this patch since quite some time locally with the
following function.
```el
(defun th/mu4e-split-view ()
(let* ((headers (mu4e-get-headers-buffer))
(headers-win (and headers (get-buffer-window headers)))
(view (mu4e-get-view-buffer))
(view-win (and view (get-buffer-window view))))
(cond
;; There's a view window, just use it.
(view-win view-win)
;; Just one window, split sensibly, i.e., horizontally or
;; vertically depending on geometry.
((one-window-p) (split-window-sensibly))
;; Otherwise, use the tallest window.
(t (car (sort (delq headers-win (window-list))
(lambda (a b)
(> (window-height a) (window-height b)))))))))
(setq mu4e-split-view #'th/mu4e-split-view)
```
It actually returns a buffer-name whereas it should return a buffer
object which make `mu4e~switch-back-to-mu4e-buffer` fail because
`buffer-live-p` expects a buffer object.
Usurp more of the utils code than can be re-used without further dependencies in
helpers.
Split off specific parts in their own file.
After the helper/utils changes, update the rest of mu4e to take the changes into
account.