Commit Graph

273 Commits

Author SHA1 Message Date
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 e6bfdda2fe mu4e-headers: restore mark after update
Works-around, fixes: #2076.
2021-08-25 22:57:12 +03:00
Dirk-Jan C. Binnema 3ea20afe20
Merge pull request #2063 from nbarrientos/typo
Fix typo in docstring
2021-08-01 10:39:03 +03:00
Dirk-Jan C. Binnema 26bd64f4c9 mu4e-header: mark mu4e-headers-field-properties-function obsolete
The variable is an unused leftover.

Fixes: #2067.
2021-07-30 14:25:54 +03:00
Nacho Barrientos 02f3424280 Fix typo in docstring 2021-07-30 09:21:28 +02:00
Thierry Volpiatto 617e8023f6
Fix mu4e-headers-prev with invisible lines
Skip invisible text at BOL possibly hidden by
the end of another invisible overlay covering
previous EOL.

This patch affects people using mu4e-thread-folding-mode but change nothing
when using mu4e as it is.
2021-07-12 06:47:36 +02:00
DiGitHubCap d394295fe7 Fix #2044: broken header movement with visual-line-mode
This fixes the issue introduced by 50f6f539 where header navigation
would break when `visual-line-mode' was enabled. Previously,
`forward-line' was used in `mu4e-view-headers-next', which disregarded
visual lines and moved by logical lines, but this was changed to
`line-move', which moves by visual lines when `line-move-visual' is
non-nil (the default when `visual-line-mode' is enabled). Thus, when
the current header line was wrapped and a message was open in the
split view, `mu4e-view-headers-next' would move to the next visual
line in the headers buffer (the same message), and then jump back to
the start of the previous line, preventing switching to the next
message.

This would also throw off navigation when `mu4e-view-headers-next' was
used with a prefix argument, since it would move by visual lines and
not headers.

`line-move-visual' is therefore set to nil before using `line-move' to
prevent these issues.
2021-07-05 22:39:31 -04:00
Thierry Volpiatto 50f6f539f5
Ensure mu4e~headers-move honor line-move-ignore-invisible
This change is needed because forward-line doesn't honor this variable, more
generally visual lines.

Using `next-line` instead of `forward-line` allows this but it is more focused
on interactive use, so use `line-move` which handles visual lines without
warnings and return 0 or 1 just like `forward-line`.
2021-06-11 19:56:15 +02: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 cefd66159a mu4e-headers: use the mu engine thread-subject
Instead of handling in the headers (which were broken).  The messages
that are hidden are _slightly_ different than before.
2021-05-04 17:36:24 +03:00
Dirk-Jan C. Binnema d0d305b48f mu-headers: Tweak thread prefix
Avoids some confusion.
Fixes: #1994.
Fixes: #1933.
2021-05-02 23:30:32 +03:00
Christophe Troestler e00faf6cd3 mu4e-headers: Set the point in the correct frame after search
Fixes https://github.com/djcb/mu/issues/1977
2021-04-12 23:54:13 +02:00
Alex Bennée 285fdc5d5d mu4e/mu4e-headers: remove excess message output
When marking threads as read things are slowed down by echoing the
thread path to the mini-buffer. I assume this is left over debug but
if needed for something else should probably be a log call.
2021-03-31 10:04:03 +01:00
Dirk-Jan C. Binnema 2437dc27c9 mu4e: Replace mu4e-view-use-gnus with mu4e-view-use-old
Make mu4e-view-use-gnus obsolete (it's the default now), and add a
variable mu4e-view-use-old (which must be set before starting mu4e).

Update documentation / mentions.

Load the correct view when starting mu4e, so people can customize
e.g. the keymap.

Add some sanity checking.
2021-03-16 19:57:36 +02:00
Dirk-Jan C. Binnema 8d1175f511 mu4e: avoid some compiler warnings
(require) necessary things etc.

warnings for using "obsolete" code are still there since things should
work on emacs 25.3
2021-03-11 10:17:00 +02:00
Dirk-Jan C. Binnema fcf5a27347 mu4e-headers: Fix subthread marking
Fixes: #1930.
2021-03-04 21:58:25 +02:00
Tassilo Horn 7471536213 Read query with completion also when editing a bookmark
This wraps up some change that somehow didn't get applied when merging PR #1921
and also offers completion when editing a bookmark.

* mu4e/mu4e-headers.el (mu4e-headers-search): Read query with completion also
when editing a bookmark.
2021-02-17 16:26:47 +01:00
Dirk-Jan C. Binnema 9367a4dd95 mu4e-headers: sort threaded headers by date
In "threaded-mode", we only sort by date; reflect this in the UI.
2021-02-16 19:34:05 +02:00
Dirk-Jan C. Binnema 895f580b99 mu4e-headers: show search props in mode-line
I.e., whether a search is threaded/include-related/full.

There's high bike-shed potential, but let's not do that yet.
2021-02-12 20:39:49 +02:00
Dirk-Jan C. Binnema 2d91a9ab27 mu4e-headers: fix compiler warning
'free variable'

and use mu4e~ rather than mu4e--
2021-02-12 20:39:01 +02:00
Dirk-Jan C. Binnema 8405788f27 docs: update documentation
Update the mu-find man-page; update NEWS.org and mu4e.texi for the way
threading works.
2021-02-12 19:14:37 +02:00
Tassilo Horn 6632e6c7f3 mu4e-jump-to-maildir: offer editing the query when a prefix arg is given
Also refactor the now two usages of the query completion feature into a
separate function `mu4e-read-query'.
2021-02-03 14:49:05 +01:00
Dirk-Jan C. Binnema 9802ae9dc8 mu4e-headers: jump to message _outside_ save-excursion
Fixes: #1889.
2021-01-30 12:40:00 +02:00
Dirk-Jan C. Binnema 68a75c2c91 mu4e: make thread indicators a bit lighter
Make the symbols a bit less chunky
2021-01-22 23:24:53 +02:00
Dirk-Jan C. Binnema 362c53a7e7 mu4e: headers: fix some compiler warnings 2021-01-22 22:53:35 +02:00
Tassilo Horn 25beafbdd4 Implement completion for search query keywords and fixed values 2021-01-11 15:41:42 +01:00
Dirk-Jan C. Binnema aba0ab3629 mu4e: cosmetics 2020-12-06 13:20:13 +02:00
Thierry Volpiatto 0109172ad4
Use functions instead of lambdas in add-hook calls 2020-11-13 11:38:50 +01:00
Dirk-Jan C. Binnema f2e87ea2d4 mu4e: Add some timing info to mu4e-headers-precise-alignment
Add some time information. Things are a bit slower with the precise
alignment.
2020-10-26 11:23:09 +02:00
Dirk-Jan C. Binnema e3896de8a4 mu4e: add mu4e-headers-report-render-time
When mu4e-headers-report-render-time is set to non-nil, mu4e will report
on the time it took to render the headers view.
2020-10-24 14:51:04 +03:00
Dirk-Jan C. Binnema 4985f5c959 mu4e: Improve personal-address handling
Make mu4e-personal-address-p safe for being called with nil.

Upgrade code that used mu4e-user-mail-address-p to
mu4e-personal-address-p.

Update docs.

Add some more helpers to mu4e-message, and avoid some byte-compiler
warnings.
2020-10-19 22:39:25 +03:00
Yuri D'Elia 2967c49f5a Check for nil before calling mu4e-user-mail-address-p 2020-10-19 15:35:08 +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 9bf32e720b mu4e: add mu4e-headers-precise-alignment defcustom
Precise alignment is nice, but also noticeably slower than the
old (crude) alignment; so make it optional and turned off by default for
now.
2020-10-11 12:35:48 +03:00
Jeff Filipovits 8ce966778a Properly align variable-pitch faces in header view 2020-10-06 21:50:57 +03:00
Jerry Snitselaar 3a8fc95bfc mu4e-headers: allow pipe through shell from headers view
Being able to pipe through shell from the headers view is
convenient for some use cases, so wire it up to work.

Resolves #1752

Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
2020-07-29 10:52:17 -07:00
Dirk-Jan C. Binnema 3715bb0c5e mu4e-headers: optimize header writing a bit
Try to make writing out the headers in the headers buffer slightly
faster.
2020-06-26 19:24:40 +03:00
Dirk-Jan C. Binnema 3dc4b93989 mu4e/server: implement mark-as-read for (view ...)
Instead of a multi-step process to display an unread message (ie. get
the original, notice it's unread, then update it, replace the message
with update one etc.), we now handle that in the (view /./..) command on
the server side.

Simplifies things, and is faster (which could be noticeable, esp. if
e.g. signature verification is part of the process)
2020-06-13 16:56:41 +03:00
Dirk-Jan C. Binnema b8a2d1fd6c mu4e-headers: require mule-util for truncate-string-ellipsis
Seems this is needed in some setups. Not fully clear why, but harmless.

Fixes #1717.
2020-06-07 18:40:48 +03:00
Dirk-Jan C. Binnema b672f6bc1d mu4e: avoid trouble with truncate-string-to-width
Treatment of the 'ellipsis' parameter is a bit unclear, gave errors in
some cases.

Fixes #1716
2020-06-03 21:24:14 +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 1c88651f41 mu4e: remove easy-accounts / no-trash-providers for now
The code still has some problems, and the original author has moved
elsewhere (which is fine of course), but it's not ready enough for
1.4.... yet. So let's remove it for now and check again with 1.5+.
2020-05-18 18:56:15 +03:00
Dirk-Jan C. Binnema f016f257f9 mu4e: support 'no trash flag' for all mark-for-trash
Use a non-macro implementation for mu4e-(view|headers)-mark-for-trash,
and honor the no-trash flag.

Fixes #1687.
2020-05-16 12:43:23 +03:00
Jonas Bernoulli 564d892701 Fix typos 2020-05-12 23:56:55 +02:00
Giuseppe Fierro 08318af76c Fix mu4e-headers-mark-or-move-to-trash()
Fix mu4e-headers-mark-or-move-to-trash() to pick right trash folder when
:no-trash-flag option is used in a context.
2020-05-10 08:25:41 +02: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
Dirk-Jan C. Binnema e9fb70e50c mu4e: update documentation
Remove mentions of mu4e-user-mail-address-list.
2020-04-11 22:21:48 +03:00
Dirk-Jan C. Binnema 46ae663937 mu4e: use faster count queries, document differences
Use faster queries for counting read/unread messages; document why the
results might differ from what you get doing a normal search.
2020-03-15 01:23:01 +02:00