emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tom Gillespie <tgbugs@gmail.com>
To: gmauer@gmail.com
Cc: emacs-orgmode <emacs-orgmode@gnu.org>,
	Mirko Vukovic <mirko.vukovic@gmail.com>
Subject: Re: How to evaluate source code while in the edit buffer?
Date: Fri, 4 Dec 2020 16:37:00 -0500	[thread overview]
Message-ID: <CA+G3_PP9azvLF0xLsT15=Zob+N-dkGv=BsX5P45o8U6wJ5S=Yw@mail.gmail.com> (raw)
In-Reply-To: <CA+pajWJmYyfsiTyOcc5GDzbxsNO11fr2qhsBwNUnMy4prv9fEQ@mail.gmail.com>

While we're on the subject of execution in the edit buffer, it is not
entirely clear what such execution would mean. Mirko's desire seems to
be to execute the buffer directly without org-babel as an
intermediary. However, the most consistent approach would be a command
to pop back to the source buffer from the edit buffer and use
org-babel-execute-src-block to run the code. If org were to provide
edit buffer evaluation it would likely have to be that. The reason for
this is that direct execution of code in the major mode of the edit
buffer is not well defined. For some languages (e.g. racket) there is
no easy way to evaluate a buffer that does not correspond directly to
a file on the file system, which is part of why org babel exists in
the first place (to define those semantics). In theory babel languages
could provide an alternate implementation for how an edit buffer can
be run, but absent such an implementation it would be up to the user
to figure out the semantics for each of the languages they wanted to
evaluate directly. Best,
Tom


      reply	other threads:[~2020-12-04 21:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 13:58 How to evaluate source code while in the edit buffer? Mirko Vukovic
2020-12-04 14:26 ` Jean Louis
2020-12-04 17:09   ` Pankaj Jangid
2020-12-04 17:41 ` Pankaj Jangid
2020-12-04 18:59   ` Mirko Vukovic
2020-12-04 19:11     ` Jean Louis
2020-12-05  2:10       ` Pankaj Jangid
2020-12-04 21:17   ` George Mauer
2020-12-04 21:37     ` Tom Gillespie [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='CA+G3_PP9azvLF0xLsT15=Zob+N-dkGv=BsX5P45o8U6wJ5S=Yw@mail.gmail.com' \
    --to=tgbugs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=gmauer@gmail.com \
    --cc=mirko.vukovic@gmail.com \
    /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).