]> git.notmuchmail.org Git - notmuch/commit
emacs: notmuch-show-view-raw-message clears buffer, makes it read-only
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 2 Sep 2015 14:34:39 +0000 (17:34 +0300)
committerDavid Bremner <david@tethera.net>
Sat, 21 Nov 2015 12:02:10 +0000 (08:02 -0400)
commitbfb709851406255d87e1427b7c94f3204d9ea743
tree03d3205c404cd8a69b416cddf9c96cf12961ef46
parent40325352db282e829ce39a2a07117c713b924f0d
emacs: notmuch-show-view-raw-message clears buffer, makes it read-only

notmuch-show-view-raw-message() re-uses buffer created with same
name (same Message-Id:) but it did not erase it before filling.
If this ever happened, there were duplicated (potentially overlapping)
content in the buffer. Now this is fixed.
Apparently since emacs 24.5 the (view-buffer) makes the buffer read-only;
so this problem would not have happened there, just that
notmuch-show-view-raw-message() failed. This is fixed by setting
inhibit-read-only t before erasing and filling the buffer. The emacs 24.5
feature having raw message buffer read-only is also now explicitly set to
the buffer so the same experience is available with emaces < 24.5.
emacs/notmuch-show.el