emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* buffer-file-name in [* Org src *] buffers
@ 2018-03-11 22:56 Clément Pit-Claudel
  2018-03-12  3:47 ` numbchild
  2018-03-12 14:38 ` Nicolas Goaziou
  0 siblings, 2 replies; 7+ messages in thread
From: Clément Pit-Claudel @ 2018-03-11 22:56 UTC (permalink / raw)
  To: emacs-orgmode

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.

 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-27  5:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-11 22:56 buffer-file-name in [* Org src *] buffers Clément Pit-Claudel
2018-03-12  3:47 ` numbchild
2018-03-12 14:38 ` Nicolas Goaziou
2018-03-14 14:18   ` Clément Pit-Claudel
2018-03-14 19:57     ` Nicolas Goaziou
2018-04-26 23:34     ` Bastien
2018-04-27  5:06       ` Clément Pit-Claudel

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