[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote afeba68044 295/355: Update Commentary of denote-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote afeba68044 295/355: Update Commentary of denote-link.el |
Date: |
Sun, 26 Jun 2022 23:58:34 -0400 (EDT) |
branch: externals/denote
commit afeba6804478b07b4037743d469c7b5c47486d8f
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Update Commentary of denote-link.el
---
denote-link.el | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 122 insertions(+), 3 deletions(-)
diff --git a/denote-link.el b/denote-link.el
index bf5077fa51..3f902a8e1b 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -24,9 +24,128 @@
;;; Commentary:
;;
-;; The linking facility is subject to review and there will likely be
-;; breaking changes. This is the only area that needs to be fixed
-;; before we release the first stable version of the package.
+;; The `denote-link' command inserts a link at point to an entry specified
+;; at the minibuffer prompt. Links are formatted depending on the file
+;; type of current note. In Org and plain text buffers, links are
+;; formatted thus: `[[denote:IDENTIFIER][TITLE]]'. While in Markdown they
+;; are expressed as `[TITLE](denote:IDENTIFIER)'.
+;;
+;; When `denote-link' is called with a prefix argument (`C-u' by default)
+;; it formats links like `[[denote:IDENTIFIER]]'. The user might prefer
+;; its simplicity.
+;;
+;; Inserted links are automatically buttonized and remain active for as
+;; long as the buffer is available. In Org this is handled automatically
+;; as Denote creates its own custom hyperlink: the `denote:' type which
+;; works exactly like the `file:'. In Markdown and plain text, Denote
+;; handles the buttonization of those links.
+;;
+;; To buttonize links in existing files while visiting them, the user must
+;; add this snippet to their setup:
+;;
+;; (add-hook 'find-file-hook #'denote-link-buttonize-buffer)
+;;
+;; Denote has a major-mode-agnostic mechanism to collect all linked file
+;; references in the current buffer and return them as an appropriately
+;; formatted list. This list can then be used in interactive commands.
+;; The `denote-link-find-file' is such a command. It uses minibuffer
+;; completion to visit a file that is linked to from the current note.
+;; The candidates have the correct metadata, which is ideal for
+;; integration with other standards-compliant tools (see "Extending
+;; Denote" in the manual). For instance, a package such as `marginalia'
+;; will display accurate annotations, while the `embark' package will be
+;; able to work its magic such as in exporting the list into a filtered
+;; Dired buffer (i.e. a familiar Dired listing with only the files of
+;; the current minibuffer session).
+;;
+;; The command `denote-link-backlinks' produces a bespoke buffer which
+;; displays the file name of all notes linking to the current one. Each
+;; file name appears on its own line and is buttonized so that it performs
+;; the action of visiting the referenced file. [Development note:
+;; currently this depends on the `find' executable. Maybe we can make it
+;; work with Emacs' `xref' facility to work everywhere without losing the
+;; bespoke buffer?] The backlinks' buffer looks like this:
+;;
+;; Backlinks to "On being honest" (20220614T130812)
+;; ------------------------------------------------
+;;
+;; 20220614T145606--let-this-glance-become-a-stare__journal.txt
+;; 20220616T182958--not-feeling-butterflies-in-your-stomach__journal.txt
+;;
+;; The backlinks' buffer is fontified by default, though the user has
+;; access to the `denote-link-fontify-backlinks' option to disable this
+;; effect by setting its value to nil.
+;;
+;; The placement of the backlinks' buffer is subject to the user option
+;; `denote-link-backlinks-display-buffer-action'. Due to the nature of the
+;; underlying `display-buffer' mechanism, this inevitably is an advanced
+;; feature. By default, the backlinks' buffer is displayed below the
+;; current window. The doc string of our user option includes a
+;; configuration that places the buffer in a left side window instead.
+;; Reproducing it here for your convenience:
+;;
+;; (setq denote-link-backlinks-display-buffer-action
+;; '((display-buffer-reuse-window
+;; display-buffer-in-side-window)
+;; (side . left)
+;; (slot . 99)
+;; (window-width . 0.3)))
+;;
+;; The command `denote-link-add-links' adds links at point matching a
+;; regular expression or plain string. The links are inserted as a
+;; typographic list, such as:
+;;
+;; - link1
+;; - link2
+;; - link3
+;;
+;; Each link is formatted according to the file type of the current note,
+;; as explained further above about the `denote-link' command. The current
+;; note is excluded from the matching entries (adding a link to itself is
+;; pointless).
+;;
+;; When called with a prefix argument (`C-u') `denote-link-add-links' will
+;; format all links as `[[denote:IDENTIFIER]]', hence a typographic list:
+;;
+;; - [[denote:IDENTIFIER-1]]
+;; - [[denote:IDENTIFIER-2]]
+;; - [[denote:IDENTIFIER-3]]
+;;
+;; Same examples of a regular expression that can be used with this
+;; command:
+;;
+;; - `journal' match all files which include `journal' anywhere in their
+;; name.
+;;
+;; - `_journal' match all files which include `journal' as a keyword.
+;;
+;; - `^2022.*_journal' match all file names starting with `2022' and
+;; including the keyword `journal'.
+;;
+;; - `\.txt' match all files including `.txt'. In practical terms, this
+;; only applies to the file extension, as Denote automatically removes
+;; dots (and other characters) from the base file name.
+;;
+;; If files are created with `denote-sort-keywords' as non-nil (the
+;; default), then it is easy to write a regexp that includes multiple
+;; keywords in alphabetic order:
+;;
+;; - `_denote.*_package' match all files that include both the `denote' and
+;; `package' keywords, in this order.
+;;
+;; - `\(.*denote.*package.*\)\|\(.*package.*denote.*\)' is the same as
+;; above, but out-of-order.
+;;
+;; 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.
+;;
+;; 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.
;;; Code:
- [elpa] externals/denote e1c45e25f4 219/355: Optionally no current in files in dir regexp match, (continued)
- [elpa] externals/denote e1c45e25f4 219/355: Optionally no current in files in dir regexp match, ELPA Syncer, 2022/06/27
- [elpa] externals/denote a1d315ff84 237/355: Reword statement about metanotes, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 1ba3ccc7d0 291/355: Add missing conditionality from commit 7074b25, ELPA Syncer, 2022/06/27
- [elpa] externals/denote cea51a8a11 242/355: Add section with Frequently Asked Questions, ELPA Syncer, 2022/06/27
- [elpa] externals/denote a785de6760 244/355: Make sure minibuffer can be resized while renaming, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 6a0cb450c6 303/355: Add section referencing alternative blog posts, ELPA Syncer, 2022/06/27
- [elpa] externals/denote f03d75a72b 268/355: Document tasks/ideas to do/explore, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 995ef56415 247/355: Improve check in denote-dired--edit-front-matter-p, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 34d11cea33 243/355: Include 'denote-retrieve' in sample configuration, ELPA Syncer, 2022/06/27
- [elpa] externals/denote ecaaa6bb63 259/355: Only consider items with id in directory files, ELPA Syncer, 2022/06/27
- [elpa] externals/denote afeba68044 295/355: Update Commentary of denote-link.el,
ELPA Syncer <=
- [elpa] externals/denote 9f536185c9 292/355: Update buttonization doc string, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 69d5dd7fac 304/355: Use subheading for each FAQ entry, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 966fedf1f6 299/355: Write reference card for all functions, variables, ELPA Syncer, 2022/06/27
- [elpa] externals/denote fbe743ad6f 300/355: Tweak sample config for denote-dired-mode, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 8d504a3264 255/355: Check to operate on dired-rename window, ELPA Syncer, 2022/06/27
- [elpa] externals/denote a2e4497486 319/355: Expand the "Extending Denote" section, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 18af2cbcec 321/355: Update Acknowledgements, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 92f9cb8cb9 318/355: Use xref instead of relying on find+grep, ELPA Syncer, 2022/06/27
- [elpa] externals/denote ee4aed6376 316/355: Refine check for denote dir in dired revert, ELPA Syncer, 2022/06/27
- [elpa] externals/denote 02d6f42ab4 320/355: Merge branch 'xref-instead-of-find', ELPA Syncer, 2022/06/27