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.
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.
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'.
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.
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)
```
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.
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.
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.
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.
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`.
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.
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.
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.
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.
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>
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)
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+.
* 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.
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.
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.
Previously both cl-lib.el and cl.el were used, now use only cl-lib.el.
Use lexical-binding where needed instead of requiring cl just for
`lexical-let`.
Replace some add-to-list with cl-pushnew as add-to-list is not
recommended in lisp program and anyway doesn't work properly with
lexical binding.