* mu4e: documentation updates

This commit is contained in:
djcb 2012-10-03 12:53:24 +03:00
parent f9c9e790a6
commit 85e146063f
1 changed files with 42 additions and 25 deletions

View File

@ -969,17 +969,34 @@ For the marking commands, please refer to @ref{Marking messages}.
@node Opening and saving attachments
@section Opening and saving attachments
By default, when opening attachments, @t{mu4e} uses the the
@t{xdg-open}-program @footnote{@url{http://portland.freedesktop.org/wiki/}} or
(on MacOS) the @t{open} program. If you want to use another program, you can
specify this by setting the @t{MU_PLAY_PROGRAM} environment variable.
By default, @t{mu4e} uses the @t{xdg-open}-program
@footnote{@url{http://portland.freedesktop.org/wiki/}} or (on MacOS) the
@t{open} program for opening attachments. If you want to use another program,
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
saving them is your home directory (@file{~/}); you can change this using the
variable @code{mu4e-attachment-dir}, for example:
@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
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
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}.
Since emacs does not always handle images correctly, this is not enabled by
default. Note, if you are using a (pre-) release of emacs 24 and build it
yourself, you probable want to build it with @emph{Imagemagick} support -- in
that case, also make sure you call @code{imagemagick-register-types} in your
Since @t{emacs} does not always handle images correctly, this is not enabled
by default. Note, if you are using @t{emacs} 24 and build it yourself, you
probable want to build it with @emph{Imagemagick} support -- in that case,
also make sure you call @code{imagemagick-register-types} in your
configuration, so it is used for images.
@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
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
built-in @code{html2text} function, but if you set the variable
@code{mu4e-html2text-command} to some external program, that program is
used. This program is expected to take html from standard input and write
plain-text for display. The default way to do that is to use the @t{emacs}
built-in @code{html2text} function. However, you can set the variable
@code{mu4e-html2text-command} to some external program, which is then used
instead. This program is expected to take html from standard input and write
plain text in @t{utf-8} encoding on standard output.
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:
@lisp
(setq mu4e-html2text-command "html2text -utf8 -width 72")
@end lisp
An alternative to this is to use the Python @t{python-html2text} package;
after installing that, you can tell @t{mu4e} to use it with something like:
An alternative to this is the Python @t{python-html2text} package; after
installing that, you can tell @t{mu4e} to use it with something like:
@lisp
(setq mu4e-html2text-command