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

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

[elpa] externals/denote 2e56f06381 201/355: Install aliases for certain


From: ELPA Syncer
Subject: [elpa] externals/denote 2e56f06381 201/355: Install aliases for certain commands
Date: Sun, 26 Jun 2022 23:58:23 -0400 (EDT)

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

    Install aliases for certain commands
    
    The alternative names might help the user understand what the command
    does just by looking at the commands' symbol.
---
 README.org     | 17 +++++++++++++++++
 denote-link.el |  6 ++++++
 denote.el      |  4 ++++
 3 files changed, 27 insertions(+)

diff --git a/README.org b/README.org
index 11b5784a21..2e6a2e6062 100644
--- a/README.org
+++ b/README.org
@@ -292,6 +292,13 @@ sets the Org file extension for the created note to ensure 
that the
 capture process works as intended, especially for the desired output of
 the ~denote-org-capture-specifiers~.
 
+#+findex: denote-create-note
+#+findex: denote-create-note-using-type
+For convencience, the ~denote~ command has a ~denote-create-note~ alias.
+Same for ~denote-type~: ~denote-create-note-using-type~.  The purpose of
+these aliases is to provide alternative, more descriptive names of select
+commands to aid with discoverability.
+
 * Renaming files
 :PROPERTIES:
 :CUSTOM_ID: h:532e8e2a-9b7d-41c0-8f4b-3c5cbb7d4dca
@@ -681,6 +688,16 @@ Remember that regexp constructs only need to be escaped 
once (like =\|=)
 when done interactively but twice when called from Lisp.  What we show
 above is for interactive usage.
 
+#+findex: denote-link-insert-link
+#+findex: denote-link-show-backlinks-buffer
+#+findex: denote-link-insert-links-matching-regexp
+For convenience, the ~denote-link~ command has an alias called
+~denote-link-insert-link~.  The ~denote-link-backlinks~ can also be used
+as ~denote-link-show-backlinks-buffer~.  While ~denote-link-add-links~
+is aliased ~denote-link-insert-links-matching-regexp~.  The purpose of
+these aliases is to offer alternative, more descriptive names of select
+commands.
+
 ** Writing metanotes
 :PROPERTIES:
 :CUSTOM_ID: h:6060a7e6-f179-4d42-a9de-a9968aaebecc
diff --git a/denote-link.el b/denote-link.el
index c11b16f79a..389632be10 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -130,6 +130,8 @@ and/or the documentation string of `display-buffer'."
     target
     (denote-link--file-type-format (buffer-file-name)))))
 
+(defalias 'denote-link-insert-link (symbol-function 'denote-link))
+
 (defun denote-link--collect-identifiers (regexp)
   "Return collection of identifiers in buffer matching REGEXP."
   (let (matches)
@@ -242,6 +244,8 @@ default, it will show up below the current window."
         (denote-link--prepare-backlinks id files title)
       (user-error "No links to the current note"))))
 
+(defalias 'denote-link-show-backlinks-buffer (symbol-function 
'denote-link-backlinks))
+
 (defvar denote-link--links-to-files nil
   "String of `denote-link-add-links-matching-keyword'.")
 
@@ -278,6 +282,8 @@ manual for more on the matter)."
         (insert (denote-link--prepare-links files ext))
       (user-error "No links matching `%s'" regexp))))
 
+(defalias 'denote-link-insert-links-matching-regexp (symbol-function 
'denote-link-add-links))
+
 ;;;; Register `denote:' custom Org hyperlink
 
 (declare-function org-link-set-parameters "ol.el" (type &rest parameters))
diff --git a/denote.el b/denote.el
index ec81e94c93..19b35f9867 100644
--- a/denote.el
+++ b/denote.el
@@ -581,6 +581,8 @@ alphabetically in both the file name and file contents."
   (denote--prepare-note title keywords)
   (denote--keywords-add-to-history keywords))
 
+(defalias 'denote-create-note (symbol-function 'denote))
+
 (defvar denote--file-type-history nil
   "Minibuffer history of `denote--file-type-prompt'.")
 
@@ -613,5 +615,7 @@ When called from Lisp the FILETYPE must be a symbol."
   (let ((denote-file-type (denote--file-type-symbol filetype)))
     (call-interactively #'denote)))
 
+(defalias 'denote-create-note-using-type (symbol-function 'denote-type))
+
 (provide 'denote)
 ;;; denote.el ends here



reply via email to

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