From: "Jaakko Järvi" <jarvij@gmail.com>
To: Grant Rettke <gcr@wisdomandwonder.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: org-babel-detangle not working
Date: Tue, 4 Nov 2014 20:26:12 -0600 [thread overview]
Message-ID: <21CA7A43-C148-44E1-8E38-38D9A53DDE46@gmail.com> (raw)
In-Reply-To: <CAAjq1mdgjQimDVn77mBcAn8Te8oXZgRDpS70im2TyaPDXbSshg@mail.gmail.com>
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 <gcr@wisdomandwonder.com> wrote:
> Need any help creating a minimum example?
>
> On Sun, Nov 2, 2014 at 7:43 PM, Jaakko Järvi <jarvij@gmail.com> 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 <gcr@wisdomandwonder.com> 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 <jarvij@gmail.com> 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
>>> gcr@wisdomandwonder.com | 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
> gcr@wisdomandwonder.com | 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
next prev parent reply other threads:[~2014-11-05 2:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-01 18:44 org-babel-detangle not working Jaakko Järvi
2014-11-03 1:23 ` Grant Rettke
2014-11-03 1:43 ` Jaakko Järvi
2014-11-05 1:11 ` Grant Rettke
2014-11-05 2:26 ` Jaakko Järvi [this message]
2014-11-05 16:29 ` Grant Rettke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=21CA7A43-C148-44E1-8E38-38D9A53DDE46@gmail.com \
--to=jarvij@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=gcr@wisdomandwonder.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).