From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IMD9JuB55mLODwAAbAwnHQ (envelope-from ) for ; Sun, 31 Jul 2022 14:47:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wC4DJ+B55mIOegEA9RJhRA (envelope-from ) for ; Sun, 31 Jul 2022 14:47:28 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (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 aspmx1.migadu.com (Postfix) with ESMTPS id 31CBD1FDF9 for ; Sun, 31 Jul 2022 14:47:28 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A71795E021; Sun, 31 Jul 2022 12:47:25 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 826B35E00B for ; Sun, 31 Jul 2022 12:47:22 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id D3B515FBC0; Sun, 31 Jul 2022 08:47:21 -0400 (EDT) Received: (nullmailer pid 2870827 invoked by uid 1000); Sun, 31 Jul 2022 12:47:20 -0000 From: David Bremner To: David Bremner , notmuch@notmuchmail.org Subject: [PATCH v2] emacs: add docstring for notmuch-show-choose-duplicate Date: Sun, 31 Jul 2022 09:46:51 -0300 Message-Id: <20220731124650.2870734-1-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220730234551.2623885-2-david@tethera.net> References: <20220730234551.2623885-2-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: DGZTNPEUPSV7PVXBW2GBGG2X23K2MDXJ X-Message-ID-Hash: DGZTNPEUPSV7PVXBW2GBGG2X23K2MDXJ X-MailFrom: bremner@tethera.net 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; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659271648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=bM0yBd93t7I96R9W2Rrwq+OeQK4VKqh1BNaMMSlAd1E=; b=aNTf1LU/Dl8yLxw+FrzsU7hPMA0oSesE5exGCJ122zK2IPA19nQqAcNX87272J6iBzXKXj 9IBmpAkhnRwBY7Xx9T/n/FtSV9qhj2o6JQutUAp9kQSRlMD470YbqnxirNeOQk0wS6Au7K OIdlPInpafVV6zyNCDO/HZ7y/XYcbUMI8fhNhU+tMGEvF0DMHyFsY1esrNnJA70LuNDyWS tZu7kCW3PwMAc59eSAQPKtm25TEvG/KIFLPQ4O6PfcF1tZeSyy+2k1A4RjDaqwtBQZ+fKI TNsdTRlqxk3T+Oito7hCSYa+g5Gu3SYkrdtoj7QjvG8aSuBRW3xxAiTEFQniKw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659271648; a=rsa-sha256; cv=none; b=MsNh61PvFBDilKrGj3R+yX1/2rCvYorSqyDY7qTF/IVrqYjWm8vIaqKDr6jIKpa4RSNaKj Vhv2z3XEXmnmOctMV4V3cds2xx920Ymhtiv55fbCZGdrVe9PpQraX9MEyq+PmntoaqeqAx 7RRn9CkxLLgst/GSZJz6bCLuIjIOfE2GnGk8yJlmGdPhFo23qG6Y6yNBj3UqqfY+nlJ/uU u5tXkfiHDz8IviShTsJ75cOUHL3ArMG0yFl79/oq/i3aXpNuDWwmfjmysTnq6lIbgp5/Dp eUYyJhGCPVg7J6P/UHVdfrWAD6wS/ZbQSchuhkgNBNK7o8CXo0ZEj481/luJeg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.27 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 31CBD1FDF9 X-Spam-Score: -1.27 X-Migadu-Scanner: scn0.migadu.com X-TUID: qFKZLudvt76C It should have one in any case, but in particular it is needed for the manual. --- I realized my first attempt at a docstring didn't work well in the manual. emacs/notmuch-show.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 1bc3b319..6653358c 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1135,6 +1135,16 @@ is t, hide the part initially and show the button." (make-variable-buffer-local 'notmuch-show-previous-subject) (defun notmuch-show-choose-duplicate (duplicate) + "Display message file with index DUPLICATE in place of the current one. + +Message file indices are based on the order the files are +discovered by `notmuch new' (and hence are somewhat arbitrary), +and correspond to those passed to the \"\\-\\-duplicate\" arguments +to the CLI. + +When called interactively, the function will prompt for the index +of the file to display. An error will be signaled if the index +is out of range." (interactive "Nduplicate: ") (let ((count (length (notmuch-show-get-prop :filename)))) (when (or (> duplicate count) -- 2.35.2