emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Disambiguate internal links?
@ 2020-06-03 14:06 Budiman Snowman
  2020-06-03 14:17 ` Eric S Fraga
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Budiman Snowman @ 2020-06-03 14:06 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

I have this document:

* topic1
See topic [[topic2]].
See glossary [[topic2]].

* topic2
* glossary
** topic1
** topic2

What are ways to disambiguate the internal links? The first link should
link to the topic2 first-level entry, while the second link should go to
the topic2 entry under glossary. They both have the same title. One way I
know is using a unique dedicated target, e.g.:

* topic1
See topic [[topic2]].
See glossary [[glossary topic2][topic2]].

* topic2
* glossary
** <<glossary topic1>> topic1
** <<glossary topic2>> topic2

What are other ways available?

Regards,
BS

[-- Attachment #2: Type: text/html, Size: 952 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Disambiguate internal links?
  2020-06-03 14:06 Disambiguate internal links? Budiman Snowman
@ 2020-06-03 14:17 ` Eric S Fraga
  2020-06-03 14:20 ` Diego Zamboni
  2020-09-04 14:47 ` Bastien
  2 siblings, 0 replies; 7+ messages in thread
From: Eric S Fraga @ 2020-06-03 14:17 UTC (permalink / raw)
  To: Budiman Snowman; +Cc: emacs-orgmode

On Wednesday,  3 Jun 2020 at 21:06, Budiman Snowman wrote:
> One way I know is using a unique dedicated target, e.g.:

That's what I do in practice as it's robust to changes in headings and
is visible so I can remember the names.

You may also wish to consider CUSTOM_ID properties?

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-640-g9bc0cc


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Disambiguate internal links?
  2020-06-03 14:06 Disambiguate internal links? Budiman Snowman
  2020-06-03 14:17 ` Eric S Fraga
@ 2020-06-03 14:20 ` Diego Zamboni
  2020-06-04 15:26   ` Budiman Snowman
  2020-09-04 14:47 ` Bastien
  2 siblings, 1 reply; 7+ messages in thread
From: Diego Zamboni @ 2020-06-03 14:20 UTC (permalink / raw)
  To: Budiman Snowman; +Cc: Org-mode

I almost always use a CUSTOM_ID property for this, e.g.

* topic1
See topic [[#topic2][topic2]].
See glossary [[#glossary_topic2][topic2]].

* topic2
:PROPERTIES:
:CUSTOM_ID: topic2
:END:

* glossary
** topic1
:PROPERTIES:
:CUSTOM_ID: glossary_topic2
:END:
** topic2
:PROPERTIES:
:CUSTOM_ID: glossary_topic2
:END:

On Wed, Jun 3, 2020 at 4:06 PM Budiman Snowman <budimansnowman@gmail.com> wrote:
>
> I have this document:
>
> * topic1
> See topic [[topic2]].
> See glossary [[topic2]].
>
> * topic2
> * glossary
> ** topic1
> ** topic2
>
> What are ways to disambiguate the internal links? The first link should link to the topic2 first-level entry, while the second link should go to the topic2 entry under glossary. They both have the same title. One way I know is using a unique dedicated target, e.g.:
>
> * topic1
> See topic [[topic2]].
> See glossary [[glossary topic2][topic2]].
>
> * topic2
> * glossary
> ** <<glossary topic1>> topic1
> ** <<glossary topic2>> topic2
>
> What are other ways available?
>
> Regards,
> BS


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Disambiguate internal links?
  2020-06-03 14:20 ` Diego Zamboni
@ 2020-06-04 15:26   ` Budiman Snowman
  2020-06-05 11:01     ` Diego Zamboni
  0 siblings, 1 reply; 7+ messages in thread
From: Budiman Snowman @ 2020-06-04 15:26 UTC (permalink / raw)
  To: Diego Zamboni; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

On Wed, Jun 3, 2020 at 9:21 PM Diego Zamboni <diego@zzamboni.org> wrote:

> I almost always use a CUSTOM_ID property for this, e.g.
>
> * topic1
> See topic [[#topic2][topic2]].
> See glossary [[#glossary_topic2][topic2]].
>
> * topic2
> :PROPERTIES:
> :CUSTOM_ID: topic2
> :END:
>
> * glossary
> ** topic1
> :PROPERTIES:
> :CUSTOM_ID: glossary_topic2
> :END:
> ** topic2
> :PROPERTIES:
> :CUSTOM_ID: glossary_topic2
> :END:
>
>
Are there advantages to using CUSTOM_ID instead of dedicated target? I'll
stick with dedicated target for now, because it's shorter to type.

Regards,
BS

[-- Attachment #2: Type: text/html, Size: 988 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Disambiguate internal links?
  2020-06-04 15:26   ` Budiman Snowman
@ 2020-06-05 11:01     ` Diego Zamboni
  0 siblings, 0 replies; 7+ messages in thread
From: Diego Zamboni @ 2020-06-05 11:01 UTC (permalink / raw)
  To: Budiman Snowman; +Cc: Org-mode

I personally find CUSTOM_ID's easier since I can make them
unequivocally unique, and by using them the links don't break if I
change something in the headline title.

On Thu, Jun 4, 2020 at 5:26 PM Budiman Snowman <budimansnowman@gmail.com> wrote:
>
> On Wed, Jun 3, 2020 at 9:21 PM Diego Zamboni <diego@zzamboni.org> wrote:
>>
>> I almost always use a CUSTOM_ID property for this, e.g.
>>
>> * topic1
>> See topic [[#topic2][topic2]].
>> See glossary [[#glossary_topic2][topic2]].
>>
>> * topic2
>> :PROPERTIES:
>> :CUSTOM_ID: topic2
>> :END:
>>
>> * glossary
>> ** topic1
>> :PROPERTIES:
>> :CUSTOM_ID: glossary_topic2
>> :END:
>> ** topic2
>> :PROPERTIES:
>> :CUSTOM_ID: glossary_topic2
>> :END:
>>
>
> Are there advantages to using CUSTOM_ID instead of dedicated target? I'll stick with dedicated target for now, because it's shorter to type.
>
> Regards,
> BS
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Disambiguate internal links?
  2020-06-03 14:06 Disambiguate internal links? Budiman Snowman
  2020-06-03 14:17 ` Eric S Fraga
  2020-06-03 14:20 ` Diego Zamboni
@ 2020-09-04 14:47 ` Bastien
  2020-10-09  1:13   ` Budiman Snowman
  2 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2020-09-04 14:47 UTC (permalink / raw)
  To: Budiman Snowman; +Cc: emacs-orgmode

Hi Budiman,

Budiman Snowman <budimansnowman@gmail.com> writes:

> One way I know is using a unique dedicated target, e.g.:
>
> * topic1
> See topic [[topic2]].
> See glossary [[glossary topic2][topic2]].
>
> * topic2
> * glossary
> ** <<glossary topic1>> topic1
> ** <<glossary topic2>> topic2
>
> What are other ways available?

I don't know other way, but I don't see what's wrong with this one?

-- 
 Bastien


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Disambiguate internal links?
  2020-09-04 14:47 ` Bastien
@ 2020-10-09  1:13   ` Budiman Snowman
  0 siblings, 0 replies; 7+ messages in thread
From: Budiman Snowman @ 2020-10-09  1:13 UTC (permalink / raw)
  To: Bastien; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]

On Fri, Sep 4, 2020 at 9:47 PM Bastien <bzg@gnu.org> wrote:

> Hi Budiman,
>
> Budiman Snowman <budimansnowman@gmail.com> writes:
>
> > One way I know is using a unique dedicated target, e.g.:
> >
> > * topic1
> > See topic [[topic2]].
> > See glossary [[glossary topic2][topic2]].
> >
> > * topic2
> > * glossary
> > ** <<glossary topic1>> topic1
> > ** <<glossary topic2>> topic2
> >
> > What are other ways available?
>
> I don't know other way, but I don't see what's wrong with this one?
>
>
Hi Bastien,

Sorry for replying too late (setup a filter on my Gmail account). Nothing
wrong actually, except it's a minor visual distraction. So far I've only
used a short unique tag like <<201009a>> (for today's date + letter) so
it's not a major distraction.

[-- Attachment #2: Type: text/html, Size: 1281 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-10-09  1:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-03 14:06 Disambiguate internal links? Budiman Snowman
2020-06-03 14:17 ` Eric S Fraga
2020-06-03 14:20 ` Diego Zamboni
2020-06-04 15:26   ` Budiman Snowman
2020-06-05 11:01     ` Diego Zamboni
2020-09-04 14:47 ` Bastien
2020-10-09  1:13   ` Budiman Snowman

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).