mirror of
https://github.com/djcb/mu.git
synced 2024-06-26 07:29:17 +02:00
* mu4e: documentation updates
This commit is contained in:
parent
f9c9e790a6
commit
85e146063f
|
@ -969,17 +969,34 @@ For the marking commands, please refer to @ref{Marking messages}.
|
||||||
@node Opening and saving attachments
|
@node Opening and saving attachments
|
||||||
@section Opening and saving attachments
|
@section Opening and saving attachments
|
||||||
|
|
||||||
By default, when opening attachments, @t{mu4e} uses the the
|
By default, @t{mu4e} uses the @t{xdg-open}-program
|
||||||
@t{xdg-open}-program @footnote{@url{http://portland.freedesktop.org/wiki/}} or
|
@footnote{@url{http://portland.freedesktop.org/wiki/}} or (on MacOS) the
|
||||||
(on MacOS) the @t{open} program. If you want to use another program, you can
|
@t{open} program for opening attachments. If you want to use another program,
|
||||||
specify this by setting the @t{MU_PLAY_PROGRAM} environment variable.
|
you do so by setting the @t{MU_PLAY_PROGRAM} environment variable to the
|
||||||
|
program to be used.
|
||||||
|
|
||||||
When extracting (saving) attachments (with @key{e}), the default directory for
|
When extracting (saving) attachments (with @key{e}), the default directory for
|
||||||
saving them is your home directory (@file{~/}); you can change this using the
|
saving them is your home directory (@file{~/}); you can change this using the
|
||||||
variable @code{mu4e-attachment-dir}, for example:
|
variable @code{mu4e-attachment-dir}, for example:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(setq mu4e-attachment-dir (file-name-expand "~/Downloads"))
|
(setq mu4e-attachment-dir "~/Downloads")
|
||||||
|
@end lisp
|
||||||
|
|
||||||
|
For more flexibility, @code{mu4e-attachment-dir} can also be a user-provided
|
||||||
|
function. This function receives two parameters: the file-name and the
|
||||||
|
mime-type@footnote{sadly, often @t{application/octet-stream} is used for the
|
||||||
|
mime-type, even if a better type is available} of the attachment, either or
|
||||||
|
both of which can be @t{nil}. For example:
|
||||||
|
|
||||||
|
@lisp
|
||||||
|
(setq mu4e-attachment-dir
|
||||||
|
(lambda (fname mtype)
|
||||||
|
(cond
|
||||||
|
;; docfiles go to ~/Desktop
|
||||||
|
((and fname (string-match "\\.doc$" fname)) "~/Desktop")
|
||||||
|
;; other cases ...
|
||||||
|
(t "~/Downloads")))) ;; everything else
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
If you want to extract multiple attachments at once, you can do so by
|
If you want to extract multiple attachments at once, you can do so by
|
||||||
|
@ -991,13 +1008,13 @@ shortcut for @emph{all} attachments.
|
||||||
@section Viewing images inline
|
@section Viewing images inline
|
||||||
|
|
||||||
It is possible to show images inline in the message view buffer if you run
|
It is possible to show images inline in the message view buffer if you run
|
||||||
emacs in GUI-mode. You can enable this by setting the variable
|
@t{emacs} in GUI-mode. You can enable this by setting the variable
|
||||||
@code{mu4e-view-show-images} to @t{t}.
|
@code{mu4e-view-show-images} to @t{t}.
|
||||||
|
|
||||||
Since emacs does not always handle images correctly, this is not enabled by
|
Since @t{emacs} does not always handle images correctly, this is not enabled
|
||||||
default. Note, if you are using a (pre-) release of emacs 24 and build it
|
by default. Note, if you are using @t{emacs} 24 and build it yourself, you
|
||||||
yourself, you probable want to build it with @emph{Imagemagick} support -- in
|
probable want to build it with @emph{Imagemagick} support -- in that case,
|
||||||
that case, also make sure you call @code{imagemagick-register-types} in your
|
also make sure you call @code{imagemagick-register-types} in your
|
||||||
configuration, so it is used for images.
|
configuration, so it is used for images.
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
|
@ -1017,22 +1034,22 @@ its body-text.
|
||||||
|
|
||||||
If there is only an html-version, or if the plain-text version is too short in
|
If there is only an html-version, or if the plain-text version is too short in
|
||||||
comparison with the html part, @t{mu4e} tries to convert the html into
|
comparison with the html part, @t{mu4e} tries to convert the html into
|
||||||
plain-text for display. The default way to do that is to use the Emacs
|
plain-text for display. The default way to do that is to use the @t{emacs}
|
||||||
built-in @code{html2text} function, but if you set the variable
|
built-in @code{html2text} function. However, you can set the variable
|
||||||
@code{mu4e-html2text-command} to some external program, that program is
|
@code{mu4e-html2text-command} to some external program, which is then used
|
||||||
used. This program is expected to take html from standard input and write
|
instead. This program is expected to take html from standard input and write
|
||||||
plain text in @t{utf-8} encoding on standard output.
|
plain text in @t{utf-8} encoding on standard output.
|
||||||
|
|
||||||
An obvious choice for this is the program that is actually @emph{called}
|
An obvious choice for this is the program that is actually @emph{called}
|
||||||
@t{html2text}@footnote{@url{http://www.mbayer.de/html2text/}}, which you could
|
@t{html2text}@footnote{@url{http://www.mbayer.de/html2text/}}, which you can
|
||||||
set up with something like the following in your initialization files:
|
set up with something like the following in your initialization files:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(setq mu4e-html2text-command "html2text -utf8 -width 72")
|
(setq mu4e-html2text-command "html2text -utf8 -width 72")
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
An alternative to this is to use the Python @t{python-html2text} package;
|
An alternative to this is the Python @t{python-html2text} package; after
|
||||||
after installing that, you can tell @t{mu4e} to use it with something like:
|
installing that, you can tell @t{mu4e} to use it with something like:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(setq mu4e-html2text-command
|
(setq mu4e-html2text-command
|
||||||
|
|
Loading…
Reference in New Issue
Block a user