protesilaos / denote

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

Problems with the new `denote-file-name-components-order` #361

Closed maikol-solis closed 1 month ago

maikol-solis commented 1 month ago

Hi,

After trying the new feature to reorder the components in file name (https://github.com/protesilaos/denote/commit/33ca6c25e30acbb72801ada43b0dbbec424ca943) I think denote is broken somehow.

In my settings, I only have this.

(setq denote-file-name-components-order '(signature title keywords identifier))
(setq denote-prompts '(signature title file-type))

My plan is to have files with the structure

SIGNATURE--TITLE__KEYWORDS@@IDENTIFIER

The list of problems so far are:

  1. When I try to create a new file, denote returns me a file using a weird style.

    ==8--test@@20240519T064350.md
  2. If I have another file inside my folder, like

    9--new-file@@20240514T135224.md

    Then using denote-insert-link returns the description without the signature.

    [New File](denote:20240514T135224)

    I was expecting something like

    [9 New File](denote:20240514T135224)
  3. And finally, denote-link-with-signature doesn't work whatsoever. In fact, only recognizes this kind of files ==8--test@@20240519T064350.md

Maybe I configured something wrong and this is just my fault.

Thanks.

Best.

maikol-solis commented 1 month ago

My bad!

Rereading the documentation (https://protesilaos.com/emacs/denote#h:dc8c40e0-233a-4991-9ad3-2cf5f05ef1cd) I just noticed this part

signature: This is an arbitrary string that can be used to qualify the file in some way, according to the user’s methodology (e.g. to add a sequence to notes). The string is always prefixed with the == to remain unambiguous.

So all files must be with the structure

==SIGNATURE--TITLE__KEYWORDS@@IDENTIFIER

Can you confirm me if this is correct?

Thanks for your help.

jeanphilippegg commented 1 month ago

I confirm this is correct!

I don't see a way around this. If you have a file "some-file@@20240505T111111.org", is "some-file" a title, a keyword or a signature? We could allow one of the component to drop its delimiter if it is in the first position, but this cannot be done for all components at the same time.

maikol-solis commented 1 month ago

Thanks. No problem at all. It was my mistake to not read carefully the documentation.

As a suggestion, there could be some examples of how the filename should be arranged in different ways. Thus, the users can see what to expect when they configure denote-file-name-components-order.

protesilaos commented 1 month ago

From: Maikol Solís @.***> Date: Sun, 19 May 2024 06:38:17 -0700

Thanks. No problem at all. It was my mistake to not read carefully the documentation.

As a suggestion, there could be some examples of how the filename should be arranged in different ways. The user can see what to expect when they configure the denote-file-name-components-order.

I will update the manual accordingly. My plan is to do a publication about this, anyway, as it is a major new feature (and really the reason this is version 3 of Denote).

-- Protesilaos Stavrou https://protesilaos.com

maikol-solis commented 1 month ago

Thanks Prot and @jeanphilippegg! This feature is awesome.

protesilaos commented 1 month ago

From: Maikol Solís @.***> Date: Sun, 19 May 2024 08:29:59 -0700

Thanks Prot and @jeanphilippegg! This feature is awesome.

You are welcome! All credit goes to Jean-Philippe.

-- Protesilaos Stavrou https://protesilaos.com

jeanphilippegg commented 1 month ago

You're welcome!