Commit Graph

223 Commits

Author SHA1 Message Date
Alex Bennée c074e7ea3b mu4e/mu4e-utils: only set so-long-mode once
Ideally we should separate the log buffer creation code so this van be
done a bit more cleanly. For now however only set so-long-mode once
otherwise you end up spamming the messages with constant:

  Changed to so-long-mode (from fundamental-mode) on account of line length.  C-c C-c to revert. [36 times]

As the messages keep rolling in.
2020-06-29 10:26:34 +01:00
Dirk-Jan C. Binnema 5ca0b6e148 mu4e-utils: use so-long-mode for logs when available 2020-06-26 19:25:45 +03:00
Dirk-Jan C. Binnema e37486fb5a mu4e: auto-enable logging when pressing '$' 2020-06-13 16:56:41 +03:00
Dirk-Jan C. Binnema ee99176fce mu4e: mu4e-info is not interactive 2020-06-08 19:52:19 +03:00
Dirk-Jan C. Binnema 5fdb205b8b mu4e: Update for sexp format changes 2020-06-06 14:27:25 +03:00
Dirk-Jan C. Binnema 73be015cd0 fixup: mu4e: some cleanups / bytecomp warning fixes 2020-05-28 10:21:16 +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 41f0c5a92a mu4e-utils: add method to count the longest name
Consolidates the logic for looping over bookmarks and maildirs so that
we can compute the longest name.
2020-05-26 23:12:26 +03:00
Sean Farley c2b0d2db6e mu4e-utils: send maildir queries along with bookmarks
When `mu4e-main-show-maildirs' is non-nil, we append the list of maildir
queries to the mu server.
2020-05-26 23:12:26 +03:00
Sean Farley a899dd04f7 mu4e-utils: add new method to transform `mu4e-maildir-shortcuts'
This will allow iterating over `mu4e-maildir-shortcuts' the same way as
`mu4e-bookmarks' (i.e. adding :name and :query to the plist).
2020-05-26 20:57:40 +03:00
Dirk-Jan C. Binnema 57d38aa707 mu4e: honor truncate-string-ellipsis
Use truncate-string-to-width and thus honor truncate-string-ellipsis; so
to get 'fancy' ellipsis, one can set:
   (setq truncate-string-ellipsis "…")
2020-05-25 18:34:42 +03:00
Derek Upham bb865fd1af Strip properties from mu4e-completing-read-function results.
Some completion engines (like "flx") decorate the strings that they
return.  If MU4E passes such a string down to MU, the "format" call
preserves the text properties in the generated S-expression, producing
an invalid query.  MU4E itself has no interest in those decorations,
so strip them out as early as possible from all prompts that use
mu4e-completing-read-function.
2020-05-18 08:12:56 -07:00
Dirk-Jan C. Binnema 05dc6333c3 mu4e-format: decode strings to utf8
Thanks to thierryvolpiatto

Fixes #1676.
2020-05-05 22:14:53 +03:00
Dirk-Jan C. Binnema 0f5f6c4e13 mu4e: ask for context in mu4e~start
This is a little risky, but it avoids the case where the
context-question is hidden by the response from the server ("blabla
contacts" etc.)
2020-04-27 21:51:23 +03:00
Dirk-Jan C. Binnema cdddb816e4 mu4e: increase max log size, use ms timestamps 2020-04-04 15:40:45 +03:00
Abdo Haji-Ali 33694814fc Save window selection after updating the index 2020-03-29 22:07:25 +01:00
Dirk-Jan C. Binnema 935874dfc3 mu4e: make logging a bit faster 2020-03-28 11:06:37 +02:00
Dirk-Jan C. Binnema c4953a4310 mu4e-utils: select mu4e-main-window when refreshing
Fixes #1613.
2020-03-11 20:47:25 +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
Dirk-Jan C. Binnema 7e58f21f48 mu4e-utils: add mu4e-copy-message-path helper 2020-02-26 21:56:01 +02:00
Dirk-Jan C. Binnema 3fe437985f utils: explicitly decode contacts string
Seems emacs doesn't know yet they're utf-8.

Fixes #1589.
2020-02-25 23:57:50 +02:00
Dirk-Jan C. Binnema 74d40f4d20 mu4e: make mu4e-maildir-shortcuts a plist
Similar to mu4e-bookmarks.
2020-02-25 21:20:51 +02:00
Thierry Volpiatto b301b7663b
Don't use mu4e-index-updated-hook in mu4e~start
Using mu4e-index-updated-hook in mu4e~start with a lambda is just like
adding the call to mu4e-info-handler so do it explicitely which is
much cleaner.

* mu4e/mu4e-utils.el (mu4e-info-handler): Always refresh main buffer.
(mu4e~start): Remove insertion of mu4e-index-updated-hook.
2020-02-21 08:54:16 +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 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
Dirk-Jan C. Binnema c09a9c4372 mu4e: update context handling
Make mu4e-context-autoswitch works a before we updated the pong-handler

Avoid unnecessary mu4e~start int he composer.
2020-02-18 22:38:40 +02:00
Jonas Bernoulli 6790c0d015 mu4e: Fix indentation 2020-02-17 14:28:00 +01:00
Dirk-Jan C. Binnema 8ff7306d90 mu4e: set context before check requirements
So we won't ask about creating default maildirs
2020-02-10 18:08:34 +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
Dirk-Jan C. Binnema ac4f5f754a mu4e: remove maildir arg from proc-add/proc-sent calls
The server doesn't want that parameter anymore, so we can simplify
things a bit.
2020-02-02 00:23:34 +02:00
Dirk-Jan C. Binnema c707feb30f mu4e-utils: update main-view when index changed
When the main-view is visible, update it when the index changed (e.g.
for the read/unread numbers).

Clean up the info handler a bit.
2020-01-31 21:16:13 +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 a7c4fdd029 mu4e/mu4e~start: remove some debugging leftover 2020-01-28 10:01:39 +02:00
Dirk-Jan C. Binnema dd98203d42 mu4e: fix some compiler warnings 2020-01-28 01:03:40 +02:00
Dirk-Jan C. Binnema 2371847240
Merge pull request #1554 from pedrormjunior/mu4e-update-name
mu4e: use `mu4e~update-name` de facto
2020-01-28 00:37:51 +02:00
Thierry Volpiatto 846428cfd4
Unquote lambda's
* mu4e/mu4e-context.el (mu4e-context-switch):         Do it.
* mu4e/mu4e-contrib.el (mu4e-view-mode-hook):         Do it.
(mu4e-headers-mode-hook):                             Do it.
* mu4e/mu4e-icalendar.el (mu4e-icalendar-reply-ical): Do it.
* mu4e/mu4e-utils.el (mu4e~start):                    Do it.
(mu4e-split-ranges-to-numbers):                       Do it.
2020-01-27 08:41:24 +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 eb3cac39ee mu4e: implement mu4e-compose-complete-only-after
We weren't supporting that yet after moving to the new command-parser;
let's do so now.

We now pass the time_t as a string, since the parser does not support
floats (and emacs doesn't generally support big ints).
2020-01-25 19:36:31 +02:00
Pedro Ribeiro Mendes Júnior 11590a1cf8 mu4e: use `mu4e~update-name` de facto
Instead of hard coding the buffer name " *mu4e-update*", use the
buffer name defined in `mu4e~update-name`.  Also, the default name
defined in `mu4e~update-name` were changed to match the previously
hard-coded invisible buffer name.
2020-01-25 10:57:15 -03:00
Dirk-Jan C. Binnema 9f72bd9703 mu4e: convert bookmarks from old format
When creating the 'ping' queries.
2020-01-24 14:21:25 +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 b2bdb8b30c
Merge pull request #1526 from seanfarley/smf/esc
mu4e-util: allow ESC to exit a choice selection
2020-01-21 20:30:56 +02:00
Dirk-Jan C. Binnema cf594413e2 mu4e: utils: 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
Dirk-Jan C. Binnema 24a6b71bd0 mu4e: move mu4e-bookmark defstruct to vars
Avoid compilation problem.
2019-12-22 15:26:45 +02:00
Sean Farley 02b5bc805c mu4e-util: allow ESC to exit a choice selection
I occasionally find myself pressing escape to exit a menu choice in mu4e
and it's a bit unfortunate that nothing happens. As best I could tell,
since this is a C call, none of the keymaps are checked for
`(keyboard-quit)' so we need to explicitly check for ESC here.
2019-12-13 16:26:05 -08:00
Jonas Bernoulli f31d1b065d Fix typos 2019-11-06 16:13:39 +01:00