emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote 018f2d5618 10/14: Make denote-dired-post-rename-


From: ELPA Syncer
Subject: [elpa] externals/denote 018f2d5618 10/14: Make denote-dired-post-rename-functions obsolete
Date: Sun, 17 Jul 2022 02:57:29 -0400 (EDT)

branch: externals/denote
commit 018f2d5618407b2063061a9008bcaa76ebb5711c
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>

    Make denote-dired-post-rename-functions obsolete
---
 denote-dired.el | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/denote-dired.el b/denote-dired.el
index 188b7f1e07..d1a3d62277 100644
--- a/denote-dired.el
+++ b/denote-dired.el
@@ -143,6 +143,29 @@ old name followed by the new one."
   :type 'boolean
   :group 'denote-dired)
 
+(defcustom denote-dired-post-rename-functions
+  (list #'denote-dired-update-dired-buffers
+        #'denote-dired--rewrite-front-matter)
+  "List of functions called after `denote-dired-rename-file'.
+Each function must accept three arguments: FILE, TITLE, and
+KEYWORDS.  The first is the full path to the file provided as a
+string, the second is the human-readable file name (not what
+Denote sluggifies) also as a string, and the third are the
+keywords.  If there is only one keyword, it is a string, else a
+list of strings.
+
+DEVELOPMENT NOTE: the `denote-dired-rewrite-front-matter' needs
+to be tested thoroughly.  It rewrites file contents so we have to
+be sure it does the right thing.  To avoid any trouble, it always
+asks for confirmation before performing the replacement.  This
+confirmation ignores `denote-dired-rename-expert' for the time
+being, though we might want to lift that restriction once
+everything works as intended."
+  :type 'hook
+  :group 'denote-dired)
+
+(make-obsolete 'denote-dired-post-rename-functions nil "0.4.0")
+
 ;;;; File helper functions
 
 (defun denote-dired--file-attributes-time (file)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]