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: Tue, 4 Nov 2014 20:26:12 -0600 Message-ID: <21CA7A43-C148-44E1-8E38-38D9A53DDE46@gmail.com> References: <3F7A7816-C3C3-48B8-B655-83776A9167C4@gmail.com> <08700EF8-2051-43C0-B7D3-2ADFA1598BFF@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]:33163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlqIe-00049U-RT for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 21:26:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlqIa-0008VZ-QQ for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 21:26:20 -0500 Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:41523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlqIa-0008VV-KC for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 21:26:16 -0500 Received: by mail-oi0-f45.google.com with SMTP id v63so8021206oia.32 for ; Tue, 04 Nov 2014 18:26:15 -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,=20 I don=E2=80=99t think there=E2=80=99s much more to explain or a more minimum example to create. The behavior is exactly=20 as you specified, and it is not an expected or desired behavior. I=E2=80=99m happy to try to clarify more, but I don=E2=80=99t at this = point know what is unclear about the problem. Best,=20 Jaakko On Nov 4, 2014, at 7:11 PM, Grant Rettke = wrote: > Need any help creating a minimum example? >=20 > On Sun, Nov 2, 2014 at 7:43 PM, Jaakko J=C3=A4rvi = wrote: >> Hi Grant, >>=20 >> This is exactly the behavior I get too. >> Thank you for documenting it precisely. >>=20 >> 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 >>=20 >> And no, I don=E2=80=99t think what happens is the expected behavior. >>=20 >> I would expect the contents of the source block in ex1.org >> to be replaced with the modified contents of the block in ex1.js. >>=20 >> But that does not happen. >>=20 >> (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) >>=20 >> Best, >>=20 >> Jaakko >>=20 >>=20 >> On Nov 2, 2014, at 7:23 PM, Grant Rettke = wrote: >>=20 >>> 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 >>> -- >>> 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 >>=20 >=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