mu4e: add mu4e-trash-without-flag
Allow trashing with adding the T flag.
This commit is contained in:
@ -68,6 +68,18 @@ of message, showing the target makes this quite a bit
|
|||||||
slower (showing the target uses Emacs overlays, which can be slow
|
slower (showing the target uses Emacs overlays, which can be slow
|
||||||
when overused).")
|
when overused).")
|
||||||
|
|
||||||
|
(defvar mu4e-trash-without-flag nil
|
||||||
|
"Non-nil means avoid adding the Maildir T flag when trashing.
|
||||||
|
|
||||||
|
When \"trashing\" a message, it is moved to the \"trash\"-folder.
|
||||||
|
Furthermore, as per the Maildir-spec, the \"T\" flag is added to
|
||||||
|
its filename. This marks it for *manual* removal later.
|
||||||
|
|
||||||
|
Some message retrieval and IMAP synchronization tools, however,
|
||||||
|
interpret this flag instead as a trigger for *automatic* removal,
|
||||||
|
may not be what the user expects. If, so set the flag to non-nil.
|
||||||
|
This makes the \"trashing\" merely a move the trash-folder.")
|
||||||
|
|
||||||
;;; Insert stuff
|
;;; Insert stuff
|
||||||
|
|
||||||
(defvar mu4e--mark-map nil
|
(defvar mu4e--mark-map nil
|
||||||
@ -160,7 +172,8 @@ The current buffer must be either a headers or view buffer."
|
|||||||
:dyn-target (lambda (target msg) (mu4e-get-trash-folder msg))
|
:dyn-target (lambda (target msg) (mu4e-get-trash-folder msg))
|
||||||
:action (lambda (docid msg target)
|
:action (lambda (docid msg target)
|
||||||
(mu4e--server-move docid
|
(mu4e--server-move docid
|
||||||
(mu4e--mark-check-target target) "+T-N")))
|
(mu4e--mark-check-target target)
|
||||||
|
(if mu4e-trash-without-flag "-N" "+T-N"))))
|
||||||
(unflag
|
(unflag
|
||||||
:char ("-" . "➖")
|
:char ("-" . "➖")
|
||||||
:prompt "-unflag"
|
:prompt "-unflag"
|
||||||
|
|||||||
@ -2337,7 +2337,7 @@ can happen in both the @ref{Headers view} and the @ref{Message view}.
|
|||||||
* Marking messages::Selecting message do something with them
|
* Marking messages::Selecting message do something with them
|
||||||
* What to mark for::What can we do with them
|
* What to mark for::What can we do with them
|
||||||
* Executing the marks::Do it
|
* Executing the marks::Do it
|
||||||
* Trashing messages::Exceptions for mailboxes like Gmail
|
* Trashing messages::Marking messages for removal
|
||||||
* Leaving the headers buffer::Handling marks automatically when leaving
|
* Leaving the headers buffer::Handling marks automatically when leaving
|
||||||
* Built-in marking functions::Helper functions for dealing with them
|
* Built-in marking functions::Helper functions for dealing with them
|
||||||
* Custom mark functions::Define your own mark function
|
* Custom mark functions::Define your own mark function
|
||||||
@ -2418,14 +2418,17 @@ arguments, the mark and the message itself.
|
|||||||
@node Trashing messages
|
@node Trashing messages
|
||||||
@section Trashing messages
|
@section Trashing messages
|
||||||
|
|
||||||
For regular mailboxes, trashing works like other marks: when executed,
|
When ``trashing'' a message, it is moved to a trash-folder (i.e.,
|
||||||
the message is flagged as trashed. Depending on your mailbox provider,
|
@code{mu4e-trash-folder}) and is flagged as ``trashed'' (a ``T'' is added to its
|
||||||
the trash flag is used to automatically move the message to the trash
|
filename).
|
||||||
folder (@code{mu4e-trash-folder}) for instance.
|
|
||||||
|
|
||||||
Some mailboxes behave differently however and they don't interpret the
|
Following the Maildir specification, this flag is to be interpreted as ``marked
|
||||||
trash flag. In cases like Gmail, the message must be @emph{moved} to
|
for manual removal later''. However, some mail retrieval and IMAP
|
||||||
the trash folder and the trash flag must not be used.
|
synchronization programs interpret this instead as a trigger for
|
||||||
|
@emph{immediate} removal.
|
||||||
|
|
||||||
|
For such cases, you can influence @t{mu4e}'s behavior; see
|
||||||
|
@code{mu4e-trash-without-flag}.
|
||||||
|
|
||||||
@node Leaving the headers buffer
|
@node Leaving the headers buffer
|
||||||
@section Leaving the headers buffer
|
@section Leaving the headers buffer
|
||||||
@ -4223,12 +4226,19 @@ seems to work quite well.
|
|||||||
@subsection How can I disable the @t{Indexing...} messages?
|
@subsection How can I disable the @t{Indexing...} messages?
|
||||||
Set the variable @code{mu4e-hide-index-messages} to non-@t{nil}.
|
Set the variable @code{mu4e-hide-index-messages} to non-@t{nil}.
|
||||||
|
|
||||||
@subsection IMAP-synchronization and file-name changes
|
@subsection IMAP-synchronization
|
||||||
Some IMAP-synchronization programs such as @t{mbsync} (but not
|
|
||||||
@t{offlineimap}) don't like it when message files do not change their
|
Some IMAP-synchronization programs such as @t{mbsync} (but not @t{offlineimap})
|
||||||
names when they are moved to different folders. @t{mu4e} can attempt to
|
don't like it when message files do not change their names when they are moved
|
||||||
help with this - you can set the variable
|
to different folders. @t{mu4e} can attempt to help with this - you can set the
|
||||||
@code{mu4e-change-filenames-when-moving} to non-@t{nil}.
|
variable @code{mu4e-change-filenames-when-moving} to non-@t{nil}.
|
||||||
|
|
||||||
|
Also, some of these programs may interpret the ``trash'' flag differently; see
|
||||||
|
@code{mu4e-trash-without-flag} for how to influence that.
|
||||||
|
|
||||||
|
Finally, we would warn against synchronizing the ``Drafts'' folder; the messages
|
||||||
|
in @t{mu4e}'s draft are in @t{mu4e}'s (i.e., Gnus') format, which is not
|
||||||
|
necessarily usable by other clients.
|
||||||
|
|
||||||
@subsection @command{offlineimap} and UTF-7
|
@subsection @command{offlineimap} and UTF-7
|
||||||
@command{offlineimap} uses IMAP's UTF-7 for encoding non-ascii folder
|
@command{offlineimap} uses IMAP's UTF-7 for encoding non-ascii folder
|
||||||
@ -4240,6 +4250,7 @@ see @uref{https://github.com/djcb/mu/issues/68#issuecomment-8598652,this
|
|||||||
ticket}.
|
ticket}.
|
||||||
|
|
||||||
@subsection @command{mbsync} or @command{offlineimap} do not sync properly
|
@subsection @command{mbsync} or @command{offlineimap} do not sync properly
|
||||||
|
|
||||||
Unfortunately, @command{mbsync} and/or @command{offlineimap} do not
|
Unfortunately, @command{mbsync} and/or @command{offlineimap} do not
|
||||||
always agree with @t{mu} about the meaning of various Maildir-flags. If
|
always agree with @t{mu} about the meaning of various Maildir-flags. If
|
||||||
you encounter unexpected behavior, it is recommended you check before
|
you encounter unexpected behavior, it is recommended you check before
|
||||||
|
|||||||
Reference in New Issue
Block a user