Commit Graph

49 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema ecca83528c mu4e-compose: rework mu4e-compose-goto-(bottom|top)
For backward compat.
2024-03-15 20:33:23 +02:00
Dirk-Jan C. Binnema a6c78ab133 mu4e-helpers: fix mu4e-keymap-set for older emacs 2024-03-15 20:09:52 +02:00
Dirk-Jan C. Binnema a1001a915d mu4e-helpers: check for key-valid-p
It's not available in older emacsen.
2024-03-15 19:47:37 +02:00
Dirk-Jan C. Binnema 2929a82246 mu4e-helpers: add mu4e-keymap-set, fix warnings
keymap-set only appeared in Emacs 29, so add a stand-in for now.

Fix some flymake warnings.
2024-03-14 13:41:56 +02:00
Dirk-Jan C. Binnema acc4b28eeb mu4e-helpers: fix some typos 2024-02-26 18:30:54 +02:00
Dirk-Jan C. Binnema 8c1466773f mu4e: get rid of mu4e-is-mode-or-derived-p
derived-mode-p is enough
2023-12-06 20:30:47 +02:00
reindert 4392d4e308 Fix completion w other keys than quick key 2023-10-18 16:25:52 +02:00
Dirk-Jan C. Binnema 8fc13ab8f3 mu4e: Shorten descriptions a bit 2023-09-20 22:31:19 +03:00
Thierry Volpiatto 67c8ff75a7 Fix missing or incorrect descriptions in file headers
Try to make useful descriptions and use conventional --- to separate filename
from description.
2023-09-20 22:04:48 +03:00
Dirk-Jan C. Binnema 3b93863f15 mu4e: use mu4e-determine-attachment-dir
Make the old internal mu4e~get-attachment-dir a public function,
improve documentation. Update callers.
2023-07-16 13:19:35 +03:00
Sean Farley 91464002b8 mu4e-util: allow ESC to exit a choice selection
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.
2023-06-22 13:17:53 -07:00
Dirk-Jan C. Binnema 616282c4ad mu4e: add mu4e-listp for backward compat
The listp function was only added to emacs 29.

Fixes #2499.
2023-06-08 18:51:22 +03:00
Ruijie Yu e5b33c29d1 Fix defcustom type definitions
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 "'"
2023-04-01 15:59:16 +08:00
Dirk-Jan C. Binnema 4b0a6c763c mu4e-helpers: improve completion docstrings 2023-02-18 11:56:58 +02:00
Dirk-Jan C. Binnema 0c04300f61 mu4e-helpers: support completing-read for mu4e-read-option
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.
2023-02-16 21:22:37 +02:00
Al Haji-Ali 51ba56cf6e mu4e-helpers: import new/mu4e--read-char-choice
Starting point; see issue #2157.
2023-02-16 21:22:37 +02:00
Dirk-Jan C. Binnema 0354fa4fac mu4e-helpers: rework mu4e-read-option
Rework the mu4e-read-option code to be a bit easier to (re)use.
2023-02-16 21:22:37 +02:00
Dirk-Jan C. Binnema 6559f0f86e mu4e: show actual keybindings in main-view
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.
2023-02-11 17:50:58 +02:00
Dirk-Jan C. Binnema 491f9e91ff mu4e: rework mu4e--file-name-concat into mu4e-join-paths
We also need to handle slashes at the *start*.
2023-01-27 09:25:19 +02:00
Dirk-Jan C. Binnema abf0e259a2 mu4e: implement mu4e--file-name-concat 2023-01-26 21:35:18 +02:00
Dirk-Jan C. Binnema 85d2fdcdd7 mu4e: ignore bookmarks/maildirs without characterp keys 2023-01-19 22:37:50 +02:00
Dirk-Jan C. Binnema 3716e6da3b mu4e-modeline: only cache global items, improve layout
So buffer-local items get flushed out automatically when we leave the
buffers where the local items were specified.

Honor mu4e-modeline-max-width
2023-01-17 18:45:40 +02:00
Dirk-Jan C. Binnema 17b7790686 mu4e: handle the new queries command responses 2023-01-07 15:40:30 +02:00
Dirk-Jan C. Binnema ba5026e7dc mu4e: support showing 'baseline' query-results
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.
2023-01-01 15:01:08 +02:00
Dirk-Jan C. Binnema e453f20ade mu4e-helpers: allow passing key to mu4e-read-option
Can be useful for non-interactive use.
2022-12-11 14:09:26 +02:00
Dirk-Jan C. Binnema b8861cdbfe mu4e-helpers: fix whitespace
Follow .dir-locals.
2022-12-11 13:59:26 +02:00
Mickey Petersen 04903c568d Move defcustoms to mu4e-window.el 2022-12-09 09:01:18 +00:00
Mickey Petersen 37e8328975 mu4e-loading-mode is now a minor mode 2022-12-03 17:13:20 +00:00
Mickey Petersen 55a7e21c4a
Merge branch 'djcb:master' into feature/improve-window-buffer-handling 2022-12-01 07:35:30 +00:00
Mickey Petersen ef2c989e08 Clean up 2022-11-29 11:50:59 +00:00
Mickey Petersen 69a17bfcb9 Multiple buffer support and standardised window and buffer handling 2022-11-29 11:33:07 +00:00
Sean Allred 93f3a2da35 Teach mu4e-copy-thing-at-point about SHR links
This allows one to copy the link behind a link-widget instead of using
RET to open it.
2022-11-28 04:54:18 -06:00
Sean Allred 3375a95f24 Whitespace fix
Allow aggressive-indent-mode to do its thing.
2022-11-28 04:53:53 -06:00
Dirk-Jan C. Binnema ecc7cb65d3 mu4e: add mu4e--plist-get helper 2022-09-14 23:07:30 +03:00
Dirk-Jan C. Binnema 46476fc001 mu4e: add mu4e-copy-thing-at-point
Copy the thing (url or email) at point, similar to the feature in the
pre-gnus view. Bind to 'c' in the message-view.
2022-07-13 23:35:16 +03:00
Dirk-Jan C. Binnema 4a3069a5b5 mu4e-helpers: fix mu4e-is-mode-or-derived-p 2022-07-05 00:11:34 +03:00
Dirk-Jan C. Binnema 59022e066d mu4e: revamp emacs bookmark support
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.
2022-05-29 12:31:39 +03:00
Dirk-Jan C. Binnema cf0f72e4a4 mu4e: use mu4e-config instead of mu4e-meta
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.
2022-05-29 11:10:58 +03:00
Dirk-Jan C. Binnema a1f0c5e9eb mu4e: fix emacs-29 bytecompiler warnings
Wrong single quotes.
2022-05-28 00:51:08 +03:00
Dirk-Jan C. Binnema 45aec819f6 mu4e: updates for core changes
Deal with (name . email) --> (:name "boo" :email "boo@example.com")
Add support for the new "changed" field.
2022-05-05 01:40:17 +03:00
Dirk-Jan C. Binnema a4707afe12 mu4e: cleanups and flycheck fixes
- Remove some unused faces
- Fix some flycheck warnings
- Replace some `cl-` functions with `pcase` and `seq`
2022-01-23 14:27:00 +02:00
Dirk-Jan C. Binnema a4e5e3adf5 mu4e: attempt to delete loading window upon mu4e-error
When there's a mu4e-error, opportunistically delete the 'Loading..' window.
2022-01-15 10:44:03 +02:00
Dirk-Jan C. Binnema 81133c4022 mu4e: Fix typo 2021-10-28 09:16:44 +03:00
Dirk-Jan C. Binnema 4ecb59aed5
Merge pull request #2142 from tsdh/function-valued-mu4e-split-view
Allow a function as mu4e-split-view value
2021-09-30 15:38:43 +03:00
Tassilo Horn f7985103e0 Allow a function as mu4e-split-view value
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)
```
2021-09-25 13:51:44 +02:00
Thierry Volpiatto 20de2c8659
Fix `mu4e-get-view-buffer` (#2132)
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.
2021-09-23 07:43:14 +02:00
Dirk-Jan C. Binnema 9157d9102d mu4e-utils: refactor into mu4e-helpers, separate files
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.
2021-08-29 21:40:42 +03:00
Dirk-Jan C. Binnema 411b95acd7 vars: refactor variables
Remove some variables from mu4e-vars, and move them to where they are used.

Move some more items to mu4e-helpers.
2021-08-29 20:30:29 +03:00
Dirk-Jan C. Binnema d7055b7ed8 mu4e-helpers: split off from mu4e-utils
Create a new mu4e-helpers, which will usurp some of the parts mu4e-utils that do
not depend on other parts of mu4e.
2021-08-29 20:30:29 +03:00