[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote e7a176e4e7 13/20: DEPRECATE 'denote-add-missing-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote e7a176e4e7 13/20: DEPRECATE 'denote-add-missing-links' |
Date: |
Sat, 25 Nov 2023 00:57:51 -0500 (EST) |
branch: externals/denote
commit e7a176e4e754791595ba041ed615ede874d6caf9
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
DEPRECATE 'denote-add-missing-links'
It does not work reliably on my end and has been the source of
confusion as a result. I don't think we can guarantee the correct
behaviour at all times.
---
README.org | 14 --------------
denote-org-dblock.el | 14 ++++----------
denote.el | 25 +------------------------
3 files changed, 5 insertions(+), 48 deletions(-)
diff --git a/README.org b/README.org
index 43e8670f61..5f41fecf17 100644
--- a/README.org
+++ b/README.org
@@ -1860,20 +1860,6 @@ will get this link: =[[denote:20230925T144303][abc My
first signature note]]=.
For more advanced uses, refer to the doc string of the ~denote-link~
function.
-** Insert links, but only those missing from current buffer
-:PROPERTIES:
-:CUSTOM_ID: h:0c1fdaab-5a6b-4792-9694-fed53cd042e6
-:END:
-
-#+findex: denote-add-missing-links
-As a variation on the ~denote-add-links~ command, one may wish to only
-include 'missing links', i.e. links that are not yet present in the
-current file.
-
-This can be achieved with ~denote-add-missing-links~. The command is
-similar to ~denote-add-links~, but will only include links to notes
-that are not yet linked to ([[#h:9bec2c83-36ca-4951-aefc-7187c5463f90][Insert
links matching a regexp]]).
-
** Insert links from marked files in Dired
:PROPERTIES:
:CUSTOM_ID: h:9cbb692e-5d8a-44a6-9193-899a07872a07
diff --git a/denote-org-dblock.el b/denote-org-dblock.el
index a5dbce3fec..fffcd80e06 100644
--- a/denote-org-dblock.el
+++ b/denote-org-dblock.el
@@ -50,7 +50,6 @@
(read-regexp "Search for notes matching REGEX: " nil
'denote-link--add-links-history)))
(org-create-dblock (list :name "denote-links"
:regexp regexp
- :missing-only nil
:reverse nil))
(org-update-dblock))
@@ -64,20 +63,15 @@
Used by `org-dblock-update' with PARAMS provided by the dynamic block."
(let* ((regexp (plist-get params :regexp))
(rx (if (listp regexp) (macroexpand `(rx ,regexp)) regexp))
- (missing-only (plist-get params :missing-only))
(block-name (plist-get params :block-name))
(denote-link-add-links-sort (plist-get params :reverse))
(current-file (buffer-file-name)))
(when block-name
(insert "#+name: " block-name "\n"))
- (if missing-only
- (progn
- (denote-add-missing-links rx)
- (join-line)) ;; remove trailing empty line left by
denote-link--prepare-links
- (when-let ((files (delete current-file
- (denote-directory-files-matching-regexp rx))))
- (insert (denote-link--prepare-links files current-file nil))
- (join-line))))) ;; remove trailing empty line
+ (when-let ((files (delete current-file
+ (denote-directory-files-matching-regexp rx))))
+ (insert (denote-link--prepare-links files current-file nil))
+ (join-line)))) ;; remove trailing empty line
;;;; Dynamic block to insert backlinks
diff --git a/denote.el b/denote.el
index 7cd7f9a9f3..cb6b542e28 100644
--- a/denote.el
+++ b/denote.el
@@ -3537,30 +3537,7 @@ inserts links with just the identifier."
'denote-add-missing-links
"2.0.0")
-;;;###autoload
-(defun denote-add-missing-links (regexp &optional id-only)
- "Insert missing links to all notes matching REGEXP.
-Similar to `denote-add-links' but insert only links not yet
-present in the current buffer.
-
-Optional ID-ONLY has the same meaning as in `denote-link': it
-inserts links with just the identifier."
- (interactive
- (list
- (read-regexp "Insert links matching REGEX: " nil
'denote-link--add-links-history)
- current-prefix-arg))
- (let* ((current-file (buffer-file-name))
- (file-type (denote-filetype-heuristics current-file))
- (current-id (denote--link-in-context-regexp file-type))
- (linked-files (denote-link--expand-identifiers current-id)))
- (if-let ((found-files (delete current-file
- (denote-directory-files-matching-regexp
regexp)))
- (final-files (seq-difference found-files linked-files))
- (beg (point)))
- (progn
- (insert (denote-link--prepare-links final-files file-type id-only))
- (denote-link-buttonize-buffer beg (point)))
- (message "No links matching `%s' that aren't yet present in the current
buffer" regexp))))
+(make-obsolete 'denote-add-missing-links nil "2.2.0")
;;;;; Links from Dired marks
- [elpa] externals/denote b0727b1dfc 10/20: Include me as one of the authors of denote-org-dblock.el, (continued)
- [elpa] externals/denote b0727b1dfc 10/20: Include me as one of the authors of denote-org-dblock.el, ELPA Syncer, 2023/11/25
- [elpa] externals/denote 0e385916d5 09/20: Remove needless commentary from denote-org-dblock.el, ELPA Syncer, 2023/11/25
- [elpa] externals/denote f29a9c9e7d 05/20: Remove needless comment from denote-org-dblock.el, ELPA Syncer, 2023/11/25
- [elpa] externals/denote 50e392ffbe 15/20: Remove trailing empty line from 'denote-files' Org dynamic block, ELPA Syncer, 2023/11/25
- [elpa] externals/denote a2b66a2f96 20/20: Rewrite the entire section of the manual about Org dynamic blocks, ELPA Syncer, 2023/11/25
- [elpa] externals/denote b00a8230cd 02/20: Greatly expand the capabilities of the 'denote-files' Org dynamic block, ELPA Syncer, 2023/11/25
- [elpa] externals/denote 3f23dd1fd0 04/20: Include the :reverse parameter in 'denote-org-dblock-insert-backlinks', ELPA Syncer, 2023/11/25
- [elpa] externals/denote a4c0207700 07/20: Include the :reverse parameter in 'denote-org-dblock-insert-links', ELPA Syncer, 2023/11/25
- [elpa] externals/denote 46eef8650b 11/20: Rewrite the Commentary and one-line description of denote-org-dblock.el, ELPA Syncer, 2023/11/25
- [elpa] externals/denote 54b28998aa 06/20: Remove needless quote from t in denote-org-dblock.el, ELPA Syncer, 2023/11/25
- [elpa] externals/denote e7a176e4e7 13/20: DEPRECATE 'denote-add-missing-links',
ELPA Syncer <=
- [elpa] externals/denote e2f72c5f75 08/20: Clarify that 'denote-backlinks' Org dynamic block accepts :reverse parameter, ELPA Syncer, 2023/11/25
- [elpa] externals/denote 6d26aea464 17/20: Remove :reverse parameter from 'denote-backlinks' Org dynamic block, ELPA Syncer, 2023/11/25
- [elpa] externals/denote 87f5bb12a4 18/20: Make 'denote-backlinks' Org dynamic block accept :id-only parameter, ELPA Syncer, 2023/11/25
- [elpa] externals/denote 00632408ed 16/20: Remove :reverse parameter from 'denote-links' Org dynamic block, ELPA Syncer, 2023/11/25
- [elpa] externals/denote df75a7bf7e 19/20: Simplify the 'denote-backlinks' Org dynamic block, ELPA Syncer, 2023/11/25
- [elpa] externals/denote 3922e348fb 12/20: Tweak the outline of denote-org-dblock.el, ELPA Syncer, 2023/11/25
- [elpa] externals/denote 110271dc5a 03/20: Register 'denote-files' Org dynamic block, ELPA Syncer, 2023/11/25
- [elpa] externals/denote d63f2f3eb3 01/20: Move denote-org-dblock-file-contents-separator closer to where it is used, ELPA Syncer, 2023/11/25
- [elpa] externals/denote 1ac6a22ee3 14/20: Simplify the 'denote-links' Org dynamic block; add :id-only parameter, ELPA Syncer, 2023/11/25