Skip to content

Linking to headings in denote files while having ~org-id-link-to-org-use-id 'use-existing~ does not work predictable #645

@grszkthfr

Description

@grszkthfr

Hey Prot,

thanks for this wonderful package!

I have my org mode configuration setup to only use existing ids for storing links: (setopt org-id-link-to-org-use-id 'use-existing).

Using that configuration I have problems linking to a heading in denote, that has no ID/CUSTOM_ID property.

As far as I can see, this option does not work well / predictable with denote-org-store-link-to-heading.

a) Setting (setopt denote-org-store-link-to-heading 'context) does not link to a heading at all (neither using an existing ID nor using the context). (Thus throwing messages "This link has already been stored" being run on headings with or without ID).

b) Setting (setopt denote-org-store-link-to-heading 'id) does link to a heading but only with an existing ID.

If denote-org-store-link-to-heading fully respects org-id-link-to-org-use-id 'use-existing, shouldn't it
a) with denote-org-store-link-to-heading 'context: ignore any given IDs and always use the context
b) with denote-org-store-link-to-heading 'id: fallback to 'context when there is no ID

Additionally, could there be an option for denote-org-store-link-to-heading always creating an ID, regardless of the setting of org-id-link-to-org-use-id?

I think a) needs a fix. For b) I think that it might be good to introduce an additional option 'use-existing and having 'ID always creat an ID. This would be more or less be in line with the user options for org-id-link-to-org-use-id (there is no ID option but only a t).

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions