branch: externals/denote
commit ba165ee456206cdc6136c785602016de245c7b43
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>
Make the function denote-directory produce a warning for obsolete uses
Thanks to Jean-Philippe Gagné Guay for discussing this with me as an
aside to issue 543:
<https://github.com/protesilaos/denote/issues/543#issuecomment-2708670893>.
---
denote.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/denote.el b/denote.el
index 500c576f4a..b5295bb8f6 100644
--- a/denote.el
+++ b/denote.el
@@ -1017,7 +1017,12 @@ to override what this function returns."
;; though, as it will break existing configurations.
(if-let* (((or (eq denote-directory 'default-directory) (eq denote-directory
'local)))
(silo-dir (denote--default-directory-is-silo-p)))
- silo-dir
+ (progn
+ (display-warning
+ 'denote
+ "Silo value must be a string; `local' or `default-directory'are
obsolete"
+ :error)
+ silo-dir)
(let ((denote-directory (file-name-as-directory (expand-file-name
denote-directory))))
(denote--make-denote-directory)
denote-directory)))