Commit Graph

122 Commits

Author SHA1 Message Date
67ea98e36e mu4e-draft: fix mu4e-compose-pre-hook
Run the hook earlier, and ensure mu4e-compose-type &
mu4e-compose-parent-message are set.

As noted in #2715.
2024-06-17 22:13:20 +03:00
a9495f7be5 mu4e-draft: use message-alternative-emails for replies
Set message-alternative-emails to the special
`mu4e-personal-or-alternative-address-p' such that it honors both
user-specified alternative address as well as the mu personal addresses.

Fixes #2708.
2024-05-18 00:14:51 +03:00
3ff2f9f1ac mu4e-draft: invoke mu4e-compose-pre-hook
We should invoke it, as documented.
2024-05-18 00:14:07 +03:00
142d91f218 mu4e: some flycheck fixes 2024-05-18 00:10:23 +03:00
e2bf38298d mu4e-draft: mark m-c-(type|parent-message) as permanent-local
The variables mu4e-compose-parent-message & mu4e-compose-type are
buffer-local as well as permanent-local. That way, they'll survive the
mode change to mu4e-compose-mode and we can use them in the
corresponding mode-hook.
2024-05-01 18:22:53 +03:00
32bb79b316 draft: explicitly remove drafts after sending
This seems necessary in some cases.
2024-04-30 18:10:26 +03:00
c56f8e2f06 mu4e-draft: don't treat delete as a function
In mu4e-sent-messages-behavior.

Fixes #2701.
2024-04-30 18:10:26 +03:00
c8bf57955d mu4e-draft: better handle replies
(again) avoid mixing up message-reply-headers.
2024-04-28 22:07:02 +03:00
4440594066 mu4e: implement mu4e-compose-post-hook
A hook for when we're done with message composition.

We populate it with a function to kill created frames and one to attempt
to restore window configuration.
2024-04-28 10:04:27 +03:00
a49cd03f6b mu4e-drafts: improve mu4e--fcc-path
Reworked from the pull #2698 for the new branch.
2024-04-26 23:36:28 +03:00
a9b78718b2 mu4e-draft/window: handle buffer display in mu4e-window
Handle buffer display where all mu4e's buffer display is done: in mu4e-window.el.

Avoid overly long lines in mu4e-window.el.
2024-04-26 23:36:28 +03:00
6a4d6a49c4 mu4e-compose: split off parts in mu4e-draft; rework
Move draft-creation part of message-composition to a new file
mu4e-drafts

However, this is more than just some refactoring: rework the
message (draft) setup as such to ensure we always get a (non-active,
live) buffer back from the composition process.

This also fixes

(progn
  (compose-mail "test@example.org" "Test")
  (insert "TEST"))

as mentioned on the mailing list.

Fixes #2699
2024-04-26 22:59:48 +03:00
85bfe76336 mu4e-compose: overhaul message composer
This is a new composer sub-system, which more closely follows
Gnus/message; in particular, we let gnus take care of creating draft
messages.

This reduces code size and allows us to re-use some of the more advanced
features.

There are a number of user-visible changes:

- `mu4e-compose-resend' directly uses `message-resend', so there is no
  more editing phase (which used to be a bit broken with re-encoding
  MIME messages.
2023-10-25 22:05:06 +03:00
8fc13ab8f3 mu4e: Shorten descriptions a bit 2023-09-20 22:31:19 +03:00
67c8ff75a7 Fix missing or incorrect descriptions in file headers
Try to make useful descriptions and use conventional --- to separate filename
from description.
2023-09-20 22:04:48 +03:00
3d0120d024 Don't use the original message To for a reply To field
Fixes https://github.com/djcb/mu/issues/2535
2023-08-16 23:03:06 +02:00
dd5d5e6bbf mu4e: fix byte-compiler warnings 2023-08-10 09:14:07 +03:00
8b2437fc69 mu4e-draft: changes in to/cc lists creation
- Bug fix.
- Reply-all consistency, related to #2524
2023-08-06 18:44:10 +03:00
8f6895b966 Fix more defcustom type errors and reworded docs
* mu4e/mu4e-draft.el
(mu4e-compose-reply-recipients): (mu4e-compose-reply-to-address):
* mu4e/mu4e-thread.el (mu4e-thread-fold-single-children): Clarify
docstrings and fixed type definitions.
2023-05-12 10:56:33 +08:00
e5b33c29d1 Fix defcustom type definitions
So that the type definitions reflects the docstrings more closely.  In additon,
fixed warnings from flymake about docstring.

* mu4e/mu4e-draft.el
mu4e-compose-keep-self-cc: should be a comma

* mu4e/mu4e-folders.el
mu4e-maildir-shortcuts: recognize new (plist) format

* mu4e/mu4e-helpers.el
mu4e-debug: removed unnecessary double space in docstring

* mu4e/mu4e-query-items.el
mu4e-query-rewrite-function: prepend "\\=" before column 0 "(" in docstring

* mu4e/mu4e-search.el
mu4e-search-sort-field mu4e-search-sort-direction: used radio in types

* mu4e/mu4e-server.el
mu4e-mu-binary: "mu" executable must exist

* mu4e/mu4e-view.el
mu4e-view-fields: fixed type
mu4e-view-actions: for function refs, prefer "#'" rather than "'"
2023-04-01 15:59:16 +08:00
d55cba7237 mu4e: fix quotes in some docstrings
Escape correctly.
2023-02-15 12:29:24 +02:00
817675d83c mu4e-draft: cleanup, honor reply-to
Fixes #2420
2023-01-18 17:11:58 +02:00
20fe650714 When replying to self, use :from field of original message
Simple patch to fix #2403
2023-01-14 22:41:31 +00:00
b7b97212ce mu4e: move search functionality to mu4e-search
Move out of mu4e-headers; rename variables and callers.
2023-01-01 15:01:08 +02:00
7fa8fe9165 mu4e: whitespace updates 2023-01-01 15:01:08 +02:00
04903c568d Move defcustoms to mu4e-window.el 2022-12-09 09:01:18 +00:00
42add64683 Appease the byte compiler and clean up the code 2022-12-06 09:46:39 +00:00
69a17bfcb9 Multiple buffer support and standardised window and buffer handling 2022-11-29 11:33:07 +00:00
68753f9e84 mu4e: move all obsolete aliases to mu4e-obsolete
Unclutter the rest of the code a bit.
2022-08-20 14:24:24 +03:00
5e63b8bed3 mu4e-draft: better sender in list-reply dialog
Don't show the raw lisp object.
2022-06-16 22:48:37 +03:00
a1f0c5e9eb mu4e: fix emacs-29 bytecompiler warnings
Wrong single quotes.
2022-05-28 00:51:08 +03:00
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
67b16acbb2 mu4e: support message-user-organization
Automatically include Organziation: if set and update when changing the context.

Fixes: issue #2112.
2021-11-07 12:50:16 +02:00
0303f5d931 mu4e: compose/draft: remove some mostly obsolete things
Avoid some compiler warnings.
2021-10-22 08:33:51 +03:00
7156ff7fac mu4e: fix some compiler warnings 2021-10-18 21:52:37 +03:00
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
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
5d859d005f Respect switch-function in compose-mail.
Emacs has several standard keybindings

C-x m   compose-mail
C-x 4 m compose-mail-other-window
C-x 5 m compose-mail-other-frame

This patch fixes the creation of new mail buffers to respect the
latter two keybindings, C-x 4 m and C-x 5 m.

Note that there is already the variable mu4e-compose-in-new-frame
which if true opens in a new frame.  That will still work for C-x m
and C-x 5 m, but if the user runs C-x 4 m, it switches to other-window
as it assumes the keybinding takes precedence.  This behaviour can be
changed within mu4e~draft-open-file.
2021-04-03 22:23:21 +01:00
5e069d9a6f mu4e: support regexp patterns for personal addresses 2020-10-17 15:38:24 +03:00
071c60d229 Allow use of Maildir FAT extension changing the Maildir info separator 2020-10-04 16:47:42 +02:00
e10fc21a9b mu4e: Rename 'Unnamed' sections 2020-02-18 23:49:50 +02:00
74332947a0 mu4e: Split libraries into outline sections 2020-02-18 23:49:50 +02:00
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
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
c2ef02f57c mu4e: Begin each elisp summary line with three semicolons 2020-02-17 14:28:00 +01:00
6790c0d015 mu4e: Fix indentation 2020-02-17 14:28:00 +01:00
0dced59cb9 mu4e: set better default for mu4e-compose-reply-ignore-address
... and some small cleanup
2020-02-15 22:36:00 +02:00
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
9ba28bc4c5 mu4e-draft: Fix over-eager reply-all (typo)
Fixes #1559.
2020-01-28 20:57:45 +02:00
17e1dc2b17 mu4e: include From: in cc-list for mailing, even with reply-to
Many mailing lists override reply-to.
2020-01-25 22:21:56 +02:00