From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iGXwMM6jmGKw9AAAbAwnHQ (envelope-from ) for ; Thu, 02 Jun 2022 13:49:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id FvXSMM6jmGJRkQAAauVa8A (envelope-from ) for ; Thu, 02 Jun 2022 13:49:34 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::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 aspmx1.migadu.com (Postfix) with ESMTPS id 8B09F326FF for ; Thu, 2 Jun 2022 13:49:34 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 363145F7C7; Thu, 2 Jun 2022 11:49:32 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id D70C65F7C4 for ; Thu, 2 Jun 2022 11:49:29 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 2203A5FBD7; Thu, 2 Jun 2022 07:49:29 -0400 (EDT) Received: (nullmailer pid 3073924 invoked by uid 1000); Thu, 02 Jun 2022 11:49:27 -0000 From: David Bremner To: joshua@joshuao.com, notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: add paramter to not quote original message in replies In-Reply-To: <20220529151040.616780-1-joshua@joshuao.com> References: <20220529151040.616780-1-joshua@joshuao.com> Date: Thu, 02 Jun 2022 08:49:27 -0300 Message-ID: <8735gnz3nc.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 24KVKGRAH5YYLZG6MLGK4IYTHYWERIYL X-Message-ID-Hash: 24KVKGRAH5YYLZG6MLGK4IYTHYWERIYL X-MailFrom: david@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 CC: Joshua O'Connor 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=1654170574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc: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=vTUdCp5I4qRzxE8Ezd33/Jdt3HV1zmMQzhxMH8u9oxQ=; b=RDsvlgR42JgdHWp12+2l3OlZV28DUI5mhY4gEajewM/0qg5CeYWfe8bLcphaMekXwtyC9D 6dZtpTQxTMP+9/m3tQTNYMlr+SI0J036n76M4/IJ6iLt9VTVAcWv/Ykdea0anTQZuuOMep FZyRHp2TDbhtlcrwZv/USgDSBuRfO8FYD4o+rk+fPsTRpLAKtzlJ5GzIElTIDj7oc+Q5FI DKAtT0EI635yRBqmt7FH1AIhQRovIL6k9m7+s1J6jWXe39fCJ98CPgUS8kC6fXmp+Glcdk Qe3csesn1+jeAXgF6tLVv7+rgZBuLYvHHx4w6D0fixX4VoK4j/LkTmgVBmUTwQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654170574; a=rsa-sha256; cv=none; b=b3SiefhVUYOCqT1g3XVVHvvALxBKH83zElz5d1Kve0E+Ff7B0oOyEitkNKTjyphIf9CKpS iEuZgaSOZRuqL1C+Xhcuc6Vkl/4gzqsjtsU7vN8oZy7Me1j/65UpTg6WgCJMTUTxulBQe4 S/HAeu/cxxz7sYas1qQ3acWj07YjixAfpCeIauOmhUbxltu9ky7PilCftCEKnP4ufCiGhg 7I//xc6pXvguoN5Rm5ckygsUorzxZoXJDAphf8j+UvfrcVU7b08uTrpC8gz6mMNAWDNpcI sf9Oy2/+a64g8BYDkZgTrIzCy0xuk2Vz8MfgdYYKmsKLrJ13h7QDIAVDpBbFxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.57 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 8B09F326FF X-Spam-Score: -2.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: At4wnbVfzk7U joshua@joshuao.com writes: > From: Joshua O'Connor > > While the default reply function does nicely set the region to the > quoted text to allow for easy an easy kill-region, at least one > package, org-msg, interprets the incoming citation (or not) and > operates on it. Adding this parameter makes it feasible for users of > that library to write their own notmuch-show-reply-sender-esque > function for this purpose. Since this changes / extends the API, it should have a test. test/T453-reply.sh has an example you can probably copy and modify for your purposes. Feel free to use a different message from the standard corpus. > --- > emacs/notmuch-mua.el | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el > index 60801f4b..b37bab0d 100644 > --- a/emacs/notmuch-mua.el > +++ b/emacs/notmuch-mua.el > @@ -234,7 +234,7 @@ Typically this is added to `notmuch-mua-send-hook'." > > ;;; Mua reply > > -(defun notmuch-mua-reply (query-string &optional sender reply-all) > +(defun notmuch-mua-reply (query-string &optional sender reply-all omit-original) > (let ((args '("reply" "--format=sexp" "--format-version=5")) > (process-crypto notmuch-show-process-crypto) > reply > @@ -280,6 +280,7 @@ Typically this is added to `notmuch-mua-send-hook'." > (when notmuch-message-replied-tags > (setq notmuch-message-queued-tag-changes > (list (cons query-string notmuch-message-replied-tags)))) > + (unless omit-original Please do a separate commit with the whitespace cleanup this requires. Just following the automatic indentation of emacs is most likely fine (and encouraged). > ;; Insert the message body - but put it in front of the signature > ;; if one is present, and after any other content > ;; message*setup-hooks may have added to the message body already. > @@ -327,7 +328,7 @@ Typically this is added to `notmuch-mua-send-hook'." > (set-mark (point)) > (goto-char start) > ;; Quote the original message according to the user's configured style. > - (funcall notmuch-mua-cite-function))) > + (funcall notmuch-mua-cite-function)))) > ;; Crypto processing based crypto content of the original message > (when process-crypto > (notmuch-mua-reply-crypto (plist-get original :body)))) > @@ -512,12 +513,13 @@ the From: address." > (message-hide-headers) > (set-buffer-modified-p nil)))) > > -(defun notmuch-mua-new-reply (query-string &optional prompt-for-sender reply-all) > +(defun notmuch-mua-new-reply (query-string &optional prompt-for-sender reply-all omit-original) > "Compose a reply to the message identified by QUERY-STRING. > > If PROMPT-FOR-SENDER is non-nil, the user will be prompted for > the From: address first. If REPLY-ALL is non-nil, the message > -will be addressed to all recipients of the source message." > +will be addressed to all recipients of the source message. If > +OMIT-ORIGINAL is non-nil, the orignial message will not be quoted." Please double check the spelling of your changes. There are several typos.