From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 6Ik8FciyKWfFGAEAe85BDQ:P1 (envelope-from ) for ; Tue, 05 Nov 2024 05:53:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 6Ik8FciyKWfFGAEAe85BDQ (envelope-from ) for ; Tue, 05 Nov 2024 06:53:12 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=lvGbXUMI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730785992; a=rsa-sha256; cv=none; b=HZ3Yr6ljSNC5VFgnlOWzGJsMsDxZhzWZswq0BesnYRFq9xbzFDFrNFF4aRy/kn40mDEufl qCD1Z7wZNbsnFfmp6K97vHnFQvHk0lfLXWS6D1aJTB+7sfVN6JBt76hxndDi8n5DhnQUBL uJ6rvZFSxgRpMcvlpfFolAgusdYEZWkVDPUy7feSR9oXlUreEnQBj0X3+HM3Sn23Zc83di TYenx0ARgLCdPGgezD8vS70iU8JQ/HWiqHjVJCstoegASx9NJXz5zT+/wWg1ps2CyofEs7 aSlRLGg9N/M/BHNwGz5eLCkl6DszQglH1Ku9NgCGutlhDADqB5Wpo/4arbkg8w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=lvGbXUMI; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1730785992; 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:dkim-signature; bh=HHb0fr1Dyvu0wwYE7re+wl5GqCM7gmP/+eVokUomZxE=; b=fSHRtv2JQE9gUeyOFSvr5mVzOm8NJE0s+HwxtHPI76Mxq1Nu1XO88xsAEEXnxIin4xLZXI btR8NVbjqXYCJb4j2lOv97EE4nk9M/c3qTL6a3sOKimeUyhiM9V5TZlvr9aWmY2/9Kp21O n3L+CXLAjTx0A4TBD1YW3RWUC/6TblZD/0dt9SUWJLCB2iY7cBEVZBjpNAIBqdi+fGOe2A P1SNMmO1ae9U3KNj3YoXCBbdTCx81SRSJ1/U0fgJ/aX47+K6G+wFmC8VkogqRuhycjpgDN TwzT+Fe1hEXd5Go191wd3mX7U+xEpUGW2+NC+Y59wYbf8+dcPWbKI20+jbinGA== 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 E45A01A500 for ; Tue, 05 Nov 2024 06:53:11 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 53FD75E525; Tue, 5 Nov 2024 05:45:53 +0000 (UTC) Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by mail.notmuchmail.org (Postfix) with ESMTPS id BCD345E29F for ; Tue, 5 Nov 2024 05:45:49 +0000 (UTC) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2fc96f9c41fso52905981fa.0 for ; Mon, 04 Nov 2024 21:45:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730785549; x=1731390349; darn=notmuchmail.org; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=cVoCrKvIIpC8ZbMTpoN/dYkJhEyLDllSbqvNfPq9vv0=; b=lvGbXUMIHOIGk+hvKoVUnxKU/DEDzMPYmsNLQTBn2JEdL3VYH+PKqrCIgtWzTp/HhE AfZOc74S97U6bdrq9Wf+2vExaoYpk0dkevIQdJ86EoPJBo9YUuAPu8ekJdJ02MnNu/x1 igDesC/6g8ZO8FREWkCAoEVNwfRWU542F1/rMZ06PaKR9B5oAI3XnyQrbva8X0n7Z4kU xE4dnrbL9Vmbo26Lnnfq+p33rtK3I5ZRmC3O5b8VC2lzzMugFfT7oc+qW+Tu9byQe5W6 QiDyNq7R+5bwQexUFJ6BK5Z0QsVDCKWC42FFV3zPqKoOqeoo3sRvLdB+eBVyMR2aN/Ns 4FJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730785549; x=1731390349; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cVoCrKvIIpC8ZbMTpoN/dYkJhEyLDllSbqvNfPq9vv0=; b=pvQrZURJOwd0H2LgmIhSpkXZemkIy//+WCbwv42mpNa3pxxpIaQoroz5LmUWF8DOrq nq6Vsrzh8ye8MrkY3YIyGbGqkjrBTwdYxeZWRAYcQbEf5UpFVCiz+uL1wUYh/G74jAuS LLVFFA58xUru4ggXj9A3RGGr8TQULLlgs0cTJcgHFxcprBnH5gX46cRGkz3k/AJIOMIe ZrGEl4YxJGdABtoklCkoRSO9xQHu/hsJwtqPjzlkxODV+QmHcJXi2qbW/tdfIgLD3nNH 5BaoUFfU5tnLUY97f06UCil4lFc8frg1H28YldgGN5fYbXUg8PI/m52xGQxVY0dOoQfw zP6w== X-Forwarded-Encrypted: i=1; AJvYcCW/3R8Wznx63YfYE54bsmfgAqI5uyO9iyJP435hJfdalgJTl4FAAtpFZLBkGs7QiV6YTl5stfnJ@notmuchmail.org X-Gm-Message-State: AOJu0YxjkynyjyYRr+2ap4IazA3VULw2nBhPrdxYFJY4vdeP5HhTFe28 dngkkRxIFwmiFd6vOTu430QonxjDv/U24hM+JeTaLNmGbPHQgWaj7r9dpnk/0EMkRKQCkzbpbk5 aOeg9niwmY4TLKBu8e4M3PFDJf1GekJbJ X-Google-Smtp-Source: AGHT+IEuV7AMfWIY95tdw/Jl9YzR5fWPVMuS82yQrQsQgxr9kOQZCgwiC10w9ZS1hANGbrSq1zix9Ad1u/ZbmPgrPD8= X-Received: by 2002:a05:651c:2115:b0:2f7:cac8:9e38 with SMTP id 38308e7fff4ca-2fedb46e118mr52363211fa.18.1730785548852; Mon, 04 Nov 2024 21:45:48 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 4 Nov 2024 21:45:48 -0800 From: Kristoffer Balintona In-Reply-To: <87ttdbrpf6.fsf@pengjiz.com> References: <87ttdbrpf6.fsf@pengjiz.com> MIME-Version: 1.0 Date: Mon, 4 Nov 2024 21:45:48 -0800 Message-ID: Subject: Re: Obey message-cite-reply-position from Emacs' message.el To: Pengji Zhang , notmuch@notmuchmail.org Message-ID-Hash: 7MVNY26ETL2JBYLTWXSEUS7GPYBARA7N X-Message-ID-Hash: 7MVNY26ETL2JBYLTWXSEUS7GPYBARA7N X-MailFrom: krisbalintona@gmail.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 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-Country: DE X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 5.93 X-Spam-Score: 5.93 X-Migadu-Queue-Id: E45A01A500 X-Migadu-Scanner: mx10.migadu.com X-TUID: 88h/NbOZwC2s On Thu, Oct 17 2024, Pengji Zhang wrote: > Kristoffer Balintona writes: > >> Hello, > > Hello! > >> The current behavior of notmuch accords with the user values of below >> and traditional but not above. >> >> The notmuch function responsible for the position of the signature >> (or, rather, the position of the citations) is notmuch-mua-reply. I >> have attached a patch that adds a brief snippet which obeys >> message-cite-reply-position when its value is above. > > This indeed seems reasonable. Thank you! I am not a maintainer, but here > are some comments of mine. > >> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el >> index bf62b656..1d1a1591 100644 >> --- a/emacs/notmuch-mua.el >> +++ b/emacs/notmuch-mua.el >> @@ -295,6 +295,20 @@ Typically this is added to `notmuch-mua-send-hook'." >> (when message-signature-insert-empty-line >> (forward-line -1)) >> (goto-char (point-max)))) >> + ;; If `message-cite-reply-position' is `above', e.g., for Gmail-like >> + ;; email replies, then before inserting the citation, put the point >> + ;; after the signature and insert a newline for spacing. Also respects >> + ;; if `message-cite-reply-position' is set via `message-cite-style'. >> + (when (or (equal message-cite-reply-position 'above) > > Nit: I think it is slightly better to use 'eq' instead of 'equal' here. > >> + (and message-cite-style >> + (eq (eval (cadr >> + (assoc 'message-cite-reply-position > > Likewise, here we may use 'assq'. > >> + (if (symbolp message-cite-style) >> + (eval message-cite-style) > > Here I think it is better to use 'symbol-value' instead of 'eval'. > >> + message-cite-style)))) >> + 'above))) >> + (goto-char (point-max)) >> + (insert "\n")) >> (let ((from (plist-get original-headers :From)) >> (date (plist-get original-headers :Date)) >> (start (point))) > > Regards, > Pengji Hi Pengji, Thank you very much for your suggestions. I think they're valid. I've incorporated them into my new patches. -- In gratitude, Kristoffer