From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: org-babel-expand-src-block behavior Date: Sat, 12 Aug 2017 20:11:40 +0200 Message-ID: References: <87wp693voj.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c1249f086f6640556925cdf" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgasx-0004el-5X for emacs-orgmode@gnu.org; Sat, 12 Aug 2017 14:11:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgasv-0001Iu-PT for emacs-orgmode@gnu.org; Sat, 12 Aug 2017 14:11:43 -0400 Received: from mail-qt0-x22f.google.com ([2607:f8b0:400d:c0d::22f]:35372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dgasv-0001Ii-K7 for emacs-orgmode@gnu.org; Sat, 12 Aug 2017 14:11:41 -0400 Received: by mail-qt0-x22f.google.com with SMTP id p3so35630329qtg.2 for ; Sat, 12 Aug 2017 11:11:41 -0700 (PDT) In-Reply-To: <87wp693voj.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: Org Mode --94eb2c1249f086f6640556925cdf Content-Type: text/plain; charset="UTF-8" On Sat, Aug 12, 2017 at 12:52 PM, Nicolas Goaziou wrote: > > Ken Mankoff writes: > > > 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'. > Typo. I meant C-c '. > 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. > OK. I think I have a slightly different workflow, or desired workflow. I often *run* code in the org-edit-special buffer. I find it is useful to debug and evaluate there as I develop it, have the Python or other REPL (using session) also available, etc. Then when the development matures, save changes to the source buffer and evaluate it from there in the future. This works, but not if I'm debugging something with a variable. I got excited when I discovered org-babel-expand-src-block because now I can more easily debug code with input variables. But apparently this is not the purpose of that function, since a) the buffer is read-only and b) if read-only mode is changed, the changes are not always sent back to the primary buffer. Is there a way to get variables into org-edit-special? Maybe by pre-pending C-u to C-c '? How do others debug code with input variables? Would others like this enough to make it a feature request? Thanks, -k. --94eb2c1249f086f6640556925cdf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, Aug 12, 2017 at 12:52 PM, Nicolas Goaziou <= ;mail@nicolasgo= aziou.fr> wrote:
Ken Mankoff <mankoff@gmail.com&= gt; writes:

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

I don't understand. "C-c '" is `org-edit-special&#= 39;. "C-'" is
`org-cycle-agenda-files'.

Typo. I m= eant C-c '.=C2=A0
=C2=A0
If you use "C-c '", make changes to the remote editing buffer= and exit
with "C-c '", changes are propagated to the source buffer. Re= mote
editing is just a convenient way to edit another part of the same
buffer.

OK. I think I have a slightly d= ifferent workflow, or desired workflow. I often *run* code in the org-edit-= special buffer. I find it is useful to debug and evaluate there as I develo= p it, have the Python or other REPL (using session) also available, etc. Th= en when the development matures, save changes to the source buffer and eval= uate it from there in the future.

This works, but = not if I'm debugging something with a variable. I got excited when I di= scovered org-babel-expand-src-block because now I can more easily debug cod= e with input variables. But apparently this is not the purpose of that func= tion, since a) the buffer is read-only and b) if read-only mode is changed,= the changes are not always sent back to the primary buffer.

=
Is there a way to get variables into org-edit-special? Maybe by = pre-pending C-u to C-c '?=C2=A0=C2=A0How do others debug code with inpu= t variables? Would others like this enough to make it a feature request?

Thanks,

=C2=A0 -k.


--94eb2c1249f086f6640556925cdf--