denote icon indicating copy to clipboard operation
denote copied to clipboard

A denote tag 'Identifier' is different from the id in the filename occasionally

Open seokbeomKim opened this issue 1 year ago • 1 comments

Hi,

I am curious about the identifier in the denote file. Sometimes, the value of #+identifier seems to be different from the actual id from the filename.

Here's the example:

#+title:      Meeting to investigate SERDES
#+date:       [2024-01-24 Wed 14:54]
#+filetags:   :cs:des:ser:
#+identifier: **20240124T145433**

And the actual file name is:

$denote/meeting/20240124T145432--meeting-to-investiage-serdes__cs_des_ser.org

I think this is not the correct behavior...; does it need to use 'second' in the indentifier string?

seokbeomKim avatar Jan 26 '24 08:01 seokbeomKim

This can happen because a nil date is passed to the denote--prepare internal function and we do not use the same value for the identifier in the filename and in the front matter. This is possible since the addition of denote-parse-date which returns nil if the date passed is nil (because nil satisfies listp). This was likely unintended.

This is fixed as part of pull request #231.

It should not have broken anything though, as the identifier in the front matter is not used by Denote.

jeanphilippegg avatar Jan 27 '24 03:01 jeanphilippegg