From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-babel-expand-src-block behavior Date: Sat, 12 Aug 2017 12:52:12 +0200 Message-ID: <87wp693voj.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgU1g-0006eC-Vn for emacs-orgmode@gnu.org; Sat, 12 Aug 2017 06:52:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgU1f-0005BN-WF for emacs-orgmode@gnu.org; Sat, 12 Aug 2017 06:52:17 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:51276) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dgU1f-0005Ae-Pa for emacs-orgmode@gnu.org; Sat, 12 Aug 2017 06:52:15 -0400 In-Reply-To: (Ken Mankoff's message of "Sat, 12 Aug 2017 06:40:47 +0200") 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: Ken Mankoff Cc: Org Mode Hello, Ken Mankoff 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