Commit Graph

70 Commits

Author SHA1 Message Date
8d1919cd36 mu4e: clean up temp file handling
Use a temp file directory per mu4e session

Remove files when a buffer is closed, not after 30 secs
2026-08-20 15:05:30 -07:00
008529696a mu4e: remove emacs < 28.1 shims
We can depend on more functions now, so can get rid of our own versions.
2026-08-20 15:05:30 -07:00
cbe64d4cae mu4e: emacs 28.1 modernization
We can now use setq-local, length>, string-empty-p, affixations
functions and "choice" defcustoms.
2026-08-20 15:05:30 -07:00
dca5334295 Remove unnecessary eager loads of ido 2026-08-20 15:05:29 -07:00
e1e64db7f0 mu4e: update docs 2026-08-20 15:05:29 -07:00
93a6e73940 mu4e: improve mime-type display
Better handle some 'special' MIME-types where we need a tiny bit of
processing/special casing to invent a proper file-name.

Include size information when displaying the MIME-types in the actions
menu.
2026-08-20 15:05:29 -07:00
1dc02a72ac mu4e: support icons for mime-types
In mu4e-view-mime-part-action, support icons or, well, "icons".

For this to work user needs to install a package like nerd-icons and set
mu4e-file-name-to-icon-function to #'nerd-icons-icon-for-file. (see
docstring for details)
2026-08-20 15:05:29 -07:00
7b42f1ee77 mu4e: clean up some unneeded backports
Remove some functions we no longer need with Emacs 28.

There's still some things left, which will be handled in due time.
2026-08-20 15:05:28 -07:00
f7448ff7b5 mu4e-helpers: restore missing mu4e-get-time-date
It was in use in mu4e-headers-custom-markers, but somehow got lost back in 2021,
it seems. Restore it.

Fixes #2879.
2026-08-20 15:04:27 -07:00
54ec919e8f mu4e: allow mu4e-get-mail-command to be a function
For making it easier to influence the behavior.
2025-07-05 11:04:37 +03:00
acef5b2381 mu4e: implement mu4e-emacs-bookmark-policy
Allow for creating Emacs bookmarks for either messages (as before & the
default), queries or as the user.
2025-05-21 22:23:26 +03:00
e39e135e67 mu4e-plist-put: add to existing keys 2025-05-08 09:25:17 +03:00
faea3c35ad mu4e-helpers: tweak plist filtering
A little refactoring
2025-04-17 00:11:50 +03:00
e79874aafb mu4e-helpers: make mu4e-plist-put-many non-destructive 2025-04-16 23:46:21 +03:00
5951c387b3 mu4e-helpers: fix mu4e-plist-put-many
mu4e-plist-put-many was very broken, but somehow mu4e still somewhat
worked.
2025-04-16 09:36:45 +03:00
6f228fc505 mu4e: clean up mu4e--make-query-items
Automatically copy all key-values from the source item.
2025-04-12 15:07:28 +07:00
a15e640eb7 mu4e: implement :hide-if-no-unread
Make mu4e-maildir-shortcut and mu4e-bookmarks understand a property
:hide-if-no-unread~, which hides the maildir/bookmark from the main-view
if there are no unread messages which the corresponding query.
2025-03-08 11:57:58 +02:00
0f49fa055c mu4e: add mu4e-analyze-last-query
Add some mu4e command to show the query as analyzed by the server.
2025-01-08 22:12:47 +02:00
b4adf328f4 mu4e: use if-let*, when-let*
Avoid the silly byte-compilation warning
2024-10-28 21:50:49 +02:00
89f2162729 mu4e-draft/helpers: use newer message-hide-headers
It seems the older (<= emacs 28 at least) message-hide-headers caused
trouble when editing drafts with mu4e in some cases.

So use the _newer_ version of this function, imported as
mu4e--message-hide-headers.

Fixes #2661.
2024-09-03 23:02:35 +03:00
b9cf667be9 mu4e-helpers: cosmetics
Whitespace etc. fixes
2024-09-03 23:02:35 +03:00
ecca83528c mu4e-compose: rework mu4e-compose-goto-(bottom|top)
For backward compat.
2024-03-15 20:33:23 +02:00
a6c78ab133 mu4e-helpers: fix mu4e-keymap-set for older emacs 2024-03-15 20:09:52 +02:00
a1001a915d mu4e-helpers: check for key-valid-p
It's not available in older emacsen.
2024-03-15 19:47:37 +02:00
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
acc4b28eeb mu4e-helpers: fix some typos 2024-02-26 18:30:54 +02:00
8c1466773f mu4e: get rid of mu4e-is-mode-or-derived-p
derived-mode-p is enough
2023-12-06 20:30:47 +02:00
4392d4e308 Fix completion w other keys than quick key 2023-10-18 16:25:52 +02:00
8fc13ab8f3 mu4e: Shorten descriptions a bit 2023-09-20 22:31:19 +03:00
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
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
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
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
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
4b0a6c763c mu4e-helpers: improve completion docstrings 2023-02-18 11:56:58 +02:00
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
51ba56cf6e mu4e-helpers: import new/mu4e--read-char-choice
Starting point; see issue #2157.
2023-02-16 21:22:37 +02:00
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
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
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
abf0e259a2 mu4e: implement mu4e--file-name-concat 2023-01-26 21:35:18 +02:00
85d2fdcdd7 mu4e: ignore bookmarks/maildirs without characterp keys 2023-01-19 22:37:50 +02:00
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
17b7790686 mu4e: handle the new queries command responses 2023-01-07 15:40:30 +02:00
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
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
b8861cdbfe mu4e-helpers: fix whitespace
Follow .dir-locals.
2022-12-11 13:59:26 +02:00
04903c568d Move defcustoms to mu4e-window.el 2022-12-09 09:01:18 +00:00
37e8328975 mu4e-loading-mode is now a minor mode 2022-12-03 17:13:20 +00:00
55a7e21c4a Merge branch 'djcb:master' into feature/improve-window-buffer-handling 2022-12-01 07:35:30 +00:00