protesilaos / denote

Simple notes for Emacs with an efficient file-naming scheme
https://protesilaos.com/emacs/denote
GNU General Public License v3.0
545 stars 55 forks source link

denote-link doesn't take file type into account #349

Closed goofansu closed 6 months ago

goofansu commented 6 months ago

I export org files to markdown files for pasting into GitHub, Jira, etc, so there will be two files with the same identifier: "20240515T213133--demo.org" and "20240515T213133--demo.md". Call denote-link and select either file will create the same link [[denote:20240515T213133][demo]], but org-open-at-point on such link always open the markdown file.

Notice the exported markdown file doesn't has any denote's properties such as #+identifier, but denote-link prompts displays the file.

My current workarounds are:

goofansu commented 6 months ago

Closing. I'll export to temporary buffer.

protesilaos commented 6 months ago

From: Yejun Su @.***> Date: Wed, 15 May 2024 06:59:44 -0700

Closing. I'll export to temporary buffer.

The problem you were facing is that you had duplicate identifiers. In this case, we arrange to prioritise Org over other formats because we assume this is due to an Org export. The relevant function is 'denote-get-path-by-id'.

-- Protesilaos Stavrou https://protesilaos.com