notmuch/emacs
Dmitry Kurochkin a87a6b99f9 Don't re-compress .gz & al. in notmuch-show-save-part.
Write-region handles some file names specially, see Emacs Lisp
manual section 25.11 Making Certain File Names "Magic" [1].  This
is a nice feature for normal text editing, but it is not
desirable if we need to save raw file content (e.g. attachment).
In particular, this affects archives and may result in corrupted
attachments saved with notmuch-show-save-part (attachment button
click handler).

Turns out, smart GNUS folks encountered the same problem and
implemented write-region wrapper which inhibits some file name
handlers.  In particular, this wrapper is used in mm-save-part,
which is why notmuch-save-attachments that uses it works fine
with archives.

The patch replaces write-region with mm-write-region in
notmuch-show-save-part.  Also it removes coding-system-for-write
and require-final-newline setting in notmuch-show-save-part.  The
former is set in mm-write-region.  The latter seems to be
unneeded because mm-save-part does not use it.

[1] http://www.gnu.org/s/emacs/manual/html_node/elisp/Magic-File-Names.html
2011-05-31 15:04:52 -07:00
..
coolj.el emacs: Add more functions to clean up text/plain parts 2010-04-26 10:05:46 -07:00
Makefile emacs: Move emacs UI (currently just one file) to subdirectory. 2010-03-09 12:13:33 -08:00
Makefile.local emacs: Add support for PGP/MIME verification/decryption 2011-05-27 16:22:00 -07:00
notmuch-address.el emacs: Tell the user how many addresses matched when completing 2010-04-26 10:58:42 -07:00
notmuch-crypto.el emacs: Give mutlipart/{signed, encrypted} their own part handler. 2011-05-27 16:22:00 -07:00
notmuch-hello.el emacs: Make the queries used in the all-tags section configurable 2011-05-26 14:34:41 -07:00
notmuch-lib.el emacs: Add support for PGP/MIME verification/decryption 2011-05-27 16:22:00 -07:00
notmuch-logo.png emacs: Add notmuch-hello.el, a friendly frontend to notmuch 2010-04-23 12:50:18 -07:00
notmuch-maildir-fcc.el emacs: Use truenames for Fcc paths. 2010-12-07 13:47:59 -08:00
notmuch-message.el emacs: add notmuch-before- and notmuch-after-tag-hook 2011-05-24 13:28:41 -07:00
notmuch-mua.el emacs: Add support for PGP/MIME verification/decryption 2011-05-27 16:22:00 -07:00
notmuch-query.el emacs: Add support for PGP/MIME verification/decryption 2011-05-27 16:22:00 -07:00
notmuch-show.el Don't re-compress .gz & al. in notmuch-show-save-part. 2011-05-31 15:04:52 -07:00
notmuch-wash.el Carefully manage save/restore of point in `notmuch-wash-toggle-invisible-action'. 2011-05-24 16:33:09 -07:00
notmuch.el emacs: Add support for PGP/MIME verification/decryption 2011-05-27 16:22:00 -07:00