[PATCH 1/3] NEWS: Insert markdown formatting commands in 0.13 section text

Tomi Ollila tomi.ollila at iki.fi
Thu May 17 12:09:35 PDT 2012


On Thu, May 17 2012, David Bremner <david at tethera.net> wrote:

> Tomi Ollila <tomi.ollila at iki.fi> writes:
>>
>> id:"1337152910-22371-4-git-send-email-tomi.ollila at iki.fi"
>> id:"1337152910-22371-5-git-send-email-tomi.ollila at iki.fi"
>> id:"1337152910-22371-6-git-send-email-tomi.ollila at iki.fi"
>> id:"1337152910-22371-7-git-send-email-tomi.ollila at iki.fi"
>
> I pushed those to release. I'll merge them to master after a bit;
> hopefully we'll figure out that reply encoding thing and do a bug fix
> release.

I got it working by doing this:

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 7fa441a..7523bb6 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -244,7 +244,9 @@ the given type."
 current buffer, if possible."
   (let ((display-buffer (current-buffer)))
     (with-temp-buffer
-      (let* ((charset (plist-get part :content-charset))
+      ;; (let* ((charset (or (plist-get part :content-charset) "utf-8"))
+      ;; (let* ((charset (or (plist-get part :content-charset) "latin-1"))
+      (let* ((charset (or (plist-get part :content-charset) 'gnus-decoded))
 	     (handle (mm-make-handle (current-buffer) `(,content-type (charset . ,charset)))))
 	;; If the user wants the part inlined, insert the content and
 	;; test whether we are able to inline it (which includes both
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

(using "latin-1" also provided desired results... but with "utf-8" results
were the same as with default 'nil)

But, for consistency (with `notmuch show ...` handling), when content-type
is "text/plain" (and as `notmuch reply --format=json` provides text/plain
content inline) we should use the construct 
`(insert (notmuch-get-bodypart-content msg part nth ...)` to insert that
content (as done before f6c170fabca8f39e74705e3813504137811bf162 and is
also done in `notmuch-show-insert-part-text/plain`).

If anyone is faster than me to provide patch what would be fine ;)

> d

Tomi


More information about the notmuch mailing list