From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Jaakko_J=C3=A4rvi?= Subject: Re: org-babel-detangle not working Date: Sun, 2 Nov 2014 19:43:41 -0600 Message-ID: <08700EF8-2051-43C0-B7D3-2ADFA1598BFF@gmail.com> References: <3F7A7816-C3C3-48B8-B655-83776A9167C4@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl6gP-0004YE-Dz for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 20:43:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xl6gL-0005gG-Af for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 20:43:49 -0500 Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]:64154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xl6gL-0005g4-3R for emacs-orgmode@gnu.org; Sun, 02 Nov 2014 20:43:45 -0500 Received: by mail-oi0-f54.google.com with SMTP id a141so6458844oig.27 for ; Sun, 02 Nov 2014 17:43:43 -0800 (PST) In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Grant Rettke Cc: "emacs-orgmode@gnu.org" Hi Grant, This is exactly the behavior I get too. Thank you for documenting it precisely. Let me clarify one step:=20 =E2=80=9Cput the cursor on line 2 in ex1.js, _and modify that line_, and then call org-babel-detangle=E2=80=9D And no, I don=E2=80=99t think what happens is the expected behavior. I would expect the contents of the source block in ex1.org=20 to be replaced with the modified contents of the block in ex1.js. But that does not happen. (One could imagine that org-babel-detangle would detangle the entire buffer back to the org file, but based on what I understand of the code of org-babel-detangle, it is only trying to detangle one block; perhaps another function to do the former, say org-babel-detangle-buffer, would be a useful command as well) Best,=20 Jaakko On Nov 2, 2014, at 7:23 PM, Grant Rettke = wrote: > Good evening, >=20 >=20 > 1 Attempt > =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90 >=20 > Just tried out your example. So it is crystal clear, I did use the > following: >=20 >=20 > 1.1 Source input: ex1.org > = =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 * Heading > =E2=94=82 > =E2=94=82 #+BEGIN_SRC js :comments noweb :tangle yes :padline no > =E2=94=82 function foo() {} > =E2=94=82 #+END_SRC > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >=20 >=20 > 1.2 Tangled output: ex1.js > = =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80 >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 // [[file:~/tmp/ex1.org::*Heading][Heading:1]] > =E2=94=82 function foo() {} > =E2=94=82 // Heading:1 ends here > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >=20 >=20 > 2 Comments & Questions > =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 >=20 > When I open the tangled output file, opened it in a buffer, put the > cursor on line 2, and call `org-babel-detangle', the buffer switches > to ex1.org, and then I get the message: >=20 > Return to existing edit buffer ([n] will revert changes)? > (y or n) >=20 > Whether I choose yes or not, the current buffer always returns to > ex1.js. >=20 > Is this expected? >=20 >=20 > 3 Environment > =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90= =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90 >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 (print emacs-version) > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 "24.3.1" > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 (print org-version) > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 "8.2.8" > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 (print (pp-to-string org-babel-default-header-args)) > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 "((:eval . \"always\") > =E2=94=82 (:padline . \"no\") > =E2=94=82 (:noweb . \"no-export\") > =E2=94=82 (:exports . \"both\") > =E2=94=82 (:results . \"output replace\") > =E2=94=82 (:comments . \"no\") > =E2=94=82 (:session . \"none\") > =E2=94=82 (:cache . \"no\") > =E2=94=82 (:hlines . \"no\") > =E2=94=82 (:tangle . \"no\")) > =E2=94=82 " > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 (print (pp-to-string org-babel-default-header-args:R)) > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >=20 > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 "((:session . \"*R*\")) > =E2=94=82 " > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 >=20 > On Sat, Nov 1, 2014 at 1:44 PM, Jaakko J=C3=A4rvi = wrote: >> There seems to be something wrong with detangling. >> Would it be working, it would be a really wonderful feature. >>=20 >> Detangling moves back to the org buffer and opens a source block = editing buffer, >> but does not change to block in the org buffer. >>=20 >> Is detangling working for some? I see this same issue described = around >> 2013: >>=20 >> http://thread.gmane.org/gmane.emacs.orgmode/75290/focus=3D75299 >>=20 >> Below, a minimal test.org file and its tangled output. >>=20 >> Thanks, >>=20 >> Jaakko J=C3=A4rvi >>=20 >> - test.org -------------------------------------------- >> * Heading >>=20 >> #+BEGIN_SRC js :comments noweb :tangle yes :padline no >> function foo() {} >> #+END_SRC >> ------------------------------------------------------- >>=20 >> - test.js --------------------------------------------- >> // [[file:~/test/test.org::*Heading][Heading:1]] >> function foo() {} >> // Heading:1 ends here >> ------------------------------------------------------- >=20 >=20 >=20 > --=20 > Grant Rettke > gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/ > =E2=80=9CWisdom begins in wonder.=E2=80=9D --Socrates > ((=CE=BB (x) (x x)) (=CE=BB (x) (x x))) > =E2=80=9CLife has become immeasurably better since I have been forced = to stop > taking it seriously.=E2=80=9D --Thompson