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

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

[elpa] externals/org-remark c3334e2756 1/3: fix: Info-search & clone-buf


From: ELPA Syncer
Subject: [elpa] externals/org-remark c3334e2756 1/3: fix: Info-search & clone-buffer do not load highlights
Date: Mon, 31 Jul 2023 18:58:15 -0400 (EDT)

branch: externals/org-remark
commit c3334e2756c949bad5c075f3d827c75b37494e01
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>

    fix: Info-search & clone-buffer do not load highlights
    
    `Info-search` is specific to `org-remark-info-mode`. `clone-buffer` is
    common for any buffer that is not file-visiting such as
    `org-remark-eww`.
---
 org-remark-info.el | 8 +++++---
 org-remark.el      | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/org-remark-info.el b/org-remark-info.el
index 1e038efece..b87902601d 100644
--- a/org-remark-info.el
+++ b/org-remark-info.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota <me@nobiot.com>
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 16 July 2023
-;; Last modified: 30 July 2023
+;; Last modified: 31 July 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -72,13 +72,15 @@
                     #'org-remark-info-get-node)
           (add-hook 'org-remark-highlight-link-to-source-functions
                     #'org-remark-info-link)
-          (advice-add #'Info-find-node :after 
#'org-remark-info-highlights-load))
+          (advice-add #'Info-find-node :after 
#'org-remark-info-highlights-load)
+          (advice-add #'Info-search :after #'org-remark-info-highlights-load))
     ;; Disable
     (remove-hook 'org-remark-source-find-file-name-functions
                  #'org-remark-info-get-node)
     (remove-hook 'org-remark-highlight-link-to-source-functions
                  #'org-remark-info-link)
-    (advice-remove #'Info-find-node #'org-remark-info-highlights-load)))
+    (advice-remove #'Info-find-node #'org-remark-info-highlights-load)
+    (advice-remove #'Info-search #'org-remark-info-highlights-load)))
 
 (defun org-remark-info-highlights-load (&rest _args)
   "Wrapper for `org-remark-highlights-load'.
diff --git a/org-remark.el b/org-remark.el
index b1d9046446..281fb1720f 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.1.0
 ;; Created: 22 December 2020
-;; Last modified: 30 July 2023
+;; Last modified: 31 July 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -310,7 +310,8 @@ recommended to turn it on as part of Emacs initialization.
       (add-hook 'after-save-hook #'org-remark-save nil t)
       (add-hook 'org-remark-highlight-link-to-source-functions
                 #'org-remark-highlight-link-to-source-default 80)
-      (add-hook 'after-revert-hook #'org-remark-highlights-load))
+      (add-hook 'after-revert-hook #'org-remark-highlights-load)
+      (add-hook 'clone-buffer-hook #'org-remark-highlights-load 80 :local))
      (t
       ;; Deactivate
       (when org-remark-highlights
@@ -321,7 +322,8 @@ recommended to turn it on as part of Emacs initialization.
       (remove-hook 'after-save-hook #'org-remark-save t)
       (remove-hook 'org-remark-highlight-link-to-source-functions
                    #'org-remark-highlight-link-to-source-default)
-      (remove-hook 'after-revert-hook #'org-remark-highlights-load))))
+      (remove-hook 'after-revert-hook #'org-remark-highlights-load)
+      (remove-hook 'clone-buffer-hook #'org-remark-highlights-load :local))))
 
 
 ;;;; Org-remark Menu



reply via email to

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