From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id ILfBETJeAGYmBgEAqHPOHw:P1 (envelope-from ) for ; Sun, 24 Mar 2024 18:09:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id ILfBETJeAGYmBgEAqHPOHw (envelope-from ) for ; Sun, 24 Mar 2024 18:09:06 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=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; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711300146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=98d8TN+lqGgjai+3vgRib0kPuJjLXS4CxgCOlB9UbLs=; b=Cb3Iu/Qz/IiKRmtxsj7CmVos3SBt3mMTfP4Pk2pV/7wsP5mmjUE1m/HYQXUz0Lnt3exZ9W VIw2nB8bYbekqVeMcPAsdVPmBK6a7eCb/i6ya9npBJifOAx7LybQMMcjpFPNlCVCyWqJbf rELOgIyVtuAiDZMxs8uK5Z23fLdo6AxkLPk1T7kMDnheIKWgc/IQwgbAeYVWFsmLYaS2/C HtpkHYcy0Zbd40B7M/tWuNZ5vI6S4DLCoDaYtpqnUTXof0mtw/KE/q+uchzwo+lmNSoQoo JAYxpESVHvLpWnBpWhlgq4KiyHYYAoMPp/VbuxjpzWVGhkZ3Mx6XYRLLRuPRBA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711300146; a=rsa-sha256; cv=none; b=QXCzpvJoQDiB87gXI5rM/m/d3jKQLZzPqK2qYbf/idYv41ZlmRmepeiRPMgyVYQgZPRBDR c/s0qaJfmdbZ/pC6h6e3SZgZv42ySi2cfT2SiLxiiTwLEr9BTfD8v2sPvsVGbINxnwUYpN 2eBpgHmjGEzxmVCRFdcUwabnv++J0EhBrRJ4VL1inT7mWIcgp62M9q1MlJ2Qs0OowkBy0z fUJV8oIRXF2ZXYpoiMnxmOfYDvVeHCox2DSVqFtn3bQbZ5jFLpPRd+h48zUTeicKDaPczZ PK7X7+0UuMWenrhvAT8IfnPHUOKeTg9b/eEOXlkhuh70Ie815Mb+g6o6T8Gvcw== 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 72F9342A6A for ; Sun, 24 Mar 2024 18:09:05 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id AEFF75E50E; Sun, 24 Mar 2024 17:08:57 +0000 (UTC) Received: from 3.mo580.mail-out.ovh.net (3.mo580.mail-out.ovh.net [178.33.255.153]) by mail.notmuchmail.org (Postfix) with ESMTPS id 06BB45E502 for ; Sun, 24 Mar 2024 17:08:55 +0000 (UTC) Received: from mxplan8.mail.ovh.net (unknown [10.109.148.239]) by mo580.mail-out.ovh.net (Postfix) with ESMTPS id 4V2jFy3q1yz16q4; Sun, 24 Mar 2024 17:08:54 +0000 (UTC) Received: from telenieko.com (37.59.142.109) by mxplan8.mail.ovh.net (172.16.2.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.37; Sun, 24 Mar 2024 18:08:53 +0100 X-OVh-ClientIp: 2.152.92.61 From: Marc Fargas To: Carl Worth , Subject: Re: notmuch.el, needs without-restriction to properly save draft In-Reply-To: <87frwtg2k6.fsf@wondoo.home.cworth.org> References: <87wmq6rt2f.fsf@marcfargas.com> <87frwtg2k6.fsf@wondoo.home.cworth.org> User-Agent: Notmuch/0.38.3 (https://notmuchmail.org) Emacs/29.2 (x86_64-pc-linux-gnu) Date: Sun, 24 Mar 2024 18:08:52 +0100 Message-ID: <874jcvsgkb.fsf@marcfargas.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Ovh-Tracer-GUID: 3f5cc336-f89a-4aeb-9b90-ccc583d55d4c X-Ovh-Tracer-Id: 6784109892907371930 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledruddtjedgleelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufgjfhgffffkgggtsehmtderredtreejnecuhfhrohhmpeforghrtgcuhfgrrhhgrghsuceothgvlhgvnhhivghkohesthgvlhgvnhhivghkohdrtghomheqnecuggftrfgrthhtvghrnhepffeigfdutddvhfffudelgeevhefgfedtgffhffdtffeltdeutdevheehfeefffdvnecukfhppeduvdejrddtrddtrddupddvrdduhedvrdelvddriedupdefjedrheelrddugedvrddutdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehtvghlvghnihgvkhhosehtvghlvghnihgvkhhordgtohhmpdhnsggprhgtphhtthhopedvpdhrtghpthhtoheptgifohhrthhhsegtfihorhhthhdrohhrghdprhgtphhtthhopehnohhtmhhutghhsehnohhtmhhutghhmhgrihhlrdhorhhgpdfovfetjfhoshhtpehmohehkedtpdhmohguvgepshhmthhpohhuth Message-ID-Hash: CXKPL2TDYDNKXKCHPFJYKCJQM524SNQR X-Message-ID-Hash: CXKPL2TDYDNKXKCHPFJYKCJQM524SNQR X-MailFrom: telenieko@telenieko.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: X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN X-Spam-Score: -3.74 X-Migadu-Queue-Id: 72F9342A6A X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -3.74 X-TUID: 4KWVbXueeXm/ --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, El mi=C3=A9. 13 de mar. 2024, Carl escribi=C3=B3: > (...) > Could you put your fix together in the form of a git-appliable patch? > Such as by applying it to the notmuch source, running `git commit` and > then `git format-patch HEAD~` or similar. Please disregard the previous patch, consider the one attached here. Hope I did the "format-patch" thing properly. I had to move the `without-restriction` call to the top of the `with-temporary-notmuch-message-buffer` defmacro. It does work properly now. marc PS: Resent while properly attaching the patch file (I hope, and apologies). --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename="0001-Use-without-restriction-in-with-temporary-notmuch-me.patch" >From 48efd572e6b8e6d214fc8b4e7b28f001fc13345a Mon Sep 17 00:00:00 2001 From: Marc Fargas Date: Thu, 14 Mar 2024 15:56:49 +0100 Subject: [PATCH] Use `without-restriction` in `with-temporary-notmuch-message-buffer` This ensures that the temporary copy of the current message-mode buffer is whole and not limited by a current restriction. An example of such restriction is the default one established by message-mode when composing a reply, that hides the References, In-Reply-To and similar headers. --- emacs/notmuch-maildir-fcc.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index 5102078..cf50e85 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -145,14 +145,15 @@ Otherwise set it according to `notmuch-fcc-dirs'." (defmacro with-temporary-notmuch-message-buffer (&rest body) "Set-up a temporary copy of the current message-mode buffer." - `(let ((case-fold-search t) - (buf (current-buffer)) - (mml-externalize-attachments message-fcc-externalize-attachments)) - (with-current-buffer (get-buffer-create " *message temp*") - (message-clone-locals buf) ;; for message-encoded-mail-cache - (erase-buffer) - (insert-buffer-substring buf) - ,@body))) + `(without-restriction + (let ((case-fold-search t) + (buf (current-buffer)) + (mml-externalize-attachments message-fcc-externalize-attachments)) + (with-current-buffer (get-buffer-create " *message temp*") + (message-clone-locals buf) ;; for message-encoded-mail-cache + (erase-buffer) + (insert-buffer-substring buf) + ,@body)))) (defun notmuch-maildir-setup-message-for-saving () "Setup message for saving. -- 2.44.0 --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --=-=-=--