emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andrea Giugliano <agiugliano@live.it>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: 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	[thread overview]
Message-ID: <VI1PR0301MB1919B021B9C028383F086EEAC7E30@VI1PR0301MB1919.eurprd03.prod.outlook.com> (raw)

I am not sure my previous mail reached everyone interested.
Best,

Andrea

Andrea Giugliano <agiugliano@live.it> 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 <gcr@wisdomandwonder.com> 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 <agiugliano@live.it> 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 <gcr@wisdomandwonder.com> writes:
>>>
>>>> On Tue, Aug 30, 2016 at 12:25 PM, Andrea Giugliano <agiugliano@live.it> 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	other threads:[~2016-08-31 14:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=VI1PR0301MB1919B021B9C028383F086EEAC7E30@VI1PR0301MB1919.eurprd03.prod.outlook.com \
    --to=agiugliano@live.it \
    --cc=emacs-orgmode@gnu.org \
    /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).