[Top][All Lists]

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

[O] Fwd: Re: Bug: Org-babel-detangle does not work for subtrees [8.3.5 (

From: Andrea Giugliano
Subject: [O] Fwd: Re: Bug: Org-babel-detangle does not work for subtrees [8.3.5 (8.3.5-elpaplus @ /home/andrea/.emacs.d/elpa/org-plus-contrib-20160808/)]
Date: Wed, 31 Aug 2016 14:01:13 +0000

I am not sure my previous mail reached everyone interested.


Andrea Giugliano <address@hidden> writes:

> Hello,
> I found a solution, or better I have understood how detangling is
> supposed to work after reading ob-tangle.el.
> Basically, I found necessary two things to detangle properly (not
> counting the =:comments yes= that is described in the info):
> 1) the cursor needs to be _on_ the code body, and *not* on the comments
>    generated by org-babel-tangle.
> 2) the setting =(setq org-babel-tangle-use-relative-file-links 'nil)= is 
> essential:
>    indeed, using relative path makes my org-babel-jump-to-org try to
>    find something like home/andrea/home/andrea... that typically does
>    not exists.
> I am not sure if this is a src bug (in the wrong default of
> =org-babel-tangle-use-relative-file-links=), or a documentation 
> (http://orgmode.org/worg/doc.html) bug.
> It would be nice that =org-babel-detangle= and
> =org-babel-tangle-jump-to-org= could support IDs link navigation as well
> sometimes in the future (since it is possible to base links
> definitions on IDs with =(setq org-id-link-to-org-use-id t)=).
> Thanks,
> Andrea
> P.S: thanks Grant, your answer gave me the right ques to solve my
> problem. (Also, I am not sure I fully understood the capabilities of your
> framework "help" from the repository description, but I liked the
> guidelines for literate programming you gave in one of the readmes.)
> Grant Rettke <address@hidden> writes:
>> Good evening Andrea,
>> Does it use the contents of the headline instead of the ID?
>> If yes, I know what you mean, but I don't remember why it does that
>> because long ago I changed it so that it uses the NAME of the ID
>> instead. I can tell you how my configuration looks though:
>> All of my Org-Mode LP configuration is in here:
>> https://github.com/grettke/help/blob/master/Org-Mode_Fundamentals.org
>> Here are some values that come to mind though:
>> - Global header-args sets comments to "noweb"
>> - This whole section
>> https://github.com/grettke/help/blob/master/Org-Mode_Fundamentals.org#identity
>> - (require 'org-id)
>> - (setq org-id-link-to-org-use-id 'nil)
>> That makes it so that the comment links to the file, not to the id or
>> custom_id. Yes, I find it confusing and I only figured this out a
>> couple nights ago. However, this makes detangle work.
>> Let me know how it goes and check out my config.
>> Sincerely,
>> Grant Rettke
>> On Tue, Aug 30, 2016 at 5:38 PM, Andrea Giugliano <address@hidden> wrote:
>>> Hello,
>>> yup, that would be the ideal solution, but at the moment my
>>> org-babel-tangle does not use the ID in the comments! It uses a (not
>>> working) string.
>>> Do you mean that I can force to reference in the comment to be an ID??
>>> Thanks,
>>> Andrea
>>> Grant Rettke <address@hidden> writes:
>>>> On Tue, Aug 30, 2016 at 12:25 PM, Andrea Giugliano <address@hidden> wrote:
>>>>> I think that the ideal solution is to allow an user to make
>>>>> org-babel-detangle rely on header IDs, since this not only assures
>>>>> detangle to find the correct header every time, but also push the user
>>>>> to use IDs through org-id (that seems good practice).
>>>>> What do you think?
>>>> Yes you should set a ID on every Headline and source-block
>>>> automatically using org-id so that detangling always works.
>>>> When you want a custom ID it is easily changed.

reply via email to

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