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

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

[elpa] externals/denote 59891204ce 1/2: Limit the scope of the "migratio


From: ELPA Syncer
Subject: [elpa] externals/denote 59891204ce 1/2: Limit the scope of the "migration" files
Date: Wed, 10 Aug 2022 09:57:34 -0400 (EDT)

branch: externals/denote
commit 59891204cedef2af10482d1052c5c45b11d7a7f6
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Limit the scope of the "migration" files
    
    See commits 5c2237e and e711b16.  This is about updating the front
    matter of Org and YAML to the correct syntax for tags.
    
    The function I just wrote is not the best code ever written, but we will
    not keep it for too long, anyway.
---
 denote.el | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/denote.el b/denote.el
index 56ab8e3fc6..45f24d7724 100644
--- a/denote.el
+++ b/denote.el
@@ -2209,10 +2209,16 @@ Consult the manual for template samples."
 (defun denote--migrate-type-files (type)
   "Return list of TYPE files in variable `denote-directory'.
 TYPE is a string which matches the `file-name-extension'."
-  (seq-remove
-   (lambda (file)
-     (not (string= (file-name-extension file) type)))
-   (denote--directory-files)))
+  (delq nil
+        (mapcar
+         (lambda (file)
+           (when-let* ((value (denote--retrieve-value-keywords file))
+                       ((string-match-p "\s\s" value)))
+             file))
+         (seq-remove
+          (lambda (file)
+            (not (string= (file-name-extension file) type)))
+          (denote--directory-files)))))
 
 ;;;###autoload
 (defun denote-migrate-old-org-filetags ()



reply via email to

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