Commit Graph

379 Commits

Author SHA1 Message Date
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
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
Dirk-Jan C. Binnema d31dc8e69c mu4e: update menus
Avoid some gnus things we do not support. Rename View/Headers menu into Mu4e.
2020-03-05 20:50:51 +02:00
Dirk-Jan C. Binnema 0465b273d3 mu4e: avoid mu-side crypto in gnus-mode
No need to decrypt/verify when we don't use the results.
2020-02-28 00:43:08 +02:00
Dirk-Jan C. Binnema 6b2bdf4f6d mu4e: avoid some errors when flipping through messages
Use special-mode for the loading buffer, and explicitly ignore n/p.

Fixes #1443.
Fixes #1217.
2020-02-27 23:15:04 +02:00
Dirk-Jan C. Binnema 62bc45aaa7
Merge pull request #1581 from thierryvolpiatto/Fix_revert_buffer
mu4e-main: Fix revert buffer
2020-02-21 19:28:09 +02:00
Dirk-Jan C. Binnema 837ab0b703 headers: require proc-view even for gnus
Temporary measure, so e.g. view-in-browser works

Fixes #1579.
2020-02-21 19:26:39 +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
Dirk-Jan C. Binnema e10fc21a9b mu4e: Rename 'Unnamed' sections 2020-02-18 23:49:50 +02: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 15c6680037 mu4e: Add missing mandatory "Code:" section headers 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 dd140cb98a mu4e-headers: With gnus-view, avoid server calls
We can do it directly, since we only need the path to the message.
2020-02-09 18:06:04 +02:00
Dirk-Jan C. Binnema 00df8ce471 mu4e: headers: Fix some compiler warnings 2020-02-09 03:53:01 +02: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
Jonas Bernoulli f31d1b065d Fix typos 2019-11-06 16:13:39 +01:00
Dirk-Jan C. Binnema 4cb3ca3585 mu4e-headers: Improve docstring for 'mu4e-headers-results-limit'
Add a few notes on how the limit is used.
2019-10-20 14:28:41 +03:00
Thierry Volpiatto 9ddd035a1e
Completely use cl-lib and lexical-binding
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.
2019-09-14 12:39:51 +02:00
Zack Newman 2a51699ae5 mu4e: Update reference to obsolete variable in documentation 2019-06-19 13:30:17 -04:00
Christophe Troestler 939c066732 Fix mu4e~headers-remove-handler 2019-04-29 20:28:24 +02:00
Dirk-Jan C. Binnema 2ec1b46076
Merge pull request #1390 from Ambrevar/easy-accounts
mu4e: Easy accounts with make-mu4e-context-account
2019-04-17 22:59:30 +03:00
Kevin J. Foley 2108bbc1a4 Look at all frames for header buffer when auto updating headers 2019-03-11 18:21:13 -04:00
Pierre Neidhardt bbc055d75a mu4e: Implement mu4e-*-mark-or-move-to-trash (e.g. for Gmail) 2019-03-04 15:46:54 +01:00
djcb 31f73b32a7 mu4e: make mu4e~view-message buffer-local
So we don't leak it outside mu4e. `mu4e-message-at-point` should do the
right thing.
2019-02-25 21:49:41 +02:00
Dirk-Jan C. Binnema f57381bf4a
Merge pull request #1320 from jabranham/replace-cl-cl-lib
mu4e: Replace cl with cl-lib
2019-02-02 13:37:50 +02:00
Junyeong Jeong cc8a6c0c78 mu4e-headers.el: fix highlighting when headers window is not selected.
Highlighting target header is not working, when message view is selected and
mu4e-headers window is out of focus.

To fix this, call mu4e highlight function with mu4e-headers as current buffer.
2019-01-11 17:01:54 +09:00
Junyeong Jeong 3b9f9e5c39 mu4e-headers.el: fix for jumping specific message after search
While reading message using split view, search can be triggered after
automatic update and index. In this case, mu4e headers is not inside selected
window and mu4e-headers-goto-message-id fails to move window point of mu4e
headers.

To fix this, call set-window-point for mu4e headers window explitctly.
2019-01-11 16:24:40 +09:00
Alex Branham 2674ca5583
mu4e: Replace cl with cl-lib 2019-01-04 16:03:58 -06:00
djcb 82e7d7c65d mu: better handle updating mail being viewed
instead of the the 'noupdate', add 'noview', so the headers still get
update but we don't render unread mail twice.
2018-08-14 21:59:41 +03:00
Marcelo Henrique Cerri 94e9795d9d mu4e: Do not assume orphan messages can't appear in the middle of a thread
Do not clear the thread state when an orphan message is found.
2018-05-03 08:27:20 -03:00
Marcelo Henrique Cerri 26cd0a59ff mu4e: use special prefixes to describe orphan threads
Re-use `mu4e-headers-thread-orphan-prefix' for the prefix for the
first sibling in the orphan thread and add
`mu4e-headers-thread-single-orphan-prefix' as the prefix of single orphans.
2018-05-02 23:31:33 -03:00
Marcelo Henrique Cerri d8ca5a3d7b mu4e: remove reference to mu4e-headers-new-thread-style
The docs for the prefix variables mention the variable
"mu4e-headers-new-thread-style" that was removed on a previous
iteration.
2018-05-02 23:04:50 -03:00
djcb bef3113c09 mu4e: factor out mu4e~decrypt-p
Factor out defun to get decryption decision, so we can use it from
elsewhere.
2018-04-25 11:35:52 +03:00
Marcelo Henrique Cerri 0b38210549 mu4e: add support for mutt-like thread tree prefix 2018-04-24 22:34:43 -03:00
djcb 9ecc610e14 mu4e: some doc fixes 2017-11-04 15:06:45 +02:00
djcb f59c899ae5 mu4e: add mu4e-query-rewrite-function
Add a function that allows rewriting queries before they are issued.
2017-11-04 13:54:09 +02:00
Mekeor Melire 150234cb5f mu4e: fix bug preventing mu4e-headers-change-sorting to sort by list
The little bug was caused by a little confusion of the key for list-IDs.
Namely, we use `:list` and not `:list-id` for list-IDs.
2017-10-30 23:57:02 +01:00
djcb 3bc53af575 mu4e: show "Searching..." message
The new query-parser makes it easier to create queries that might take a
few seconds. qShow "Searching..." so the users knows what mu is doing.
2017-10-29 12:10:10 +02:00
djcb 68847f027f mu4e: support new query parser
maildirs with spaces
2017-10-26 21:31:50 +03:00
djcb 5d3d9e274f mu4e: update headers for new quoting
update for the new query parser
2017-10-25 23:50:17 +03:00
djcb 77b8f034e9 cosmetic 2017-09-17 14:02:14 +03:00
Dirk-Jan C. Binnema b9ddc8b708 Merge pull request #1109 from galaunay/Add-update-info-in-modeline
mu4e: Optionally, add info on update status in the modeline
2017-08-11 00:02:36 +03:00
djcb 0cfc23650b mu4e: cosmetics
fix whitespace
2017-08-10 23:32:10 +03:00
galaunay 513eb65388 Add info on update status in modeline 2017-07-19 13:01:30 +02:00
djcb 81294eb17b mu4e: allow sorting by list-id
Added support for sorting by mailing-list; note that this ultimately is
a sort by the 'list-id', so the items will be in that alphabetical
order, which is not necessarily the same as the order of the friendly
names.
2017-07-02 10:46:08 +03:00
Vladimir Sedach 6017ac46ce mu4e: Update single-window mode
Update mu4e~headers-quit-buffer and mu4e~main-menu.

mu4e~headers-quit-buffer in single-window mode now kills current buffer
instead of quitting mu4e.

mu4e~main-menu is updated to redisplay the main menu on context switch
or unknown keybinding, display errors in commands better, and to handle
C-g and ESC keys.

Thanks to Joost Kremers for the suggestions.
2017-06-24 12:54:21 +02:00
djcb cde35be271 Revert "Merge pull request #1099 from stsquad/fix-header-history"
This reverts commit ba75ef4b87, reversing
changes made to e735e70fa4.
2017-06-18 11:25:53 +03:00
Alex Bennée 9d06d72d6e mu4e: don't loose search history when editing search
Even though the user may be editing this expression there is no reason
to not have the mu4e~headers-search-hist present for the prompt. Emacs
will only replace it with system wide history which would likely
contain irrelevant history for the action.
2017-06-16 14:17:28 +01:00
Vladimir Sedach 9420d088eb mu4e: Added new mu4e-split-view mode: single-window
Single-window mode is meant to minimize mu4e window operations (opening,
killing, resizing, etc) and buffer changes, while still retaining the
view and headers buffers. In addition, it replaces mu4e main view with a
minibuffer prompt containing the same information.
2017-05-31 20:52:59 -07:00
Arne Köhn 47a046c662 advance after mark can now be disabled
The variable mu4e-headers-advance-after-mark can be set to nil if you
want to disable moving to the next mail after marking.
2017-04-25 16:40:41 +02:00
Dirk-Jan C. Binnema ff94595fad Merge pull request #1037 from wavexx/fix-duplicate-header-views
mu4e: Do not duplicate headers views in iconified/hidden frames
2017-02-21 09:46:43 +02:00
Yuri D'Elia 34ed757e11 Do not duplicate headers views in iconified/hidden frames
When the frame running mu4e is in another virtual desktop or iconified, but
still contains a visible headers buffer, do not attempt to create a new view.
2017-02-20 18:40:20 +01:00
Titus von der Malsburg 79ad110737 mu4e: Added menu items for untrash 2017-02-14 12:02:56 +01:00
djcb 05faceeb49 mu4e: some whitespace cleanup 2017-01-30 21:07:00 +02:00
djcb 4859cb802f mu4e: headers: don't clear too soon
Try burying header buffers a bit less aggressively.
2017-01-18 00:13:02 +02:00
djcb e0c21252c9 mu4e: clean up update handling
When we have a mu4e-headers window open and there's an update, try to
refresh it. If there's no open window, don't.
2017-01-16 23:45:14 +02:00
djcb 600955eebc mu4e: rename msg->message in mu4e-message-changed-hook 2017-01-15 15:41:16 +02:00
djcb e9b71af547 mu4e-headers: default to include-related / skip-duplicates
Probably better default options for most users.
2017-01-14 16:51:50 +02:00
Sébastien Le Callonnec c1c7bf44cf mu4e: Fix outdated docstring for `mu4e-headers-actions' 2016-12-18 10:38:50 +00:00
Jun Hao 59dfcb5ac5 mu4e: add mu4e-msg-changed-hook to mu4e-index-updated-hook globally 2016-12-11 21:22:44 +08:00
djcb 01fe899c37 mu4e: better error for non-supported header fields
Some fields (eg. :attachments and :user-agent) require a full message
and are not supported in headers-mode. Document this and give a clearer
error message when they are added to `mu4e-headers-fields'.

Fixes issue #933.
2016-11-05 12:42:28 +02:00
Dirk-Jan C. Binnema b981a7804f Merge pull request #934 from antoine-levitt/master
mu4e: Don't erase global-mode-string with context label, but add to it
2016-11-05 10:52:35 +02:00
djcb 739013d031 mu4e: allow maildir as sort-field 2016-10-26 22:36:40 +03:00
Antoine Levitt bc13cfda35 dont erase global-mode-string with context label, but add to it 2016-10-26 08:20:25 +02:00
Dirk-Jan C. Binnema dd1c0325f9 Merge pull request #912 from j-hao/master
mu4e: add mu4e-msg-changed-hook
2016-09-03 11:25:49 +03:00
djcb ae7f649a4a mu4e: avoid error return to same message
This avoids a runtime error. Fix by holtzermann17 for Issue #910.
2016-08-27 18:58:55 +03:00
Jun Hao 35c6d4ab8b mu4e: add mu4e-msg-changed-hook 2016-08-25 10:03:35 +08:00
djcb 49bc9605d8 mu4e: add mu4e-headers-hide-predicate
Add `mu4e-headers-hide-predicate', a function that allows for hiding
messages from the display. This can be used e.g. to hide trashed
messages.
2016-07-31 13:07:27 +03:00
djcb ed16684f45 mu4e: cosmetics 2016-06-08 19:25:52 +03:00
djcb e977309de5 mu4e: don't try to open non-existent messages
When processing header updates, don't try to open a message that doesn't
exist. Fixes issue #825.
2016-06-08 19:22:41 +03:00
djcb 3a7429456c mu4e: parenthesize narrowing term
When narrowing search results, parenthesize the narrowing term, so terms
with AND/OR etc. don't lead to surprising results.

Fixes #846.
2016-05-09 23:14:36 +03:00
Dirk-Jan C. Binnema 455a0731c0 Merge pull request #820 from tmalsburg/master
Mu4e: Added missing menu items.
2016-04-26 20:13:07 +03:00
djcb 1edeee4764 mu4e: fix typo -> mu4e~headers-msgid-target 2016-03-24 20:26:39 +02:00
Titus von der Malsburg 88df34cd96 Mu4e: Added missing menu items. 2016-03-22 23:33:07 -07:00
djcb 15f857afcc mu4e: try to jump to same message after re-search
After a re-search, perhaps after toggling threading etc., try to move
point to the same message it was before
2016-03-16 01:11:11 +02:00
djcb 1505da640d mu4e: add check for add-face-text-property
add-face-text-property was only introduced in emacs 24.4, so check
before use in mu4e-headers as do in mu4e-view.

Fixes issue #811.
2016-03-09 08:02:57 +02:00
djcb 7ac4921902 mu4e: improve mu4e-view-message-with-message-id
Now, when going to a message with certain message-id, do open a headers
buffer as well. This way, message opened this behave just like an other
message, and can be delete, flagged etc.

As a bonus, you get the whole message thread for a given
message (depending on settings)

mu4e-view-message-with-message-id now does a search and
mu4e-headers-search allow for some extra actions to open a specific
message in a hook function.
2016-02-23 23:19:54 +02:00
djcb 392880233f mu4e: rename to mu4e-headers-search-hook
The old name mu4e-headers-search-pre-hook was unnecessarily long.
2016-02-19 07:39:52 +02:00
Ævar Arnfjörð Bjarmason 14af0d28c8 mu4e-headers: Add hook executed when we're opening bookmarks (again)
This was merged in as part of pull request #718 but changed to a more
general facility in 7716e00.

It's fantastic that we have the more general hook facility for any
search, but the primary use-case I had for the bookmark hook can't be
satisfied by the more general mu4e-headers-search-pre-hook.

The reason I added this hook was to emulate the folders I used in
Icedove as mu4e bookmarks. E.g. some folders are threaded, others are
not. By default mu4e only allows you to set this globally via options
like mu4e-headers-show-threads.

So I have a mu4e-headers-search-bookmark-hook which is basically a long
line of cond statements like:

    ((string-equal expr "NOT flag:trashed AND date:365d..now AND (flag:flagged)")
        (setq mu4e-headers-show-threads nil)
        (setq mu4e-headers-include-related nil)
        (setq mu4e-headers-skip-duplicates t)
        (setq mu4e-headers-results-limit 500))

For this to work properly it's critical that the hook doesn't execute on
any search, but *only* those where we enter it via the bookmark.

As an example, I have a "b+" search which finds messages I've flagged,
most of my searches have related & threading turned on, but for that
search I only want to show the specific messages I've flagged, so the
hook turns both of those settings off before executing the search.

But I might still want to change my mind and look at the related
messages as threads by pressing P and then W. This works with the
mu4e-headers-search-bookmark-hook because it only executes when we get
the search via a bookmark.

But it doesn't work with the mu4e-headers-search-pre-hook because when I
toggle the setting my settings hook (which matches the search executed
by the bookmark) will just turn it back off again.

Perhaps there's some clever way to know if we're getting to the
mu4e-headers-search-pre-hook via the bookmark that I've missed. But if
there isn't I need a hook that works like this.
2016-02-18 21:37:21 +01:00
djcb 7716e005bf mu4e: add mu4e-headers-search-pre-hook
Just before executing a search, a hook-function
`mu4e-headers-search-pre-hook` is invoked, which receives the search
expression as its parameter.
2016-02-18 20:59:02 +02:00
djcb eca427d3a2 Merge commit '4f83ab0f9430f0af1e6d3adbfc9a9591dddb8867' into avar/avar/mu4e-headers-search-bookmark-hook 2016-02-18 20:24:29 +02:00
djcb faf453d538 mu4e: resend: add to view/headers menu
Add `mu4e-compose-resend` to the menus in the headers and view
modes. Don't add a shortcut, as it's a fairly rarely needed feature, and
might be confusing if invoked accidentally.
2016-02-16 08:29:06 +02:00
Yuri D'Elia 6337151918 mu4e: also quote the context label in the modeline 2016-02-16 08:28:59 +02:00
Yuri D'Elia ac0b1b755a mu4e: escape % in queries when updating the mode-string 2016-02-14 20:00:43 +01:00
djcb 14cbca7595 mu4e: remove 'z' shortcut for quitting headers view
Make consistent - 'q' is for quitting, not 'z', both in message, headers
view. Single-letter keybindings are precious, so let's avoid duplicates.
2016-02-06 12:48:14 +02:00
djcb 7b84236bdb mu4e: be tolerant of errors in `mu4e~headers-remove-handler'
Works around issue #789
2016-02-05 08:03:29 +02:00
djcb 967b3cb727 mu4e: update copyright years 2016-01-09 21:28:03 +02:00
djcb 972678b6be mu4e: when delete the currently view msg, kill the view
When we delete the message that is currently being viewed, destroy the
view as well.
2015-12-21 22:24:16 +02:00
djcb a14b3f0e62 Replace some 'fancy' characters
They showed up as hexboxes when using the Liberation font.
2015-12-16 21:31:17 +02:00
Clément Pit--Claudel e19658c9aa Initial implementation of customizable headers 2015-12-15 07:57:51 -05:00
Dirk-Jan C. Binnema 5f73b48609 Merge pull request #730 from cpitclaudel/fix-spurious-space
mu4e: Refactor mu4e~headers-header-handler
2015-12-15 09:43:42 +02:00
djcb ddcd2f39b5 mu4e: more support for fancy-chars
Re-simplify `mu4e-use-fancy-chars` to a boolean again; add some extra
mark-chars (big character, so they are easily visible). Document it.
2015-12-15 09:07:17 +02:00
Clément Pit--Claudel 9f104b217b Refactor mu4e~headers-header-handler
Generate the whole line in one call to mapconcat instead of appending to
the string, and remove the spurious final space.
2015-12-15 00:08:34 -05:00