protesilaos / denote

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

Small cleanup of the front matter functions #472

Closed jeanphilippegg closed 3 weeks ago

jeanphilippegg commented 3 weeks ago

In this pull request:

Add denote--retrieve-front-matter-*-from-content functions

These are just like denote-retrieve-front-matter-* functions, but they work on a content string instead of a file. (Maybe there would a way to remove the code duplication further.)

With them, we can remove the two functions denote--get-{title/keywords}-line-from-front-matter.

Clean up denote--format-front-matter

Some internal support of signatures in front matter

Two internal functions handle signature lines in the front matter. There are still a few things to adjust and signatures are still not included in the default front matter templates. So they do nothing by default for now.

jeanphilippegg commented 3 weeks ago

I just pushed a small change to make sure the signature will be sluggified in the front matter.

It is ready to be merged!

protesilaos commented 3 weeks ago

Merged, thank you!