branch: externals/org-remark commit 6b4c196f862e5dbc82aaeb4fe4af3dcd7a5f14a4 Author: Noboru Ota <m...@nobiot.com> Commit: Noboru Ota <m...@nobiot.com>
feat: icon for line highlight --- org-remark-icon.el | 4 ++-- org-remark-line.el | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/org-remark-icon.el b/org-remark-icon.el index 7b68bce085..4e50911ffe 100644 --- a/org-remark-icon.el +++ b/org-remark-icon.el @@ -5,7 +5,7 @@ ;; Author: Noboru Ota <m...@nobiot.com> ;; URL: https://github.com/nobiot/org-remark ;; Created: 29 July 2023 -;; Last modified: 03 August 2023 +;; Last modified: 05 August 2023 ;; Package-Requires: ((emacs "27.1") (org "9.4")) ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp @@ -152,7 +152,7 @@ Each overlay is a highlight." (ignore)) (cl-defmethod org-remark-icon-overlay-put (ov icon-string (org-remark-type (eql nil))) - (overlay-put ov 'after-string icon-string)) + (overlay-put ov 'after-string icon-string)) (defun org-remark-icon-propertize (icon-name highlight default-face) "Return a propertized string. diff --git a/org-remark-line.el b/org-remark-line.el index c436738321..1b4fdcebc0 100644 --- a/org-remark-line.el +++ b/org-remark-line.el @@ -5,7 +5,7 @@ ;; Author: Noboru Ota <m...@nobiot.com> ;; URL: https://github.com/nobiot/org-remark ;; Created: 01 August 2023 -;; Last modified: 04 August 2023 +;; Last modified: 05 August 2023 ;; Package-Requires: ((emacs "27.1") (org "9.4")) ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp @@ -157,6 +157,15 @@ end of overlay being identical." (unless (= ov-start ov-line-bol) (move-overlay ov ov-line-bol ov-line-bol)))) +(cl-defmethod org-remark-icon-overlay-put (ov icon-string (org-remark-type (eql 'line))) + ;; If the icon-string has a display properties, assume it is an icon image + (let ((display-prop (get-text-property 0 'display icon-string))) + (when display-prop + (let* ((display-prop (list '(margin left-margin) display-prop)) + (icon-string (propertize "* " 'display display-prop)) + (icon-string (propertize icon-string face 'org-remark-line-highligther))) + (overlay-put ov 'before-string icon-string))))) + ;; (defun org-remark-line-inspect-overlay () ;; (interactive) ;; (car (overlays-in (point) (point))))