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

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

[elpa] externals/denote eec60330fb: Make org-capture not create CUSTOM_I


From: ELPA Syncer
Subject: [elpa] externals/denote eec60330fb: Make org-capture not create CUSTOM_ID for heading if no link is specified
Date: Sun, 4 Aug 2024 06:57:50 -0400 (EDT)

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

    Make org-capture not create CUSTOM_ID for heading if no link is specified
    
    Before, we were creating this unconditionally. Thanks to Jonas
    Großekathöfer for bringing this matter to my attention in issue 404:
    <https://github.com/protesilaos/denote/issues/404>.
---
 README.org | 19 ++++++++++---------
 denote.el  |  9 ++++++++-
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/README.org b/README.org
index 9734989bed..8b1783ef80 100644
--- a/README.org
+++ b/README.org
@@ -6172,15 +6172,16 @@ Denote is meant to be a collective effort.  Every bit 
of help matters.
   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, Nick Bell,
-  Paul van Gelder, Peter Prevos, Peter Smith, Samuel W. Flint, Suhail
-  Singh, Shreyas Ragavan, Stefan Thesing, Summer Emacs, Sven Seebeck,
-  Taoufik, TJ Stankus, Vick (VicZz), Viktor Haag, Wade Mealing, Yi
-  Liu, Ypot, atanasj, azegas, babusri, doolio, duli, drcxd, elge70,
-  fingerknight, hpgisler, mentalisttraceur, pRot0ta1p, rbenit68,
-  relict007, sienic, skissue, sundar bp, yetanotherfossman, zadca123
+  Friesen, Jonathan Sahar, Johan Bolmsjö, Jonas Großekathöfer,
+  Jousimies, Juanjo Presa, Julian Hoch, Kai von Fintel, Kaushal Modi,
+  Kolmas, M. Hadi Timachi, Maikol Solis, Mark Olson, Mirko Hernandez,
+  Niall Dooley, Nick Bell, Paul van Gelder, Peter Prevos, Peter Smith,
+  Samuel W. Flint, Suhail Singh, Shreyas Ragavan, Stefan Thesing,
+  Summer Emacs, Sven Seebeck, Taoufik, TJ Stankus, Vick (VicZz),
+  Viktor Haag, Wade Mealing, Yi Liu, Ypot, atanasj, azegas, babusri,
+  doolio, duli, drcxd, elge70, fingerknight, hpgisler,
+  mentalisttraceur, pRot0ta1p, rbenit68, relict007, sienic, skissue,
+  sundar bp, yetanotherfossman, zadca123
 
 Special thanks to Peter Povinec who helped refine the file-naming
 scheme, which is the cornerstone of this project.
diff --git a/denote.el b/denote.el
index 73d91fea46..5bebea7245 100644
--- a/denote.el
+++ b/denote.el
@@ -4755,7 +4755,9 @@ Also see the user option 
`denote-org-store-link-to-heading'."
              ((denote-file-is-note-p file))
              (file-id (denote-retrieve-filename-identifier file))
              (description (denote--link-get-description file)))
-    (let ((heading-links (and denote-org-store-link-to-heading (derived-mode-p 
'org-mode))))
+    (let ((heading-links (and denote-org-store-link-to-heading
+                              (derived-mode-p 'org-mode)
+                              (denote--org-capture-link-specifiers-p))))
       (org-link-store-props
        :type "denote"
        :description (if heading-links
@@ -4829,6 +4831,11 @@ the standard front matter we define."
   :package-version '(denote . "0.1.0")
   :group 'denote-org-capture)
 
+(defun denote--org-capture-link-specifiers-p ()
+  "Return non-nil if `denote-org-capture-specifiers' uses link specifiers."
+  (when (stringp denote-org-capture-specifiers)
+    (string-match-p "%^?[aAlL]" denote-org-capture-specifiers)))
+
 (defvar denote-last-path nil "Store last path.")
 
 ;;;###autoload



reply via email to

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