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

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

Date: Fri, 11 Jul 2014 08:48:52 -0300

To: Austin Clements, notmuch@notmuchmail.org

Cc:

From: David Bremner


Austin Clements <amdragon@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.

Thread: