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

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

[elpa] externals/org-remark 3079a3133f 1/2: fix: Correct logic when impl


From: ELPA Syncer
Subject: [elpa] externals/org-remark 3079a3133f 1/2: fix: Correct logic when implementing `org-remark-report-no-highlights`
Date: Fri, 1 Nov 2024 19:05:47 -0400 (EDT)

branch: externals/org-remark
commit 3079a3133f7cfbada390c82a1632f8eb8c80c909
Author: Kristoffer Balintona <krisbalintona@gmail.com>
Commit: Kristoffer Balintona <krisbalintona@gmail.com>

    fix: Correct logic when implementing `org-remark-report-no-highlights`
    
    Currently, if `org-remark-report-no-highlights` is non-nil and there are no
    highlights in the current file, then `org-remark-highlights-get` will
    incorrectly execute code relevant to showing highlights (throwing an error) 
due
    to erroneous logic. This commit fixes the erroneous logic.
---
 org-remark.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 819d86485e..637baa811a 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -1618,9 +1618,10 @@ highlight is a property list in the following properties:
         (org-with-wide-buffer
          (let ((heading (org-find-property
                          org-remark-prop-source-file source-file-name)))
-           (if (and (not heading) org-remark-report-no-highlights)
-               (message "No highlights or annotations found for %s."
-                        source-file-name)
+           (if (not heading)
+               (when org-remark-report-no-highlights
+                 (message "No highlights or annotations found for %s."
+                          source-file-name))
              (goto-char heading)
              ;; Narrow to only subtree for a single file.  `org-find-property'
              ;; ensures that it is the beginning of a headline



reply via email to

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