From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Re: org-babel-detangle not working Date: Tue, 4 Nov 2014 19:11:24 -0600 Message-ID: References: <3F7A7816-C3C3-48B8-B655-83776A9167C4@gmail.com> <08700EF8-2051-43C0-B7D3-2ADFA1598BFF@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlp8B-0003q5-Aj for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 20:11:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xlp89-00014J-OI for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 20:11:27 -0500 Received: from mail-ob0-x233.google.com ([2607:f8b0:4003:c01::233]:61296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xlp89-00013d-Hh for emacs-orgmode@gnu.org; Tue, 04 Nov 2014 20:11:25 -0500 Received: by mail-ob0-f179.google.com with SMTP id m8so11814190obr.38 for ; Tue, 04 Nov 2014 17:11:24 -0800 (PST) In-Reply-To: <08700EF8-2051-43C0-B7D3-2ADFA1598BFF@gmail.com> 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: =?UTF-8?Q?Jaakko_J=C3=A4rvi?= Cc: "emacs-orgmode@gnu.org" Need any help creating a minimum example? On Sun, Nov 2, 2014 at 7:43 PM, Jaakko J=C3=A4rvi wrote: > Hi Grant, > > This is exactly the behavior I get too. > Thank you for documenting it precisely. > > Let me clarify one step: > > =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 > 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, > > Jaakko > > > On Nov 2, 2014, at 7:23 PM, Grant Rettke wrote: > >> Good evening, >> >> >> 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 >> >> Just tried out your example. So it is crystal clear, I did use the >> following: >> >> >> 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 >> >> =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 >> >> >> 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 >> >> =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 >> >> >> 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 >> >> 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: >> >> Return to existing edit buffer ([n] will revert changes)? >> (y or n) >> >> Whether I choose yes or not, the current buffer always returns to >> ex1.js. >> >> Is this expected? >> >> >> 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 >> >> =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 >> >> =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 >> >> =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 >> >> =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 >> >> =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 >> >> =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 >> >> =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 >> >> =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 >> >> On Sat, Nov 1, 2014 at 1:44 PM, Jaakko J=C3=A4rvi wro= te: >>> There seems to be something wrong with detangling. >>> Would it be working, it would be a really wonderful feature. >>> >>> Detangling moves back to the org buffer and opens a source block editin= g buffer, >>> but does not change to block in the org buffer. >>> >>> Is detangling working for some? I see this same issue described around >>> 2013: >>> >>> http://thread.gmane.org/gmane.emacs.orgmode/75290/focus=3D75299 >>> >>> Below, a minimal test.org file and its tangled output. >>> >>> Thanks, >>> >>> Jaakko J=C3=A4rvi >>> >>> - test.org -------------------------------------------- >>> * Heading >>> >>> #+BEGIN_SRC js :comments noweb :tangle yes :padline no >>> function foo() {} >>> #+END_SRC >>> ------------------------------------------------------- >>> >>> - test.js --------------------------------------------- >>> // [[file:~/test/test.org::*Heading][Heading:1]] >>> function foo() {} >>> // Heading:1 ends here >>> ------------------------------------------------------- >> >> >> >> -- >> 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 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 st= op taking it seriously.=E2=80=9D --Thompson