I agree, should compatible with situations like `flycheck` need to use
buffer-file-name.

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Mon, Mar 12, 2018 at 6:56 AM, Clément Pit-Claudel <cpitclau...@gmail.com>
wrote:

> 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.
>
>
>
>

Reply via email to