emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-babel-detangle not working


From: Grant Rettke
Subject: Re: [O] org-babel-detangle not working
Date: Wed, 5 Nov 2014 10:29:02 -0600

Are you going to submit a bug report?

On Tue, Nov 4, 2014 at 8:26 PM, Jaakko Järvi <address@hidden> wrote:
> Hi,
>
> I don’t think there’s 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’m happy to try to clarify more, but I don’t at this point know
> what is unclear about the problem.
>
> Best,
>
>   Jaakko
>
> On Nov 4, 2014, at 7:11 PM, Grant Rettke <address@hidden> wrote:
>
>> Need any help creating a minimum example?
>>
>> On Sun, Nov 2, 2014 at 7:43 PM, Jaakko Järvi <address@hidden> wrote:
>>> Hi Grant,
>>>
>>> This is exactly the behavior I get too.
>>> Thank you for documenting it precisely.
>>>
>>> Let me clarify one step:
>>>
>>> “put the cursor on line 2 in ex1.js, _and modify that line_, and
>>> then call org-babel-detangle”
>>>
>>> And no, I don’t 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 <address@hidden> wrote:
>>>
>>>> Good evening,
>>>>
>>>>
>>>> 1 Attempt
>>>> ═════════
>>>>
>>>> Just tried out your example. So it is crystal clear, I did use the
>>>> following:
>>>>
>>>>
>>>> 1.1 Source input: ex1.org
>>>> ─────────────────────────
>>>>
>>>> ┌────
>>>> │ * Heading
>>>> │
>>>> │ #+BEGIN_SRC js :comments noweb :tangle yes :padline no
>>>> │   function foo() {}
>>>> │ #+END_SRC
>>>> └────
>>>>
>>>>
>>>> 1.2 Tangled output: ex1.js
>>>> ──────────────────────────
>>>>
>>>> ┌────
>>>> │ // [[file:~/tmp/ex1.org::*Heading][Heading:1]]
>>>> │   function foo() {}
>>>> │ // Heading:1 ends here
>>>> └────
>>>>
>>>>
>>>> 2 Comments & Questions
>>>> ══════════════════════
>>>>
>>>> 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
>>>> ═════════════
>>>>
>>>> ┌────
>>>> │ (print emacs-version)
>>>> └────
>>>>
>>>> ┌────
>>>> │ "24.3.1"
>>>> └────
>>>>
>>>> ┌────
>>>> │ (print org-version)
>>>> └────
>>>>
>>>> ┌────
>>>> │ "8.2.8"
>>>> └────
>>>>
>>>> ┌────
>>>> │ (print (pp-to-string org-babel-default-header-args))
>>>> └────
>>>>
>>>> ┌────
>>>> │ "((:eval . \"always\")
>>>> │  (:padline . \"no\")
>>>> │  (:noweb . \"no-export\")
>>>> │  (:exports . \"both\")
>>>> │  (:results . \"output replace\")
>>>> │  (:comments . \"no\")
>>>> │  (:session . \"none\")
>>>> │  (:cache . \"no\")
>>>> │  (:hlines . \"no\")
>>>> │  (:tangle . \"no\"))
>>>> │ "
>>>> └────
>>>>
>>>> ┌────
>>>> │ (print (pp-to-string org-babel-default-header-args:R))
>>>> └────
>>>>
>>>> ┌────
>>>> │ "((:session . \"*R*\"))
>>>> │ "
>>>> └────
>>>>
>>>> On Sat, Nov 1, 2014 at 1:44 PM, Jaakko Järvi <address@hidden> wrote:
>>>>> 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 editing 
>>>>> 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=75299
>>>>>
>>>>> Below, a minimal test.org file and its tangled output.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Jaakko Järvi
>>>>>
>>>>> - 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
>>>> address@hidden | http://www.wisdomandwonder.com/
>>>> “Wisdom begins in wonder.” --Socrates
>>>> ((λ (x) (x x)) (λ (x) (x x)))
>>>> “Life has become immeasurably better since I have been forced to stop
>>>> taking it seriously.” --Thompson
>>>
>>
>>
>>
>> --
>> Grant Rettke
>> address@hidden | http://www.wisdomandwonder.com/
>> “Wisdom begins in wonder.” --Socrates
>> ((λ (x) (x x)) (λ (x) (x x)))
>> “Life has become immeasurably better since I have been forced to stop
>> taking it seriously.” --Thompson
>



-- 
Grant Rettke
address@hidden | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



reply via email to

[Prev in Thread] Current Thread [Next in Thread]