Commit Graph

98 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema 39d7096bba mu4e-main: rewrite mu4e--main-menu
The old one had bit-rotted quite a bit.

Fixes #2296.
2022-07-07 00:52:32 +03:00
Dirk-Jan C. Binnema a1f0c5e9eb mu4e: fix emacs-29 bytecompiler warnings
Wrong single quotes.
2022-05-28 00:51:08 +03:00
Daniel Fleischer eebb0eddd6 Last updated timestamp in the main screen
* mu4e/mu4e-main.el: showing last updated

based on the `:tstamp` of `mu4e-index-update-status` plist.
2022-04-18 19:06:54 +03:00
Dirk-Jan C. Binnema cc3be78dc5 mu4e-main: use mu4e~headers-jump-to-maildir
Re-fix hasty earlier fix; and improve the code a bit.

HT: @tsdh.
2022-01-29 19:53:37 +02:00
Dirk-Jan C. Binnema b8e696000f mu4e-main: fix jump-to-maildir typo
Fixes: #2206
2022-01-29 15:55:51 +02: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 5d155841a6 mu4e: Use mu4e-query-rewrite-function
The (new) mu4e-search-query-rewrite-function is a bit too long, let's keep the
old one.
2021-10-31 11:26:58 +02:00
Dirk-Jan C. Binnema 5db8fdc49d mu4e: Do not defvar abbrev tables
I'm not quite sure why it was done in the first place, and it seems to have
unwanted side-effects. So let's turn it off and see if anything breaks.

Fixes: #2146.
2021-10-06 08:11:30 +03: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 3cd127d8ae mu4e-search: split off search functionality in minor-mode
Split off the search functionality from mu4e-headers.el into a new
mu4e-search.el.

Clean up things a bit and create a minor mode in which to add the keybindings.

Enable this in main/headers/view.
2021-08-29 20:30:29 +03:00
Dirk-Jan C. Binnema 035977a89a mu4e-context: make it a minor-mode
Add mu4e-context-minor-mode, for re-use in other parts of mu4e.

Update those parts + documentation.
2021-08-29 20:30:29 +03:00
Dirk-Jan C. Binnema f69214b4df mu4e-main: refresh after context-switch
Fixes: #2062.
2021-07-29 23:24:13 +03:00
Salman Mohammadi 539a946aa4
mu4e/*: fix license notice at the start of source files
At the start of mu4e/* files, the license has been wrongly attributed
to GNU Emacs instead of mu4e.

Fixes https://github.com/djcb/mu/issues/2019
2021-05-29 23:45:10 +02:00
Dirk-Jan C. Binnema b09b3cb2bb mu4e-main: fix hide-personal-addresses typo
Fixes #1879.
2021-01-03 14:58:28 +02:00
Tassilo Horn fe6cbf5949 Use mu4e-query-rewrite-function also for computing bookmark counts
Until now, the bookmark queries were sent to mu in their original form.  Thus,
if you have `mu4e-query-rewrite-function` set, the numbers shown next to the
bookmarks didn't reflect the actual number of query results you'd get when
opening a bookmark view.

With this commit, the `mu4e-query-rewrite-function` is applied and the result
is sent to mu for evaluation (in `mu4e~start`) and the likewise the rewritten
queries are used to find the matching one in the last query results (in
`mu4e~main-bookmarks`).

* mu4e/mu4e-utils.el (mu4e~start): Send the rewritten queries for evaluation to
mu.
* mu4e/mu4e-main.el (mu4e~main-bookmarks): Compare last mu query results with
rewritten queries.
2020-12-13 17:06:11 +01:00
Dirk-Jan C. Binnema 273eb822d5 mu4e: add mu4e-last-query-result[s]
This makes the most recent results from the queries (i.e. the numbers)
available using the supported 'mu4e-' API.

Fixes: #1845.
2020-12-06 14:48:46 +02:00
Dirk-Jan C. Binnema 5e069d9a6f mu4e: support regexp patterns for personal addresses 2020-10-17 15:38:24 +03:00
Dirk-Jan C. Binnema 73be015cd0 fixup: mu4e: some cleanups / bytecomp warning fixes 2020-05-28 10:21:16 +03:00
Dirk-Jan C. Binnema 454e8d9a3a mu4e: allow for hiding fully read maildirs/bookmarks
Add a variable mu4e-main-hide-fully-read to control whether to _not_ show
maildir / bookmark links if they're fully read.
2020-05-27 18:56:23 +03:00
Sean Farley 3ea1784aad mu4e-main: use `string-width' over `length'
Better for utf-8 but still difficult to align due to non-monospaced
characters.
2020-05-26 23:12:26 +03:00
Sean Farley d68c0fd5b5 mu4e-main: decode strings as utf-8
This fixes both bookmarks and maildirs with non-ASCII names. Thanks to
@scturtle for pointing this out!
2020-05-26 23:12:26 +03:00
Sean Farley 9f1e231824 mu4e-main: fix off-by-one error in `mu4e~main-action-str'
For bookmarks, which specify the key combo instead of using the first
character of the string had an off-by-one error in the mouse
highlighting since it wasn't consuming that first letter.
2020-05-26 23:12:26 +03:00
Sean Farley 5110b02349 mu4e-main: use longest bookmark/mailder count in bookmarks section 2020-05-26 23:12:26 +03:00
Sean Farley a070cca79d mu4e-main: add new method for constructing the maildir list
This method is exactly like `mu4e~main-bookmarks' but for maildirs
instead of bookmarks.
2020-05-26 23:12:26 +03:00
Jonas Bernoulli 564d892701 Fix typos 2020-05-12 23:56:55 +02:00
Manuel Argüelles 36701c9336 mu4e: change spacing in main view for info section
Change the spaces to tab to be consistent with the other entries in the
main view.
2020-05-08 11:24:31 -05:00
Dirk-Jan C. Binnema 1919146b94 mu4e: centralize mode-line context setting code
Add mu4e-context-in-modeline to handle all setting of context in the
mode-line, to address some corner-cases with the current setup.
2020-05-01 22:44:45 +03:00
Dennis Ogbe a153e08edb fix `mu4e-main-buffer-hide-personal-addresses' 2020-04-22 16:55:27 -04:00
Dirk-Jan C. Binnema 26fb011026 mu4e: main: don't use string-join, it's too new
Fixes #1636
2020-04-08 11:26:12 +03:00
Dirk-Jan C. Binnema abafd658d4 mu4e: show mu4e-personal-addresses, add check
Show the personal addresses in the main screen (allow hiding them with
mu4e-main-view-hide-addresses), as well as a check for the case where
user's user-email-address is not part of the personal addresses.
2020-04-06 20:52:24 +03:00
Dirk-Jan C. Binnema 6a294da2a1 mu4e-main: avoid calling mu4e-main-mode multiple times
once is enough
2020-04-05 23:53:55 +03:00
Dirk-Jan C. Binnema faef1792cc mu4e: improve documentation 2020-03-28 11:06:37 +02:00
Dirk-Jan C. Binnema 1c1dbaf882 mu4e: make mu4e-main-buffer-name a defvar
(and rename from mu4e~main-buffer-name)
2020-02-28 12:17:13 +02:00
Thierry Volpiatto b1369b6ad9
Fix mu4e-main revert-buffer-function and use it
* mu4e/mu4e-headers.el (mu4e~headers-quit-buffer): Refresh main buffer
when done.
* mu4e/mu4e-main.el (mu4e-main-mode-map): Don't bind "g" to mu4e, "g"
should be bound to revert-buffer (special-mode).
(mu4e-main-mode): No need to specify map.
(mu4e~main-view-real-1): New.
(mu4e~main-redraw-buffer): New.
(mu4e~main-view-real): Use them.
(mu4e~main-view): Take one more arg REFRESH.
(mu4e~main-toggle-mail-sending-mode): revert-buffer when done.
2020-02-21 08:33:07 +01:00
Jonas Bernoulli 74332947a0 mu4e: Split libraries into outline sections 2020-02-18 23:49:50 +02:00
Jonas Bernoulli 040c6578be mu4e: Place provide forms in their own sections
Use "_" as the title of that section so that it is less distracting
when sections are collapsed to get an overview of the library.

Using a separate section is useful because it reduces the risk of
accidentally into the middle of a library.
2020-02-18 23:49:50 +02:00
Jonas Bernoulli 6c58a311d1 mu4e: Add missing mandatory "FILE ends here" library footer 2020-02-18 23:49:50 +02:00
Jonas Bernoulli 83f0c9cea9 mu4e: Remove excess semicolons from library headers
Placing two semicolons on an otherwise empty line helps to logically
"connect" the surrounding "paragraphs", which in (only) some cases
makes sense.

Previously the three paragraphs of the permission statement were not
connected to each other like this, which is perfectly fine.  However
the preceding "This file is not part of GNU Emacs." line was connected
to the first paragraph, which does not make sense considering that the
latter is not connected two the second paragraph, which it relates to
more.

Once those two semicolons are gone, it also makes sense to remove
those from the second line.
2020-02-18 23:49:50 +02:00
Jonas Bernoulli 6790c0d015 mu4e: Fix indentation 2020-02-17 14:28:00 +01:00
Dirk-Jan C. Binnema e1e26d1da2 mu4e: update to use server maildir/database/addresses
Mkae mu4e-maildir and mu4e-personal-addresses obsolete, we get those
from the server.
2020-02-09 00:15:49 +02:00
Dirk-Jan C. Binnema ad5f7d8dad mu4e: make `mu4e` refresh itself
update using the 'ping' function, so read/unread counts get updated.

add a 'g' binding for the main-view.
2020-01-31 00:17:19 +02:00
Dirk-Jan C. Binnema dd98203d42 mu4e: fix some compiler warnings 2020-01-28 01:03:40 +02:00
Thierry Volpiatto b51246d645
Rewrite mu4e~main-bookmarks to have bookmarks aligned
* mu4e/mu4e-main.el (mu4e~main-bookmarks): Do it.
2020-01-27 08:20:58 +01:00
Dirk-Jan C. Binnema 6f1513d187 mu4e: only show unread counts for stringp bookmarks
We can't generally do it for non-constant bookmarks.
2020-01-25 21:42:14 +02:00
Dirk-Jan C. Binnema a4265bb8e9 mu4e: include unread/all counts for bookmarks
Show the unread/all matches counts in the main-view.
2020-01-22 11:42:15 +02:00
Dirk-Jan C. Binnema d2ec85f01c mu4e: use the new command-parser
Update mu4e-proc to use the new mu4e <-> mu protocol
2020-01-22 11:42:15 +02:00
Dirk-Jan C. Binnema 1631d98b9e mu4e: support hiding bookmarks from main-screen/bookmarks
Using the :hide t property on a bookmark plist. The bookmark is still
available throught the completion mechanism.
2020-01-13 23:40:23 +02:00
Dirk-Jan C. Binnema c95cd3c1aa mu4e-main: fix indentation 2020-01-13 23:40:23 +02:00
Dirk-Jan C. Binnema 54c2a15ed0 mu4e: make mu4e-bookmarks items simple plists
We don't need cl-defstruct; simplify things a bit.
2020-01-13 23:40:23 +02:00
Jonas Bernoulli f31d1b065d Fix typos 2019-11-06 16:13:39 +01:00