[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] buffer-file-name in [* Org src *] buffers
From: |
Clément Pit-Claudel |
Subject: |
[O] buffer-file-name in [* Org src *] buffers |
Date: |
Sun, 11 Mar 2018 18:56:48 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Hi all,
TL;DR: why does org-src-mode-configure-edit-buffer set buffer-file-name to a
non-nil value?
https://code.orgmode.org/bzg/org-mode/commit/4b6988bf36cb458c9d113ee4332e016990c1eb04#diff-ea848b037ba2c0bf95915700bb6f4e539d80d8cR486
Background information: I'm reviewing a patch
(https://github.com/flycheck/flycheck/pull/1426) to enable Flycheck in
temporary buffers created by org-mode while editing a code snippet with
org-edit-src-code (among others). The patch teaches Flycheck to append an
checker-appropriate extension to the temporary files that it creates: for
example, when editing a Python snippet from an Org file, Flycheck would now
create a file named /tmp/<random string>.py instead of /tmp/<random string>
(which would make Python happy).
We're thinking of enabling this automatic suffix addition behavior only for
buffers that do not have a buffer-file-name currently set (in the ones that do,
Flycheck already derives file names for its temporary files from the buffer's
file name), but we were surprised to find that [* Org src *] actually have a
buffer-file-name.
Why is that?
Thanks,
Clément.
- [O] buffer-file-name in [* Org src *] buffers,
Clément Pit-Claudel <=