[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 8a25727777 03/11: Remove check of current buffer
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 8a25727777 03/11: Remove check of current buffer in denote--id-exists-p |
Date: |
Mon, 8 Aug 2022 23:57:31 -0400 (EDT) |
branch: externals/denote
commit 8a2572777750eebd9453356115996340b7b05c2a
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Remove check of current buffer in denote--id-exists-p
---
denote.el | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/denote.el b/denote.el
index 297330d9e4..98fb9ebd0e 100644
--- a/denote.el
+++ b/denote.el
@@ -894,14 +894,11 @@ where the former does not read dates without a time
component."
;; notes within fractions of a second).
(defun denote--id-exists-p (identifier)
"Return non-nil if IDENTIFIER already exists."
- (let ((current-buffer-name (when (buffer-file-name)
- (file-name-nondirectory (buffer-file-name)))))
- (or (seq-some (lambda (file)
- (string-match-p (concat "\\`" identifier) file))
- (delete current-buffer-name (denote--buffer-file-names)))
- (delete current-buffer-name
- (denote--directory-files-matching-regexp
- (concat "\\`" identifier))))))
+ (or (seq-some (lambda (file)
+ (string-match-p (concat "\\`" identifier) file))
+ (denote--buffer-file-names))
+ (denote--directory-files-matching-regexp
+ (concat "\\`" identifier))))
(defun denote--barf-duplicate-id (identifier)
"Throw a user-error if IDENTIFIER already exists."
@@ -2002,7 +1999,7 @@ inserts links with just the identifier."
(read-regexp "Insert links matching REGEX: " nil
'denote-link--add-links-history)
current-prefix-arg))
(let ((current-file (buffer-file-name)))
- (if-let ((files (denote--directory-files-matching-regexp regexp)))
+ (if-let ((files (delete current-file
(denote--directory-files-matching-regexp regexp))))
(let ((beg (point)))
(insert (denote-link--prepare-links files current-file id-only))
(unless (derived-mode-p 'org-mode)
- [elpa] externals/denote updated (22bb68b86c -> 065a10fc60), ELPA Syncer, 2022/08/08
- [elpa] externals/denote 5d7f4f3cfc 01/11: Remove let-bindings of default-directory, ELPA Syncer, 2022/08/08
- [elpa] externals/denote 9b4310779f 09/11: Use absolute paths in denote--retrieve-files-in-xrefs and denote--retrieve-proces-grep, ELPA Syncer, 2022/08/08
- [elpa] externals/denote 2c00c3ed44 10/11: Fix backlinks buffer, ELPA Syncer, 2022/08/08
- [elpa] externals/denote 6793a4319d 02/11: Delete variable denote-link--links-to-files, ELPA Syncer, 2022/08/08
- [elpa] externals/denote 2d12ec7457 05/11: Refactor denote--id-exists-p, ELPA Syncer, 2022/08/08
- [elpa] externals/denote d0a174082a 06/11: Remove the absolute parameter from denote--directory-files and delete denote--directory-files-recursively, ELPA Syncer, 2022/08/08
- [elpa] externals/denote 1e8b1b62b4 07/11: Refactor denote--buffer-file-names, ELPA Syncer, 2022/08/08
- [elpa] externals/denote 065a10fc60 11/11: Merge pull request #80 from jeanphilippegg/cleanup, ELPA Syncer, 2022/08/08
- [elpa] externals/denote 8a25727777 03/11: Remove check of current buffer in denote--id-exists-p,
ELPA Syncer <=
- [elpa] externals/denote c925928795 04/11: Refactor denote--directory-files-matching-regexp, ELPA Syncer, 2022/08/08
- [elpa] externals/denote 769f497f17 08/11: Ignore hidden directories in denote--subdirs, ELPA Syncer, 2022/08/08