[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/denote 84f2f28764 07/10: Add documentation for a global
From: |
ELPA Syncer |
Subject: |
[elpa] externals/denote 84f2f28764 07/10: Add documentation for a global denote-link |
Date: |
Mon, 20 May 2024 00:57:53 -0400 (EDT) |
branch: externals/denote
commit 84f2f287643c883f1c839d053f490578107f6d52
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add documentation for a global denote-link
Thanks to Alexis Purslane for suggesting this idea in issue 364:
<https://github.com/protesilaos/denote/issues/364>.
---
README.org | 50 ++++++++++++++++++++++++++++++++++++--------------
1 file changed, 36 insertions(+), 14 deletions(-)
diff --git a/README.org b/README.org
index 9b859594b8..2cf0475b54 100644
--- a/README.org
+++ b/README.org
@@ -2155,7 +2155,28 @@ The ~denote-link-buttonize-buffer~ is also an
interactive function in
case the user needs it.
Links are created only for files which qualify as a "note" for our
-purposes ([[#h:fc913d54-26c8-4c41-be86-999839e8ad31][Linking notes]]).
+purposes ([[#h:fc913d54-26c8-4c41-be86-999839e8ad31][Linking notes]]). Users
who need to link to Denote files from
+anywhere, can write a simple command to that effect:
+
+#+begin_src emacs-lisp
+(defun my-denote-link-global (file file-type description &optional id-only)
+ "Like the `denote-link', but works in any buffer.
+The FILE, FILE-TYPE, DESCRIPTION, and ID-ONLY have the same meaning as
+in `denote-link'."
+ (interactive
+ (let* ((file (denote-file-prompt nil "Link to FILE"))
+ (file-type (denote-filetype-heuristics buffer-file-name))
+ (description (when (file-exists-p file)
+ (denote--link-get-description file))))
+ (list file file-type description current-prefix-arg)))
+ (unless (file-exists-p file)
+ (user-error "The linked file does not exists"))
+ (let ((beg (point)))
+ (denote--delete-active-region-content)
+ (insert (denote-format-link file description file-type id-only))
+ (unless (derived-mode-p 'org-mode)
+ (make-button beg (point) 'type 'denote-link-button))))
+#+end_src
#+vindex: denote-faces-link
Links are styled with the ~denote-faces-link~ face, which looks exactly
@@ -5483,19 +5504,20 @@ Denote is meant to be a collective effort. Every bit
of help matters.
mentalisttraceur, pmenair, relict007.
+ Ideas and/or user feedback :: Abin Simon, Aditya Yadav, Alan
- Schmitt, Aleksandr Vityazev, Alex Hirschfeld, Alfredo Borrás, Ashton
- Wiersdorf, Benjamin Kästner, Claudiu Tănăselia, Colin McLear, Damien
- Cassou, Elias Storms, Federico Stilman, Florian, Frédéric Willem
- Frank Ehmsen, Glenna D., Guo Yong, Hanspeter Gisler Harold Ollivier,
- Jack Baty, Jay Rajput, Jean-Charles Bagneris, Jens Östlund, Jeremy
- Friesen, Jonathan Sahar, Johan Bolmsjö, Jousimies, Juanjo Presa,
- Julian Hoch, Kai von Fintel, Kaushal Modi, Kolmas, M. Hadi Timachi,
- Maikol Solis, Mark Olson, Mirko Hernandez, Niall Dooley, Paul van
- Gelder, Peter Prevos, Peter Smith, Suhail Singh, Shreyas Ragavan,
- Stefan Thesing, Summer Emacs, Sven Seebeck, Taoufik, TJ Stankus,
- Vick (VicZz), Viktor Haag, Wade Mealing, Yi Liu, Ypot, atanasj,
- babusri, doolio, duli, drcxd, fingerknight, hpgisler,
- mentalisttraceur, pRot0ta1p, rbenit68, relict007, sienic, sundar bp.
+ Schmitt, Aleksandr Vityazev, Alex Hirschfeld, Alexis Purslane,
+ Alfredo Borrás, Ashton Wiersdorf, Benjamin Kästner, Claudiu
+ Tănăselia, Colin McLear, Damien Cassou, Elias Storms, Federico
+ Stilman, Florian, Frédéric Willem Frank Ehmsen, Glenna D., Guo Yong,
+ Hanspeter Gisler Harold Ollivier, Jack Baty, Jay Rajput,
+ Jean-Charles Bagneris, Jens Östlund, Jeremy Friesen, Jonathan Sahar,
+ Johan Bolmsjö, Jousimies, Juanjo Presa, Julian Hoch, Kai von Fintel,
+ Kaushal Modi, Kolmas, M. Hadi Timachi, Maikol Solis, Mark Olson,
+ Mirko Hernandez, Niall Dooley, Paul van Gelder, Peter Prevos, Peter
+ Smith, Suhail Singh, Shreyas Ragavan, Stefan Thesing, Summer Emacs,
+ Sven Seebeck, Taoufik, TJ Stankus, Vick (VicZz), Viktor Haag, Wade
+ Mealing, Yi Liu, Ypot, atanasj, babusri, doolio, duli, drcxd,
+ fingerknight, hpgisler, mentalisttraceur, pRot0ta1p, rbenit68,
+ relict007, sienic, sundar bp.
Special thanks to Peter Povinec who helped refine the file-naming
scheme, which is the cornerstone of this project.
- [elpa] externals/denote updated (0b5bc23718 -> ed112050d9), ELPA Syncer, 2024/05/20
- [elpa] externals/denote 84f2f28764 07/10: Add documentation for a global denote-link,
ELPA Syncer <=
- [elpa] externals/denote ae8db2eefd 08/10: Remove needless let*, ELPA Syncer, 2024/05/20
- [elpa] externals/denote 8a8bb77578 09/10: Mention denote-link-with-signature in denote-link docstring, ELPA Syncer, 2024/05/20
- [elpa] externals/denote bfee3da14c 06/10: Reword the documentation of denote-link, ELPA Syncer, 2024/05/20
- [elpa] externals/denote d284099a01 01/10: Be more explicit in denote-valid-date-p and handle dates that are empty strings, ELPA Syncer, 2024/05/20
- [elpa] externals/denote 4af0944d13 03/10: Use internal functions in denote and denote-org-capture commands, ELPA Syncer, 2024/05/20
- [elpa] externals/denote 24a1a8c6e2 04/10: Merge pull request #363 from jeanphilippegg/creation-commands, ELPA Syncer, 2024/05/20
- [elpa] externals/denote bd14d37c4d 05/10: Make denote-format-link use Org links if FILE-TYPE is nil, ELPA Syncer, 2024/05/20
- [elpa] externals/denote ed112050d9 10/10: Add two cross references in the manual for linking individual files, ELPA Syncer, 2024/05/20
- [elpa] externals/denote 623da83a31 02/10: Use denote-parse-date in denote-org-capture, ELPA Syncer, 2024/05/20