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

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

[elpa] externals/denote 0fb7c53024: Delete and deprecate all "migrate" c


From: ELPA Syncer
Subject: [elpa] externals/denote 0fb7c53024: Delete and deprecate all "migrate" code
Date: Thu, 6 Oct 2022 08:57:35 -0400 (EDT)

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

    Delete and deprecate all "migrate" code
    
    We had this for version 0.5.0 which introduced a breaking change to
    how keywords are recorded in the front matter.  It is unlikely that
    someone now uses a version from before that switch happened.
---
 denote.el | 87 ++-------------------------------------------------------------
 1 file changed, 2 insertions(+), 85 deletions(-)

diff --git a/denote.el b/denote.el
index 291b2eb21b..537622c4fa 100644
--- a/denote.el
+++ b/denote.el
@@ -2775,91 +2775,8 @@ Consult the manual for template samples."
 
 (add-hook 'org-capture-after-finalize-hook 
#'denote-org-capture-delete-empty-file)
 
-;;;; For the migration of old Org filetags/Markdown+YAML tags
-
-(defun denote--migrate-type-files (type file-type)
-  "Return list of TYPE files in variable `denote-directory'.
-TYPE is a string which matches the `file-name-extension'.
-FILE-TYPE is the symbol file-type."
-  (delq nil
-        (mapcar
-         (lambda (file)
-           (when-let* ((value (denote-retrieve-keywords-line
-                               file file-type))
-                       ((cond
-                         ((eq file-type 'markdown-yaml) (not (string-match-p 
"," value)))
-                         ((eq file-type 'org) (not (string-match-p " :" 
value)))
-                         (t nil))))
-             file))
-         (seq-remove
-          (lambda (file)
-            (not (string= (file-name-extension file) type)))
-          (denote-directory-files)))))
-
-;;;###autoload
-(defun denote-migrate-old-org-filetags ()
-  "Rewrite Org filetags' value as colon-separated.
-
-Change the filetags from:
-
-    #+filetags:   one  two
-
-To the standard format of:
-
-    #+filetags:  :one:two:
-
-A single tags chnages from TAG to :TAG:.
-
-Denote used to format filetags with two spaces between them, but
-this is not fully supported by Org.  The colon-separated entries
-are the rule.
-
-The rewrite DOES NOT SAVE BUFFERS.  The user is expected to
-review the changes, such as by using `diff-buffer-with-file'.
-Multiple buffers can be saved with `save-some-buffers' (check its
-doc string).
-
-This command is provided for the convenience of the user.  It
-shall be deprecated and eventually removed from future versions
-of Denote.  Written on 2022-08-10 for version 0.5.0."
-  (interactive)
-  (when-let (((yes-or-no-p "Rewrite filetags in Org files to use colons 
(buffers are NOT saved)?"))
-             (files (denote--migrate-type-files "org" 'org)))
-    (dolist (file files)
-      (when-let* ((kw (denote-retrieve-keywords-value file 'org))
-                  ((denote--edit-front-matter-p file 'org)))
-        (denote--rewrite-keywords file kw 'org)))))
-
-;;;###autoload
-(defun denote-migrate-old-markdown-yaml-tags ()
-  "Rewrite Markdown YAML tags value as comma-separated strings.
-
-Change the tags from:
-
-    tags:   one  two
-
-To the standard format of:
-
-    tags:  [\"one\", \"two\"]
-
-Denote used to format filetags with two spaces between them, but
-this is not supported by YAML.
-
-The rewrite DOES NOT SAVE BUFFERS.  The user is expected to
-review the changes, such as by using `diff-buffer-with-file'.
-Multiple buffers can be saved with `save-some-buffers' (check its
-doc string).
-
-This command is provided for the convenience of the user.  It
-shall be deprecated and eventually removed from future versions
-of Denote.  Written on 2022-08-10 for version 0.5.0."
-  (interactive)
-  (when-let (((yes-or-no-p "Rewrite tags in Markdown files with YAML header to 
use lists (buffers are NOT saved)?"))
-             (files (denote--migrate-type-files "md" 'markdown-yaml)))
-    (dolist (file files)
-      (when-let* ((kw (denote-retrieve-keywords-value file 'markdown-yaml))
-                  ((denote--edit-front-matter-p file 'markdown-yaml)))
-        (denote--rewrite-keywords file kw 'markdown-yaml)))))
+(make-obsolete 'denote-migrate-old-org-filetags nil "1.1.0")
+(make-obsolete 'denote-migrate-old-markdown-yaml-tags nil "1.1.0")
 
 (provide 'denote)
 ;;; denote.el ends here



reply via email to

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