From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: Re: org-babel-detangle not working Date: Wed, 5 Nov 2014 10:29:02 -0600 Message-ID: References: <3F7A7816-C3C3-48B8-B655-83776A9167C4@gmail.com> <08700EF8-2051-43C0-B7D3-2ADFA1598BFF@gmail.com> <21CA7A43-C148-44E1-8E38-38D9A53DDE46@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]:40265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm3SD-0004ph-7E for emacs-orgmode@gnu.org; Wed, 05 Nov 2014 11:29:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xm3SA-0000b2-Vl for emacs-orgmode@gnu.org; Wed, 05 Nov 2014 11:29:05 -0500 Received: from mail-ob0-x230.google.com ([2607:f8b0:4003:c01::230]:57923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm3SA-0000aj-PL for emacs-orgmode@gnu.org; Wed, 05 Nov 2014 11:29:02 -0500 Received: by mail-ob0-f176.google.com with SMTP id va2so819249obc.35 for ; Wed, 05 Nov 2014 08:29:02 -0800 (PST) In-Reply-To: <21CA7A43-C148-44E1-8E38-38D9A53DDE46@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" Are you going to submit a bug report? On Tue, Nov 4, 2014 at 8:26 PM, Jaakko J=C3=A4rvi wrote: > Hi, > > 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 > 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 poi= nt know > what is unclear about the problem. > > Best, > > Jaakko > > On Nov 4, 2014, at 7:11 PM, Grant Rettke wrote: > >> Need any help creating a minimum example? >> >> On Sun, Nov 2, 2014 at 7:43 PM, Jaakko J=C3=A4rvi wro= te: >>> 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_, an= d >>> 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 wrot= e: >>> >>>> 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 w= rote: >>>>> 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 edit= ing buffer, >>>>> but does not change to block in the org buffer. >>>>> >>>>> Is detangling working for some? I see this same issue described aroun= d >>>>> 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 >>> >> >> >> >> -- >> 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