emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Derek Chen-Becker <derek@chen-becker.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] Cannot tangle src block in capture buffer [9.7.6]
Date: Sun, 12 Jan 2025 15:24:52 -0700	[thread overview]
Message-ID: <CAMbmz5=mtCm++HLXybS_xBWwp50qtgyuNO-hOz4yytgspXh6iA@mail.gmail.com> (raw)
In-Reply-To: <87sepox9oy.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]

On Sun, Jan 12, 2025 at 9:43 AM Ihor Radchenko <yantar92@posteo.net> 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:

❯ 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 <tangled-file-name>)
>
> 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

-- 
+---------------------------------------------------------------+
| Derek Chen-Becker                                             |
| GPG Key available at https://keybase.io/dchenbecker and       |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---------------------------------------------------------------+

[-- Attachment #2: Type: text/html, Size: 4689 bytes --]

      reply	other threads:[~2025-01-12 23:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-26 16:29 [BUG] Cannot tangle src block in capture buffer [9.7.6] Dilip
2024-08-05 14:03 ` Ihor Radchenko
2024-12-16  3:26   ` Derek Chen-Becker
2024-12-16 17:39     ` Ihor Radchenko
2024-12-19 17:56       ` Derek Chen-Becker
2024-12-19 19:17         ` Ihor Radchenko
2024-12-23 23:36           ` Derek Chen-Becker
2024-12-24  9:14             ` Ihor Radchenko
2025-01-10 15:25               ` Derek Chen-Becker
2025-01-11  9:17                 ` Ihor Radchenko
2025-01-12 15:52                   ` Derek Chen-Becker
2025-01-12 16:45                     ` Ihor Radchenko
2025-01-12 22:24                       ` Derek Chen-Becker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMbmz5=mtCm++HLXybS_xBWwp50qtgyuNO-hOz4yytgspXh6iA@mail.gmail.com' \
    --to=derek@chen-becker.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).