From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6O6yAslL+19fTwAA0tVLHw (envelope-from ) for ; Sun, 10 Jan 2021 18:47:37 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CH3/OchL+1/jCAAAbx9fmQ (envelope-from ) for ; Sun, 10 Jan 2021 18:47:36 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9A54B9404FF for ; Sun, 10 Jan 2021 18:47:35 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D1CEE29CF8; Sun, 10 Jan 2021 13:47:26 -0500 (EST) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id EB27128C1D for ; Sun, 10 Jan 2021 13:47:23 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 0907A1669F for ; Sun, 10 Jan 2021 19:47:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-transfer-encoding:mime-version:x-mailer:message-id:date :date:subject:subject:from:from:received:received; s=sel2011a; t=1610304442; bh=NnSC4L9hzOL09v6hQJzcwCydD7tTEjEdl8RiWB1VCm0=; b= XBkrUs4x1UsnwS/n0kj1e3XiAqDxCVw1mdg3CjORu3ONYjBeDb2gexGtGV5jSTTz EQaKaRWCYgGmj0pFYYVhoa4Wh+TuzUEgef45fdnZ+sdwmw2Ev8GQIilnUe5kIP6c BOhj/w7LJeDil6JxW26I3FwtJ2CRsrSb0+/OleOxciQ= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id gCTjCTfbfFTe for ; Sun, 10 Jan 2021 19:47:22 +0100 (CET) Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id CCD5B160BA for ; Sun, 10 Jan 2021 19:47:22 +0100 (CET) From: Jonas Bernoulli To: notmuch@notmuchmail.org Subject: [PATCH 0/4] emacs: avoid type errors due to nil as content-type Date: Sun, 10 Jan 2021 19:47:18 +0100 Message-Id: <20210110184722.29294-1-jonas@bernoul.li> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Message-ID-Hash: 7LCZN6S4PFSUOV6NR3RWT2ES44QBS67T X-Message-ID-Hash: 7LCZN6S4PFSUOV6NR3RWT2ES44QBS67T X-MailFrom: jonas@bernoul.li X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.06 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=bernoul.li header.s=sel2011a header.b=XBkrUs4x; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 9A54B9404FF X-Spam-Score: 0.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: EkUM53Lz67RN The fourth commit tries to address the issue raised in id:87k0sxa6c3.fsf@fifthhorseman.net. The output of "notmuch show --format=sexp --format-version=4" may contain `:content-type' entries with `nil' as the value, when it fails to detect the correct value. Account for that in a few places where we would otherwise risk a type error. The other three commits cleanup the code I had to look at to do the above, because I just can't help myself. This does not apply without first applying id:20201214162401.19569-1-jonas@bernoul.li. Jonas Jonas Bernoulli (4): emacs: notmuch-mua-add-more-hidden-headers: use local binding emacs: notmuch-show--register-cids: fix names of bindings emacs: notmuch-show--get-cid-content: cosmetics emacs: avoid type errors due to nil as content-type emacs/notmuch-lib.el | 23 ++++++++++++---------- emacs/notmuch-mua.el | 7 +++---- emacs/notmuch-show.el | 46 +++++++++++++++++++++---------------------- 3 files changed, 39 insertions(+), 37 deletions(-) -- 2.30.0