Commit Graph

137 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema d7a5349a74 mu4e-comnpose: avoid jumping to headers when saving
Wrap the before-save-hook function in a save-excursion.

(HT: Joost Kremers)
2019-10-23 20:21:24 +03:00
Dirk-Jan C. Binnema 798aa12a34 mu4e-compose: Generate message-id for drafts
Ensure even drafts have a message-id, since the querying machinery wants
that.
2019-10-20 16:13:32 +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
Dirk-Jan C. Binnema ca699324a3 mu4e: mu4e-compose: Fix configuration choices
End the choice group in the right place.
2019-08-10 10:53:52 +03:00
Paul W. Rankin ca7449c575
Balance parens in mu4e-compose-context-policy
Fixes unbalanced parens in mu4e-compose-context-policy, which prevents Custom mode UI working.

Using standard indentation helps prevent missing these little issues.
2019-08-09 18:20:33 +10:00
Dirk-Jan C. Binnema 2beb2eda02 mu4e-contacts: cleanups, save-match-data
Whitespace cleanups

Flycheck cleanups

Save the match data for (after|before)-save-hook
2019-05-25 17:38:58 +03:00
djcb 0d33e64dc9 mu4e: don't sort contacts in completion handler
mu4e~sort-contacts-for-completion no longer exists.
2019-05-13 13:29:25 +03: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
Christophe Troestler 0746a4affe Set mml-enable-flowed according to mu4e-compose-format-flowed
Fixes https://github.com/djcb/mu/issues/1358
2019-01-29 10:35:06 +01:00
Alex Branham 2674ca5583
mu4e: Replace cl with cl-lib 2019-01-04 16:03:58 -06:00
djcb 9352219dcf mu4e: mark compose buffers as non-modified later
To avoid marking user-unchanged buffers as modified.
2018-12-12 21:35:46 +02:00
djcb 69ed3498bb mu4e: mu4e-index-updated-hook should not depend on mu4e~contacts 2018-11-04 13:20:20 +02:00
djcb 9bf1670aa1 mu4e: work-around for missing contacts 2018-06-13 18:19:13 +03:00
Alex Branham 39ec6a0417
Fix call to make-obsolete-variable 2018-05-18 15:52:41 -05:00
John Whitbeck 76c0f44c51 mu4e: ensure sent dir is created with proper maildir structure
offlineimap will only sync directories that have 'cur', 'tmp', and
'new' sub-directories. Currently, mu4e can end up in a state where the
sent folder only has the 'cur' directory and is therefore not synced.

Upon saving a sent email, emacs' write-file will prompt to create
parent directories if the sent maildir does not already exist. This
results in the following directory structure:

<mu4e-maildir>/<sent>/cur/<email>

Note that the 'tmp' and 'new' directories are missing. This commit
ensures that they are always created.
2018-02-08 20:35:43 -08:00
djcb a4fefc7256 mu4e: make mu4e-compose-crypto-reply-plain-policy nil by default
Making it sign by default is a bit too aggressive.
2017-10-28 11:23:57 +03:00
Dirk-Jan C. Binnema fe04e6d820 Merge pull request #1118 from MaximeMaW/master
mu4e: Allow to set the reply policy in a smart manner
2017-10-26 23:14:08 +03:00
maxime e761f74f19 Warn the user about obsolete crypto-policy variable 2017-09-02 09:24:11 -07:00
maxime 5c6561873e Warning the used abot obsolete variable
Following code review (PR 1118):
- Warn the user about the fact that the
'mu4e-compose-crypto-reply-policy' variable is deprecated
- Removed a leftover debug message
- Edited typo in the name of the new variable
2017-09-02 09:13:57 -07:00
djcb cb0025b352 mu4e: unbreak abbrevs in compose mode
Fixes issue #1119.
2017-09-02 15:56:29 +03:00
maxime d343f7f538 Allow to set the reply policy in a smart manner
Depending on whether the original email was encrypted, one can set
different reply policies.
2017-08-26 19:47:36 -07: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
djcb abe732111a mu4e: cosmetics 2017-04-09 11:33:21 +03:00
djcb 98b998b86d mu4e: remove mu4e~compose-browse-url-mail
Instead, rely on the common browse-url-mail, which does the right thing
after
  (setq mail-user-agent 'mu4e-user-agent)
2017-04-08 15:25:38 +03:00
djcb 895a78ba7b mu4e: handle cc in mu4e~compose-browse-url-mail
Handle Cc fields in mu4e~compose-browse-url-mail, as per issue #1025.
2017-04-08 14:55:24 +03:00
djcb fb09af4215 mu4e: compose/format-flowed: don't enable fringe indicators
We were enabling the fringe indicators by default in
mu4e-compose-format-flowed; let's not do that and leave it to the
user (they can use add-hook etc.)
2017-04-02 16:27:53 +03:00
Ronald Evers 6ce126ca69 Fix typo in mu4e-sent-messages-behavior docs 2017-03-26 21:49:36 +02:00
djcb 21b637f291 mu4e: minor cleanup in mu4e-compose 2017-03-18 10:24:51 +02:00
djcb 7d895dbd69 mu4e: widen buffer after save
Otherwise, undo won't work. Fixes issue #1047.
2017-03-18 10:07:12 +02:00
Dirk-Jan C. Binnema 430f17af65 Merge pull request #1003 from Chris00/elec-quote
mu4e: Make electric-quote-(local-)mode work when composing emails
2017-01-30 20:49:56 +02:00
Christophe Troestler bf2f2ee12a Do not show the electric quote menu if Emacs is too old 2017-01-24 23:21:55 +01:00
Christophe Troestler a9cbead5af Add a menu entry for electric-quote-local-mode 2017-01-24 23:21:55 +01:00
Christophe Troestler 9cb0772993 Make electric-quote-(local-)mode work when composing emails
electric-quote-(local-)mode used to have no effect because
`comment-use-syntax' was left to `undecided' so the electric mode was
not enabled for paragraphs.

Fixes https://github.com/djcb/mu/issues/997
2017-01-24 23:21:55 +01:00
djcb 475fec0d16 mu4e: treat 'traditional as 'above 2017-01-24 18:48:27 +02:00
djcb 1c4caf198d mu4e: try to honor `message-cite-reply-position'
Try to respect gnu's `message-cite-reply-position' by placing the cursor
in the right position.
2017-01-22 22:11:30 +02:00
Krzysztof Jurewicz f060cb8196 mu4e: Add possibility to forward messages as attachments
This commit adds a global variable
mu4e-compose-forward-as-attachment. To enable choosing forwarding
method on a per-message basis would probably require either:

• changing the mu server backend so that it distinguishes between
  inline forwarding and forwarding as attachment;
• changing the mu server backend so that it doesn’t return attachments
  at all and making both inline and as attachment forwarding via
  MIME (and also making mu4e actually display MIME-enclosed inline
  emails).
2017-01-13 16:30:25 +01:00
Matt Price ad738b88b0 force use of strings for other-header in mu4e~compose-mail
org-mime and potentially other users of `compose-mail' pass a parameter
`other-headers', an alist of the form ((symbol . string)).
`mu4e~compose-mail' sends this parameter to message-add-header, which
appears to expect a string instead.  We therefore loop through
other-headers and instead pass a string to message-add-header for each
element of other-headers.
2016-11-30 14:55:23 -05:00
djcb 34cd624023 mu4e: fix some defcustoms
There weren't quite right.
2016-11-24 00:33:06 +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 e1092c5f27 mu4e: restore mu4e-compose-type in compose-buffer
Seems the `mu4e-compose-type' is always nil when we enter the
compose (it is set when executing the pre-hooks though). It can be
useful in the compose buffer as well, so restore it.
2016-11-05 10:18:23 +02:00
Antoine Levitt c0726d92a0 do not rename current message buffer if the name has not changed 2016-10-31 16:28:25 +01:00
Antoine Levitt bc13cfda35 dont erase global-mode-string with context label, but add to it 2016-10-26 08:20:25 +02:00
djcb c419bca577 mu4e: set mu4e-compose-type earlier
Set mu4e-compose-type before invoking the "pre" hook, so that it can be
used there.
2016-09-06 18:29:05 +03:00
djcb bca649cb32 mu4e: make mu4e-compose-type a public variable
Replace mu4e~compose-type so it can be used in pre-hooks and the like.
2016-09-06 09:15:17 +03:00
djcb f1aedf14ab mu4e: remove some debugging output 2016-09-05 15:07:44 +03:00
djcb 37f11d642f mu4e: improve mu4e-fill-paragraph
Improve mu4e-fill-paragraph for some corner-cases where there is
trailing whitespace. Patch by holtzermann17.
2016-08-27 19:06:10 +03:00
Christophe Troestler 744f288431 Fix typo 2016-08-12 00:05:12 +02:00
djcb c27471f4fa mu4e: compose: auto-crypt/sign crypto replies
When replying to an encrypted message, sign/encrypt by default; see
  mu4e-compose-crypto-reply-policy.

(Issue #865)
2016-07-12 00:25:05 +03:00
djcb a24058040f mu4e: fix typo in face description 2016-07-12 00:15:29 +03:00
djcb 1e963c1779 mu4e: update font-locking for mu4e-compose-mode
mu4e was making a vain attempt to fontify the compose buffer; this
doesn't work because message (from which mu4e-compose-mode derives) uses
font-locking for that.

So, instead, remap the message-mode faces to the ones used for mu4e.
2016-07-09 23:42:58 +03:00