Commit Graph

298 Commits

Author SHA1 Message Date
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 cc32257f1c mu4e: improve search/rendering benchmark
Include numbers for search from start to finish.
2022-04-16 16:20:38 +03:00
Dirk-Jan C. Binnema a66fd4dae4 mu4e-headers: warn earlier when message does not exist
check path before trying to show it.
2022-02-13 12:04:47 +02:00
Dirk-Jan C. Binnema 99993bea69 mu4e-headers: tweak mark-as-orphan option
Make 'first the default, and some whitespace fixes.
2022-02-06 10:44:47 +02:00
Dirk-Jan C. Binnema 769ad20c40
Merge pull request #2203 from mhcerri/mu4e-headers-thread-mark-as-orphan
mu4e-headers: Add mu4e-headers-thread-mark-as-orphan option
2022-02-06 10:41:28 +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
Marcelo Henrique Cerri 74437b6374 mu4e-headers: Add mu4e-headers-thread-mark-as-orphan option
To mark only the first message in the thread as orphan, allowing to
replicate the thread structure used by mutt and other clients.
2022-01-19 16:59:38 -03:00
Dirk-Jan C. Binnema a6b996d00e search: restore jump-to-message
Fixes: #2169.
2022-01-18 17:00:01 +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
Tassilo Horn c14ffa2918 Add eldoc support in headers views
When using a side-by-side split layout, i.e., headers left of message view, it
easily can happen that parts of the headers (like a longer subject) are not
visible without horizontal scrolling.  So eldoc to the rescue, which can echo a
customizable message (see `mu4e-headers-eldoc-format`) containing stuff like
subject, from, to, date, etc. in the echo area.
2021-12-15 21:21:41 +01:00
Dirk-Jan C. Binnema aebec9714b mu4e-headers: save-excursion when updating message
Otherwise, the updated header may end up in the wrong buffer.

Fixes: #2172.
2021-10-31 11:42:50 +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 bd40ffa718 mu4e-headers: fix updated check (for auto-update)
The check for # of updated messages was wrong; fix it.

Fixes: #2163.
2021-10-26 14:13:34 +03:00
Dirk-Jan C. Binnema 8ad5fd49c9 mu4e: support batched query results
Support the new batched query results from the mu server; these are much faster
to render (2-3x it seems).

Rearrange the code a bit to avoid byte-compiler warnings.

Obsolete mu4e-header-func, to be replaced by mu4e-headers-append-func.
2021-10-22 08:33:51 +03:00
Dirk-Jan C. Binnema f3e3cc9ca2 mu4e: always run mu4e-index-updated-hook after index
Fire mu4e-index-updated-hook after any index operations, where anything changed
or not. Add a new variable `mu4e-index-update-status' which can be used to see
what changed (if anything) in the last indexing operation.

Keep mu4e-message-changed-hook in place; it only fires when a message
changed (and when it is update).

Remove the long-obsolete `mu4e-msg-changed-hook'.
2021-10-22 08:33:51 +03:00
Dirk-Jan C. Binnema 701ca75536 mu4e/server: split message / metadata
Split message and metadata, so we can use pristine (possibly pre-cached)
messages. Update dependencies.
2021-10-20 22:41:48 +03: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 a8ddc1728d
Merge pull request #2147 from tsdh/mu4e--update-buffer-fix
Fix refs to mu4e~update-buffer which has been renamed to mu4e--update-buffer
2021-09-30 15:39:17 +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 1bf3054167 Fix refs to mu4e~update-buffer which has been renamed to mu4e--update-buffer 2021-09-29 21:21:35 +02: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
Christophe Troestler a12b44f3a3 mu4e-headers: Avoid the obsolete command warning 2021-09-08 09:24:14 +02:00
Dirk-Jan C. Binnema f797acca6b mu4e-headers: support mailings lists
Need to require mu4e-lists.
2021-08-30 08:39:25 +03:00
Dirk-Jan C. Binnema dc14f93c06 mu4e: remove mu4e-utils
No longer needed; remove all traces.
2021-08-30 08:36:41 +03:00
Dirk-Jan C. Binnema a6514fd683 mu4e-server: rename from mu4e-proc
Rename mu4e-proc.el into mu4e-server.el

Rename mu4e~proc... into mu4e--server...

Update users, too.
2021-08-29 21:40:42 +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 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