Package: emacs
While enriched-encode already sets inhibit-read-only to t to
avoid issues with any text bearing the read-only property [1] in
the encoded part, it doesn’t yet set inhibit-point-motion-hooks,
which easily results in incorrect encoding should text being
encoded contain parts protected with the ‘intangible’ property.
Example:
(with-temp-buffer
(insert "Hello, world!\n")
(re-search-backward "\\<")
(put-text-property (point) (point-max) 'intangible t)
(put-text-property (+ -1 (point)) (+ 1 (point)) 'face 'bold)
(put-text-property (+ 2 (point)) (+ 3 (point)) 'face 'italic)
(enriched-encode (point-min) (point-max) nil)
(buffer-substring-no-properties (point-min) (point-max)))
"Content-Type: text/enriched
Text-Width: 72
Hello, <italic>world!
"
With the trivial patch MIMEd, this results in the following
(correct) string instead:
"Content-Type: text/enriched
Text-Width: 72
Hello, world!
"
[1] http://www.gnu.org/software/emacs/manual/html_node/elisp/Special-Properties.html
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A