mclear-tools / consult-notes

Use consult to search notes
GNU General Public License v3.0
164 stars 15 forks source link

Error: Symbol’s function definition is void: denote-directory-text-only-files #72

Open teotenn opened 3 weeks ago

teotenn commented 3 weeks ago

First of all, thanks for this wonderful package, I use it in my daily basis and its really helpful.

The issue: with the newest version of denote I'm getting he following error

Symbol’s function definition is void: denote-directory-text-only-files

It seems that the function has been removed and a new one implemented that wrapps a few functionalities. According to the changeelog of denote:

The denote-directory-files function gains new functionality that subsumes that of the now-deprecated functions denote-directory-files-matching-regexp, denote-all-files, denote-directory-text-only-files. Thanks to Jean-Philippe Gagné Guay for the contribution, which was done in pull request 195 on the GitHub mirror: https://github.com/protesilaos/denote/pull/195.

For now, a simple workaround that works is a simple alias. I have this in my config section for denote

(defalias 'denote-directory-text-only-files 'denote-directory-files)

I just wanted to report it and I'm wondering if the changes to the other functions could somehow also affect the functioning of consult-notes pairing with denote.

mclearc commented 3 weeks ago

thanks for this really clear issue statement! I haven't been keeping up with Denote's development, so I appreciate the heads-up about function changes. But I'm slightly confused. I have this already in the README:

If you use denote to store more than just text files you may want to adjust it as follows (NOTE: this presumes you use Denote 3.x).


(setq consult-notes-denote-files-function (lambda () (denote-directory-files nil t t)))

If you use an older version of Denote, you can instead set consult-notes-denote-files-function to use denote-directory-text-only-files.

So If you're using the more recent (3.x) version of Denote I think the suggested code above already should cover this? People using older versions of Denote would have to use the denote-directory-text-only-files value.