From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 4KQnEmlKhGc7kwAA62LTzQ:P1 (envelope-from ) for ; Sun, 12 Jan 2025 23:04:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 4KQnEmlKhGc7kwAA62LTzQ (envelope-from ) for ; Mon, 13 Jan 2025 00:04:09 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=chen-becker.org header.s=google header.b=N4FKUG0a; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736723049; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fUs5uBJBZDHN80TyH3qNli+iUbcjyjtiM5HA4D3pW4c=; b=ONF16/BSBwiZpIPjfJ//0S09YnaH7zj8tFyqWmw6cIyuwaO17C+ejR2ZQsa6bA/HNvLR47 GBiO3yk5hsn+5E1qumGhmYJUbQ0iEbmpTzciM22/2LcBh3qHCDpM/jNaj5pYbWi0IKBY4p IR8rFn9Ure2srbN9Uw4sXsxUm7gFBvHzFffJxnJ9u/g84TEBo/Jkf4U0I+VPOaOrJKosp6 pZtAHjVWzTbZ+Tisp5nN4XG6cl9VY2CL3Sc2mSvyc3bzywS4tgzf1Gd3dkM1+KQlrC2pJO OmGSRcvVT+AlYSd809veCSpayWVI2pGVQtRaZQFhnwEzbnZktk8e2mtLL9gq8g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=chen-becker.org header.s=google header.b=N4FKUG0a; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736723049; a=rsa-sha256; cv=none; b=QRxCm3e4WgicC1AtBRFrzrMB2GvHpLNpDANo3L2lUpzH/wpYNXwUfENRKg//5xljTpZY02 qi1ANpXueoyLDkSFRhAA+Z6lsbp3TqCbkpIeNBvF0vy74B2EX+4Yt4/gVMEieHLkut+7y1 m06PQ5gO4Y5xc+pzEtYQItABEY8GFszfgCcjKwqYPlV/+Tj86HCqpoqZ1CSgNm3mT033ov NdDKoi46o0seaTrjJ38OA7Lc5/ePf13IxS+DjckMKA2CSDALi36svN5SGWmj+K9NgGEH2k U1i+F98gv12V0jYafGvJBPSaWWccHddkjaJb4986/QcHL9f44F/Pr6kAA+ilSg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BF41135681 for ; Mon, 13 Jan 2025 00:04:08 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tX6OQ-0006hx-Qv; Sun, 12 Jan 2025 17:25:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tX6OL-0006RC-7g for emacs-orgmode@gnu.org; Sun, 12 Jan 2025 17:25:09 -0500 Received: from mail-ua1-x92d.google.com ([2607:f8b0:4864:20::92d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tX6OH-0007F5-Mc for emacs-orgmode@gnu.org; Sun, 12 Jan 2025 17:25:08 -0500 Received: by mail-ua1-x92d.google.com with SMTP id a1e0cc1a2514c-85c436db302so1880689241.0 for ; Sun, 12 Jan 2025 14:25:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chen-becker.org; s=google; t=1736720703; x=1737325503; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fUs5uBJBZDHN80TyH3qNli+iUbcjyjtiM5HA4D3pW4c=; b=N4FKUG0a/uoj78P1ci9plbfB4zJ4uTjafH4wQQqqOk/pCmO0VnqSZhLmg5y0aaRbPB vBSGsoV/eYURv7qvQNTD7LXpOnhdyvOuSSANhJiAwNxSQvdsFivN1395FWrAm75UgV2k uwEyLTxSygQ/44Gg8kajJqMR5+zoyIe4jWtbx3mhan/Y2PDNFevmPxHgNkYzSM1X7Osp gVjPDjYZZcScHTGVSbLFPE2E7dRJc3v/+eKGizkLhmvrWWsx6kZ6MJH4CeSRJaytgUED 4rhTfAndaf8NeA08Yjc+PqD05C05jZlT3hYKLdT/NzY0u83QAEvzLYqQ9gdQXL89Orrr SBAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736720703; x=1737325503; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fUs5uBJBZDHN80TyH3qNli+iUbcjyjtiM5HA4D3pW4c=; b=PXazsQU6kSFxAMFSDetOZGmAfzcaKCh1G/ZqlX3ZzyXAn7R3LY0U4ltNDukdOj5CA6 3M0Ge8fcw/k/XiF520fhhwpQ70kYrFCZJFGGUTMfraMZB9OBPfj1r5NUseooK8Zfv4sM ZneZAFX8BjMeBS68bbtqtBeLHQ5MU/xFfwOuyUP0E8LGNqlagM/BTi1pLosiJSVm51No MebGnbjFyCiU4r9/rnBRUn392t1BgzV53Ywb95sY1rVN3NUba+mXDPiHzDn8LgfScNai KPqoApMtl9GT3V7HwyiE4EIea8hdTWpO2ikjQbnZMArHLDUFcO0MNJhsdIQzWY8VtRPf 8viQ== X-Gm-Message-State: AOJu0YwwBVeHvJDXWe4OswcUEjMvrnMsEzDqMkmtnSM73ClTI7N2NmyA 7cV4fzULVGWMQbT3t9cuIqluPxr3HR2H9lwbdftNRodX1TP2jWKFFt2XBNOqpGg0Pf7ZwGcsAKF uO/EHnQQkCdEcpDEWiTx8QCzyEFlOiZEhbRGfiJ8vq9SAS+qMS6E= X-Gm-Gg: ASbGncs4OLnT2PT6DbISrq9j5qDC2Gub4xl73zqJ0IdyQQu7eFF8HqIEG0Q3oDOMiSu AIatthkv6+0RS1vxugX4+Xktqe1hQ/h88Mio= X-Google-Smtp-Source: AGHT+IHtwLw1CbVLfmnDzzB/WZLDlLMoDyQV9QpWlqfqtqD+Mhx/WCyzVwm+ugSer4G5/c+4M1FPqCy3pgO0WG5tBI0= X-Received: by 2002:a67:bd10:0:b0:4b4:5e9b:3c30 with SMTP id ada2fe7eead31-4b5807e0d9bmr10188235137.9.1736720702966; Sun, 12 Jan 2025 14:25:02 -0800 (PST) MIME-Version: 1.0 References: <2dijBN1CGUPtmZzcNXZAe54y8u0pC8V_DYIBCL4rSR1eh2s8TFJGW5V3q7pkiCRFtEHYXy66CU7F6kK3NN_VAX-R_RbAXptG0b5vOlUQsi8=@protonmail.com> <87y15bcbi1.fsf@localhost> <877c7zede2.fsf@localhost> <874j2z7a8u.fsf@localhost> <87ttatigrx.fsf@localhost> <87msfxd81c.fsf@localhost> <87sepox9oy.fsf@localhost> In-Reply-To: <87sepox9oy.fsf@localhost> From: Derek Chen-Becker Date: Sun, 12 Jan 2025 15:24:52 -0700 X-Gm-Features: AbW1kvYVPeChP69N34Pt-70ueBjEwm9qFDc3GA3-YP5gJ_bQxD_uX3T8dsv4WcI Message-ID: Subject: Re: [BUG] Cannot tangle src block in capture buffer [9.7.6] To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000932c9f062b89ccee" Received-SPF: pass client-ip=2607:f8b0:4864:20::92d; envelope-from=derek@chen-becker.org; helo=mail-ua1-x92d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -2.69 X-Spam-Score: -2.69 X-Migadu-Queue-Id: BF41135681 X-TUID: pFzev0PyLPyL --000000000000932c9f062b89ccee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jan 12, 2025 at 9:43=E2=80=AFAM Ihor Radchenko wrote: > What if BUFFER is provided, but that buffer is already a base buffer? > Your function will then return file name for _current buffer_, not BUFFER= . > Hmmm, I thought I tested that but I can take a look and fix it. > > Also, what about other places in the code that use `buffer-file-name'? > We may want to use the new function there as well. > Definitely. There are hundreds of places in the code where the same pattern applies. Per our previous discussion in the thread, though, I thought it would be better to start small and incrementally work through them. If you want me to include more changes,I'm going to need to help sorting all of these out: =E2=9D=AF rg -q --stats buffer-file-name 185 matches 182 matched lines > Thanks for helping to improve the documentation here, but may you (1) > sepearate it into a new patch (this change is not relevant to > `buffer-file-name' bug); (2) maybe give an example of how to set > TEST_NO_AUTOCLEAN. > Sure, I'll do both. > This will leave the tangled file lying around. > Please explicitly remove it via > (unwind-protect ... > (delete-file ) > > See how `org-test-with-temp-text-in-file' macro does it. > Yes, my apologies, I had originally done this and stashed that part of the change while debugging the test. I'll fix that, too. Cheers, Derek --=20 +---------------------------------------------------------------+ | Derek Chen-Becker | | GPG Key available at https://keybase.io/dchenbecker and | | https://pgp.mit.edu/pks/lookup?search=3Dderek%40chen-becker.org | | Fngrprnt: EB8A 6480 F0A3 C8EB C1E7 7F42 AFC5 AFEE 96E4 6ACC | +---------------------------------------------------------------+ --000000000000932c9f062b89ccee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

<= /div>
On Sun, Jan 12, 2025 at 9:43=E2=80=AFAM Ihor Radchenko <yantar92@posteo.net> wrote= :
=C2=A0
What if BUFFER is provided, but that buffer is already a base buffer?
Your function will then return file name for _current buffer_, not BUFFER.<= br>

Hmmm, I thought I te= sted that but I can take a look and fix it.=C2=A0
=C2=A0

Also, what about other places in the code that use `buffer-file-name'?<= br> We may want to use the new function there as well.
Definitely. There are hundreds of places in = the code where the same pattern applies. Per our previous discussion in the= thread, though, I thought it would be better to start small and incrementa= lly work through them. If you want me to include more changes,I'm going= to need to help sorting all of these out:
=E2=9D=AF rg -q --stats buffer-file-name
185 matches
182 matched lines
=C2=A0
Thanks for helping to improv= e the documentation here, but may you (1)
sepearate it into a new patch (this change is not relevant to
`buffer-file-name' bug); (2) maybe give an example of how to set
TEST_NO_AUTOCLEAN.

S= ure, I'll do=C2=A0both.
=C2=A0
This will leave the tangled file lying aro= und.
Please explicitly remove it via
(unwind-protect ...
=C2=A0(delete-file <tangled-file-name>)

See how `org-test-with-temp-text-in-file' macro does it.

Yes, my apologies, I had originall= y done this and stashed that part of the change while debugging the test. I= 'll fix that, too.

Cheers,

Derek=

--
+---------------------= ------------------------------------------+
| Derek Chen-Becker=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|
| GPG Key available at <= a href=3D"https://keybase.io/dchenbecker" style=3D"font-family:monospace,mo= nospace" target=3D"_blank">https://keybase.io/dchenbecker and=C2=A0 =C2=A0 =C2=A0 =C2=A0|
| https= ://pgp.mit.edu/pks/lookup?search=3Dderek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB = C1E7=C2=A0 7F42 AFC5 AFEE 96E4 6ACC=C2=A0 |
+----------------------------------------------------= -----------+

--000000000000932c9f062b89ccee--