emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Ken Mankoff <mankoff@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: org-babel-expand-src-block behavior
Date: Sat, 12 Aug 2017 12:52:12 +0200	[thread overview]
Message-ID: <87wp693voj.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <m28tipl7ow.fsf@gmail.com> (Ken Mankoff's message of "Sat, 12 Aug 2017 06:40:47 +0200")

Hello,

Ken Mankoff <mankoff@gmail.com> writes:

> Hi,
>
> I've just learned about =org-babel-expand-src-block= (from [1]) which seems like an improvement over =org-edit-special=, because variables are expanded.
>
> But I notice two issues with it, and I'm wondering if these are intentional or bugs, or if there are work-arounds.
>
> First, the buffer is read-only

It is a feature. It doesn't correspond to the contents of the block. It
is used to check what is really evaluated.

> (which someone else claims is a bug [2]),

IIUC, the bug is about

    "However if the block contains a noweb reference then the code is
    not expanded when sent to the shell and causes syntax error"

and not about the read-onlyness of the buffer.

FWIW, I cannot reproduce the bug above.

> and second, if I make changes and then exit the expanded block
> (via C-') without saving, the changes are lost. If I enter
> =org-edit-special= and exit w/o saving, the changes are propagated
> back to the buffer.

I don't understand. "C-c '" is `org-edit-special'. "C-'" is
`org-cycle-agenda-files'.

If you use "C-c '", make changes to the remote editing buffer and exit
with "C-c '", changes are propagated to the source buffer. Remote
editing is just a convenient way to edit another part of the same
buffer.

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2017-08-12 10:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-12  4:40 org-babel-expand-src-block behavior Ken Mankoff
2017-08-12 10:52 ` Nicolas Goaziou [this message]
2017-08-12 18:11   ` Ken Mankoff
2017-08-14 14:25     ` Nicolas Goaziou

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=87wp693voj.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=mankoff@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).