[PATCH 06/11] emacs: Remove broken `notmuch-get-bodypart-content' API

David Bremner david at tethera.net
Fri Jul 11 04:48:52 PDT 2014


Austin Clements <amdragon at MIT.EDU> writes:

> +This returns the content of the given part as a multibyte Lisp

What does "multibyte" mean here? utf8? current encoding?

> +string after performing content transfer decoding and any
> +necessary charset decoding.  It is an error to use this for
> +non-text/* parts."
> +  (let ((content (plist-get part :content)))
> +    (when (not content)
> +      ;; Use show --format=sexp to fetch decoded content
> +      (let* ((args `("show" "--format=sexp" "--include-html"
> +		     ,(format "--part=%s" (plist-get part :id))
> +		     ,@(when process-crypto '("--decrypt"))
> +		     ,(notmuch-id-to-query (plist-get msg :id))))
> +	     (npart (apply #'notmuch-call-notmuch-sexp args)))
> +	(setq content (plist-get npart :content))
> +	(when (not content)
> +	  (error "Internal error: No :content from %S" args))))
> +    content))

I'm a bit curious at the lack of setting "coding-system-for-read" here.
Are we assuming the user has their environment set up correctly? Not so
much a criticism as being nervous about everything coding-system
related.

I didn't see anything else to object to in this patch or the previous
one.


More information about the notmuch mailing list