emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "numbchild@gmail.com" <numbchild@gmail.com>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: buffer-file-name in [* Org src *] buffers
Date: Mon, 12 Mar 2018 11:47:23 +0800	[thread overview]
Message-ID: <CAL1eYuKyJjbm4XTcwvKB+ZTOoLaQ1OR1PRWgz=6EEZeMk8Zqwg@mail.gmail.com> (raw)
In-Reply-To: <f9a5f45d-f1eb-a4b3-6226-2bfd8bfaf293@gmail.com>

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

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

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

  reply	other threads:[~2018-03-12  3:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-11 22:56 buffer-file-name in [* Org src *] buffers Clément Pit-Claudel
2018-03-12  3:47 ` numbchild [this message]
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

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='CAL1eYuKyJjbm4XTcwvKB+ZTOoLaQ1OR1PRWgz=6EEZeMk8Zqwg@mail.gmail.com' \
    --to=numbchild@gmail.com \
    --cc=cpitclaudel@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).