[-- 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 --]
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
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
[-- 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 --]
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
>
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
[-- 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 --]