From 81515745c73708c2f1ba45dd20cdc2059fe68345 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 12 Jul 2014 08:48:52 +2100 Subject: [PATCH] Re: [PATCH 06/11] emacs: Remove broken `notmuch-get-bodypart-content' API --- eb/7278c2bdd5fe26aaf78c765f1074b4f4aaa982 | 82 +++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 eb/7278c2bdd5fe26aaf78c765f1074b4f4aaa982 diff --git a/eb/7278c2bdd5fe26aaf78c765f1074b4f4aaa982 b/eb/7278c2bdd5fe26aaf78c765f1074b4f4aaa982 new file mode 100644 index 000000000..c98303fa2 --- /dev/null +++ b/eb/7278c2bdd5fe26aaf78c765f1074b4f4aaa982 @@ -0,0 +1,82 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id B0D4E431FAF + for ; Fri, 11 Jul 2014 04:49:07 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id ujqRBAecQr4Z for ; + Fri, 11 Jul 2014 04:49:02 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id E6946431FAE + for ; Fri, 11 Jul 2014 04:49:02 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1X5ZJw-0004Ry-HP; Fri, 11 Jul 2014 08:48:56 -0300 +Received: (nullmailer pid 7290 invoked by uid 1000); Fri, 11 Jul 2014 + 11:48:52 -0000 +From: David Bremner +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH 06/11] emacs: Remove broken + `notmuch-get-bodypart-content' API +In-Reply-To: <1398105468-14317-7-git-send-email-amdragon@mit.edu> +References: <1398105468-14317-1-git-send-email-amdragon@mit.edu> + <1398105468-14317-7-git-send-email-amdragon@mit.edu> +User-Agent: Notmuch/0.18.1+22~gbf82697 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Fri, 11 Jul 2014 08:48:52 -0300 +Message-ID: <8738e8p13v.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 11 Jul 2014 11:49:07 -0000 + +Austin Clements 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. -- 2.26.2