mu/man/mu-move.1.org

118 lines
3.8 KiB
Org Mode
Raw Permalink Normal View History

#+TITLE: MU MOVE
#+MAN_CLASS_OPTIONS: :section-id "@SECTION_ID@" :date "@MAN_DATE@"
* NAME
mu-move - move a message file or change its flags
* SYNOPSIS
*mu [common-options] move [options] <src> [--flags=<flags>] [<target>]*
* DESCRIPTION
*mu move* is the command for moving messages in a Maildir or changing their flags.
For any change, both the message file in the file system as well as its
representation in the database are updated accordingly.
The source message file and target-maildir must reside under the root-maildir
for mu's database (see *mu info store*).
* MOVE OPTIONS
** --flags=<flags>
specify the new message flags. See *FLAGS* for details.
** --change-name
change the basename of the message file when moving; this can be useful when
using some external tools such as *mbsync(1)* which otherwise get confused
** --update-dups
update the flags of duplicate messages too, where "duplicate messages" are
defined as all message that share the same message-id. Note that the
Draft/Flagged/Trashed flags are deliberately _not_ changed if you change those on
the source message.
** --dry-run,-n
print the target filename(s), but don't change anything.
Note that with the ~--change-name~, the target name is not constant, so you cannot
man: change quoting style The man-page sources use single quotes to quote text. However, this can be problematic in man-pages because if a single quote appears at the beginning of a line the following word is interpreted by troff as a macro. For example, this paragraph in mu-easy.7: What if we want to see some of the body of the message? You can get a 'summary' of the first lines of the message using the \fI\-\-summary\-len\fP option, which will 'summarize' the first \fIn\fP lines of the message: elicits this warning: $ man --warnings obj-x86_64-linux-gnu/man/mu-easy.7 >/dev/null troff:<standard input>:166: warning: macro 'summarize'' not defined and gets truncated: What if we want to see some of the body of the message? You can get a 'summary' of the first lines of the message using the --summary-len op‐ tion, which will One could adjust the line-wrapping to move the quoted text away from the beginning of the line, but that is fragile. Another possibility would be to use the troff escape-sequences for open and close quotes (`\(oq` and `\(cq` respectively), but ox-man is being used precisely to avoid having to handle troff directly. Instead use back-ticks for left quotes. Thus: What if we want to see some of the body of the message? You can get a `summary' of the first lines of the message using the \fI\-\-summary\-len\fP option, which will `summarize' the first \fIn\fP lines of the message: which is rendered correctly: What if we want to see some of the body of the message? You can get a `summary' of the first lines of the message using the --summary-len op- tion, which will `summarize' the first n lines of the message: Signed-off-by: Jeremy Sowden <azazel@debian.org>
2024-03-02 14:25:56 +01:00
use a dry-run to predict the exact name when doing a `real' run.
#+include: "common-options.inc" :minlevel 1
* FLAGS
(Note: if you are not familiar with Maildirs, please refer to the *maildir(5)*
man-page, or see http://cr.yp.to/proto/maildir.html)
The message flags specify the Maildir-metadata for a message and are represented
man: change quoting style The man-page sources use single quotes to quote text. However, this can be problematic in man-pages because if a single quote appears at the beginning of a line the following word is interpreted by troff as a macro. For example, this paragraph in mu-easy.7: What if we want to see some of the body of the message? You can get a 'summary' of the first lines of the message using the \fI\-\-summary\-len\fP option, which will 'summarize' the first \fIn\fP lines of the message: elicits this warning: $ man --warnings obj-x86_64-linux-gnu/man/mu-easy.7 >/dev/null troff:<standard input>:166: warning: macro 'summarize'' not defined and gets truncated: What if we want to see some of the body of the message? You can get a 'summary' of the first lines of the message using the --summary-len op‐ tion, which will One could adjust the line-wrapping to move the quoted text away from the beginning of the line, but that is fragile. Another possibility would be to use the troff escape-sequences for open and close quotes (`\(oq` and `\(cq` respectively), but ox-man is being used precisely to avoid having to handle troff directly. Instead use back-ticks for left quotes. Thus: What if we want to see some of the body of the message? You can get a `summary' of the first lines of the message using the \fI\-\-summary\-len\fP option, which will `summarize' the first \fIn\fP lines of the message: which is rendered correctly: What if we want to see some of the body of the message? You can get a `summary' of the first lines of the message using the --summary-len op- tion, which will `summarize' the first n lines of the message: Signed-off-by: Jeremy Sowden <azazel@debian.org>
2024-03-02 14:25:56 +01:00
by uppercase letters at the end of the message file name for all `non-new'
messages, i.e. messages that live in the ~cur/~ sub-directory of a Maildir.
#+ATTR_MAN: :disable-caption t
| Flag | Meaning |
|------+------------------------------------|
| D | Draft message |
| F | Flagged message |
man: change quoting style The man-page sources use single quotes to quote text. However, this can be problematic in man-pages because if a single quote appears at the beginning of a line the following word is interpreted by troff as a macro. For example, this paragraph in mu-easy.7: What if we want to see some of the body of the message? You can get a 'summary' of the first lines of the message using the \fI\-\-summary\-len\fP option, which will 'summarize' the first \fIn\fP lines of the message: elicits this warning: $ man --warnings obj-x86_64-linux-gnu/man/mu-easy.7 >/dev/null troff:<standard input>:166: warning: macro 'summarize'' not defined and gets truncated: What if we want to see some of the body of the message? You can get a 'summary' of the first lines of the message using the --summary-len op‐ tion, which will One could adjust the line-wrapping to move the quoted text away from the beginning of the line, but that is fragile. Another possibility would be to use the troff escape-sequences for open and close quotes (`\(oq` and `\(cq` respectively), but ox-man is being used precisely to avoid having to handle troff directly. Instead use back-ticks for left quotes. Thus: What if we want to see some of the body of the message? You can get a `summary' of the first lines of the message using the \fI\-\-summary\-len\fP option, which will `summarize' the first \fIn\fP lines of the message: which is rendered correctly: What if we want to see some of the body of the message? You can get a `summary' of the first lines of the message using the --summary-len op- tion, which will `summarize' the first n lines of the message: Signed-off-by: Jeremy Sowden <azazel@debian.org>
2024-03-02 14:25:56 +01:00
| P | Passed message (i.e., `forwarded') |
| R | Replied message |
| S | Seen message |
| T | Trashed; to be deleted later |
New messages (in the ~new/~ sub-directory) do not have flags encoded in their
man: change quoting style The man-page sources use single quotes to quote text. However, this can be problematic in man-pages because if a single quote appears at the beginning of a line the following word is interpreted by troff as a macro. For example, this paragraph in mu-easy.7: What if we want to see some of the body of the message? You can get a 'summary' of the first lines of the message using the \fI\-\-summary\-len\fP option, which will 'summarize' the first \fIn\fP lines of the message: elicits this warning: $ man --warnings obj-x86_64-linux-gnu/man/mu-easy.7 >/dev/null troff:<standard input>:166: warning: macro 'summarize'' not defined and gets truncated: What if we want to see some of the body of the message? You can get a 'summary' of the first lines of the message using the --summary-len op‐ tion, which will One could adjust the line-wrapping to move the quoted text away from the beginning of the line, but that is fragile. Another possibility would be to use the troff escape-sequences for open and close quotes (`\(oq` and `\(cq` respectively), but ox-man is being used precisely to avoid having to handle troff directly. Instead use back-ticks for left quotes. Thus: What if we want to see some of the body of the message? You can get a `summary' of the first lines of the message using the \fI\-\-summary\-len\fP option, which will `summarize' the first \fIn\fP lines of the message: which is rendered correctly: What if we want to see some of the body of the message? You can get a `summary' of the first lines of the message using the --summary-len op- tion, which will `summarize' the first n lines of the message: Signed-off-by: Jeremy Sowden <azazel@debian.org>
2024-03-02 14:25:56 +01:00
file-name; but we *mu* uses `N' in the ~--flags~ to represent that:
#+ATTR_MAN: :disable-caption t
| Flag | Meaning |
|------+---------|
| N | New |
Thus, changing flags means changing the letters at the end of the message
man: change quoting style The man-page sources use single quotes to quote text. However, this can be problematic in man-pages because if a single quote appears at the beginning of a line the following word is interpreted by troff as a macro. For example, this paragraph in mu-easy.7: What if we want to see some of the body of the message? You can get a 'summary' of the first lines of the message using the \fI\-\-summary\-len\fP option, which will 'summarize' the first \fIn\fP lines of the message: elicits this warning: $ man --warnings obj-x86_64-linux-gnu/man/mu-easy.7 >/dev/null troff:<standard input>:166: warning: macro 'summarize'' not defined and gets truncated: What if we want to see some of the body of the message? You can get a 'summary' of the first lines of the message using the --summary-len op‐ tion, which will One could adjust the line-wrapping to move the quoted text away from the beginning of the line, but that is fragile. Another possibility would be to use the troff escape-sequences for open and close quotes (`\(oq` and `\(cq` respectively), but ox-man is being used precisely to avoid having to handle troff directly. Instead use back-ticks for left quotes. Thus: What if we want to see some of the body of the message? You can get a `summary' of the first lines of the message using the \fI\-\-summary\-len\fP option, which will `summarize' the first \fIn\fP lines of the message: which is rendered correctly: What if we want to see some of the body of the message? You can get a `summary' of the first lines of the message using the --summary-len op- tion, which will `summarize' the first n lines of the message: Signed-off-by: Jeremy Sowden <azazel@debian.org>
2024-03-02 14:25:56 +01:00
file-name, except when setting or removing the `N' (new) flag. Setting or
un-setting the New flag causes the message is to be moved from ~cur/~ to ~new/~ or
vice-versa, respectively. When marking a message as New, it looses the other
flags.
* ABSOLUTE AND RELATIVE FLAGS
You can specify the flags with the ~--flags~ parameter, and do either with either
*absolute* or *relative* flags.
Absolute flags just specify the new flags by their letters; e.g. to specify a
/Trashed/, /Seen/, /Replied/ message, you'd use ~--flags STR~.
#+end_example
Relative flags are relative to the current flags for some message, and each of
the flags is prefixed with either ~+~ ("add this flag") or ~-~ ("remove this flag").
So to add the /Seen/ flag and remove the /Draft/ flag from whatever the message
already has, ~--flags +S-D~.
You cannot combine relative and relative flags.
* EXAMPLES
** change some flags
#+begin_example
$ mu move /home/user/Maildir/inbox/cur/1695559560.a73985881f4611ac2.hostname!2,S --flags +F
/home/user/Maildir/inbox/cur/1695559560.a73985881f4611ac2.hostname!2,FS
#+end_example
** move to a different maildir
#+begin_example
$ mu move /home/user/Maildir/project1/cur/1695559560.a73985881f4611ac2.hostname!2,S /project2
/home/user/Maildir/project2/cur/1695559560.a73985881f4611ac2.hostname!2,S
#+end_example
#+include: "prefooter.inc" :minlevel 1
* SEE ALSO
*maildir(5)*