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

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

[elpa] externals/denote 05a5038abd: Improve conditionality of Org button


From: ELPA Syncer
Subject: [elpa] externals/denote 05a5038abd: Improve conditionality of Org button fontification
Date: Wed, 14 Sep 2022 02:57:31 -0400 (EDT)

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

    Improve conditionality of Org button fontification
    
    This way we only try to use the correct face when we are inside of a
    Denote note.  We do not want Org to try to figure this out in other
    situations, such as while building the agenda.
    
    Thanks to Alan Schmitt for reporting the problem on the mailing list.
    It led me down the path of debugging the issue:
    <https://lists.sr.ht/~protesilaos/denote/%3C877d2e2ini.fsf%40m4x.org%3E>.
---
 denote.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/denote.el b/denote.el
index 1d0a3e9446..6319b5deda 100644
--- a/denote.el
+++ b/denote.el
@@ -2499,10 +2499,14 @@ file."
 (defun denote-link-ol-face (link)
   "Return appropriate face for LINK.
 If the LINK resolves to a note, use `denote-faces-link', else
-return `denote-faces-broken-link'."
-  (if (denote-link--ol-resolve-link-to-target link)
-      'denote-faces-link
-    'denote-faces-broken-link))
+return `denote-faces-broken-link'.  When links are propertized in
+other contexts, apply the generic `link' face (this happens with
+the Org agenda)."
+  (if (not (denote--current-file-is-note-p))
+      'link
+    (if (denote-link--ol-resolve-link-to-target link)
+        'denote-faces-link
+      'denote-faces-broken-link)))
 
 (defun denote-link-ol-complete ()
   "Like `denote-link' but for Org integration.



reply via email to

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