[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote b5810569fe 10/17: Refactor denote--find-first-un
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/denote b5810569fe 10/17: Refactor denote--find-first-unused-id |
|
Date: |
Thu, 23 Nov 2023 00:58:02 -0500 (EST) |
branch: externals/denote
commit b5810569fe083aa6d6caf23e6b325e64ae698e8c
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Refactor denote--find-first-unused-id
---
denote.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/denote.el b/denote.el
index f1e73e0959..3b54bba581 100644
--- a/denote.el
+++ b/denote.el
@@ -1650,12 +1650,10 @@ It checks files in variable `denote-directory' and
active buffer files."
"Return the first unused id starting at ID from USED-IDS.
USED-IDS is a hash-table of all used IDs. If ID is already used,
increment it 1 second at a time until an available id is found."
- (let ((time (date-to-time id)))
- (while (gethash
- (format-time-string denote-id-format time)
- used-ids)
- (setq time (time-add time 1)))
- (format-time-string denote-id-format time)))
+ (let ((current-id id))
+ (while (gethash current-id used-ids)
+ (setq current-id (format-time-string denote-id-format (time-add
(date-to-time current-id) 1))))
+ current-id))
(make-obsolete 'denote-barf-duplicate-id nil "2.1.0")
- [elpa] externals/denote 95f8c14e48 03/17: Simplify denote-link-return-links and denote-link-return-backlinks, (continued)
- [elpa] externals/denote 95f8c14e48 03/17: Simplify denote-link-return-links and denote-link-return-backlinks, ELPA Syncer, 2023/11/23
- [elpa] externals/denote cf63fd9015 05/17: Simplify denote-keywords-add and denote-keywords-remove, ELPA Syncer, 2023/11/23
- [elpa] externals/denote b936bbdf4e 08/17: Make signature parameter non optional for some functions, ELPA Syncer, 2023/11/23
- [elpa] externals/denote 70d07dd122 02/17: Fix typo, ELPA Syncer, 2023/11/23
- [elpa] externals/denote 9742bca7e3 09/17: Fix denote-change-file-type-and-front-matter when there is a signature, ELPA Syncer, 2023/11/23
- [elpa] externals/denote ba7561688d 01/17: Remove unnecessary code in denote-trim-* functions and denote-extract-keywords-from-front-matter, ELPA Syncer, 2023/11/23
- [elpa] externals/denote 8e4a8ee69b 15/17: Refactor denote--link-in-context-regexp, ELPA Syncer, 2023/11/23
- [elpa] externals/denote b5d3ab6e4e 17/17: Merge pull request #193 from jeanphilippegg/cleanups, ELPA Syncer, 2023/11/23
- [elpa] externals/denote 39847ad78b 16/17: Refactor denote--link-format, ELPA Syncer, 2023/11/23
- [elpa] externals/denote 53d52d9d46 07/17: Fix documentation of denote-file-type, ELPA Syncer, 2023/11/23
- [elpa] externals/denote b5810569fe 10/17: Refactor denote--find-first-unused-id,
ELPA Syncer <=
- [elpa] externals/denote 01ea1c2cc4 12/17: Remove unnecessary checks, ELPA Syncer, 2023/11/23
- [elpa] externals/denote 3ebc7026d4 11/17: signature should always be a string (maybe empty), ELPA Syncer, 2023/11/23
- [elpa] externals/denote 2d6131085c 06/17: Simplify denote-filetype-heuristics, ELPA Syncer, 2023/11/23
- [elpa] externals/denote 8255dc380f 14/17: Simplify denote-trim-whitespace, ELPA Syncer, 2023/11/23
- [elpa] externals/denote 1b24d2ed5a 04/17: Simplify denote-format-file-name, ELPA Syncer, 2023/11/23