emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: timor <timor.dd@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Should org-get-outline-path strip dedicated targets?
Date: Sat, 11 Jun 2016 10:19:39 +0200	[thread overview]
Message-ID: <87eg84dtno.fsf@saiph.selenimh> (raw)
In-Reply-To: <CAAX25XBTH3fzxQ+hj03aNFmJ2412DY_cG_e32YgbiOS9zxTnxA@mail.gmail.com> (timor's message of "Fri, 3 Jun 2016 14:24:43 +0200")

Hello,

timor <timor.dd@gmail.com> writes:

> If I have a document like this:
>
> * some header <<some_target>>
> ** some subtree
> *** some entry
>
> Then calling org-get-outline-path on the deepest headline returns
> ("some header <<some_target>>" "some subtree")
>
> I don't know what exactly org-get-outline-path is used for in org
> mode, but for what I want to use it, I will remove the
> "<<some_target>>" part manually.
>
> I was just wondering if maybe this should already be done in
> org-get-outline-path itself, since links are also replaced by their
> description according to the documentation.

Links and targets are different in the sense that the former has an
invisible part, unlike to the latter. `org-get-outline-path' simply
removes that part since users probably do not distinguish their headings
using hidden characters.

OTOH, it could make sense to preserve targets, e.g., in the following:

  * Doc 1
  ** Introduction <<intro1>>
  ...
  * Doc 2
  ** Introduction <<intro2>>
  ...

Eventually, albeit tangential to the problem, I think using a CUSTOM_ID
is probably better than inserting a target in a headline.

Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2016-06-11  8:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 12:24 Should org-get-outline-path strip dedicated targets? timor
2016-06-11  8:19 ` Nicolas Goaziou [this message]
2016-06-16 10:11   ` timor

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=87eg84dtno.fsf@saiph.selenimh \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=timor.dd@gmail.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).