[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 9426f780e4 4/9: Move code in denote--rename-file
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 9426f780e4 4/9: Move code in denote--rename-file |
Date: |
Tue, 26 Nov 2024 06:57:51 -0500 (EST) |
branch: externals/denote
commit 9426f780e4e74ad4e324a86609ef25ab02d0abba
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Move code in denote--rename-file
---
denote.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/denote.el b/denote.el
index 8843d04655..f2ceffd566 100644
--- a/denote.el
+++ b/denote.el
@@ -3333,9 +3333,12 @@ Respect `denote-rename-confirmations',
`denote-save-buffers' and
(current-time)))))
(old-id (or (denote-retrieve-filename-identifier file) ""))
(id (denote-get-identifier date))
- (id (if (or (string-empty-p id) (string= old-id id))
- id
- (denote--find-first-unused-id id)))
+ (id (cond ((or (string-empty-p id) (string= old-id id))
+ id)
+ ((and (not (string-empty-p old-id))
(denote--file-has-backlinks-p file))
+ (user-error "The date cannot be modified because the file
has backlinks"))
+ (t
+ (denote--find-first-unused-id id))))
(date (if (string-empty-p id) nil (date-to-time id)))
(new-name (denote-format-file-name directory id keywords title
extension signature))
(max-mini-window-height denote-rename-max-mini-window-height))
@@ -3383,10 +3386,7 @@ renaming commands."
signature
(format "Rename `%s' with SIGNATURE (empty to
remove)" file-in-prompt))))
('date
- (if (and (denote-file-has-identifier-p file)
- (denote--file-has-backlinks-p file))
- (user-error "The date cannot be modified because the file has
backlinks")
- (setq date (denote-valid-date-p (denote-date-prompt)))))))
+ (setq date (denote-valid-date-p (denote-date-prompt))))))
(list title keywords signature date)))
;;;###autoload
- [elpa] externals/denote updated (66124eb234 -> 0f11e93f25), ELPA Syncer, 2024/11/26
- [elpa] externals/denote 86c19b4114 1/9: Rework denote-rename-file-using-front-matter to handle all components, ELPA Syncer, 2024/11/26
- [elpa] externals/denote 0792229eed 3/9: Fix issue in denote-rewrite-front-matter with lines that are unchanged, ELPA Syncer, 2024/11/26
- [elpa] externals/denote bf07d3f075 8/9: Merge pull request #484 from jeanphilippegg/denote-rename-file-using-front-matter, ELPA Syncer, 2024/11/26
- [elpa] externals/denote cf35f02d47 2/9: Fix issue in denote--get-final-components-for-rewrite, ELPA Syncer, 2024/11/26
- [elpa] externals/denote 1f123e1440 6/9: Remove lines with empty values in denote--format-front-matter, ELPA Syncer, 2024/11/26
- [elpa] externals/denote 6caa664518 7/9: Remove reference to denote-link-add-links, ELPA Syncer, 2024/11/26
- [elpa] externals/denote 9426f780e4 4/9: Move code in denote--rename-file,
ELPA Syncer <=
- [elpa] externals/denote 0f11e93f25 9/9: Add user option denote-open-link-function for non-Org buffers, ELPA Syncer, 2024/11/26
- [elpa] externals/denote e8e97ccaa8 5/9: Add denote-front-matter-components-present-even-if-empty-value, ELPA Syncer, 2024/11/26