[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark 3997025261 33/75: feat: icons for line-hl ge
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark 3997025261 33/75: feat: icons for line-hl get their default face when notes exit |
Date: |
Fri, 6 Oct 2023 12:59:18 -0400 (EDT) |
branch: externals/org-remark
commit 39970252611acb18b5b227e04b6ed5f46a5b8086
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
feat: icons for line-hl get their default face when notes exit
---
org-remark-icon.el | 12 ++++++++++--
org-remark-line.el | 16 ++++++++++++----
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/org-remark-icon.el b/org-remark-icon.el
index 39f5ffa809..fa66d31401 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -5,7 +5,7 @@
;; Author: Noboru Ota <me@nobiot.com>
;; URL: https://github.com/nobiot/org-remark
;; Created: 29 July 2023
-;; Last modified: 14 August 2023
+;; Last modified: 18 August 2023
;; Package-Requires: ((emacs "27.1") (org "9.4"))
;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
@@ -196,11 +196,19 @@ of them. All it needs to do is to return a string that
represents
an icon, typically propertized with a face."
(let ((icon (symbol-value (intern (concat "org-remark-icon-"
(symbol-name icon-name)))))
- (highlight-face (overlay-get highlight 'face))
+ (highlight-face (org-remark-icon-highlight-get-face
+ highlight
+ (overlay-get highlight 'org-remark-type)))
(default-face default-face))
(if (functionp icon)
(funcall icon icon-name highlight-face default-face)
(propertize icon 'face (if default-face default-face highlight-face)))))
+(cl-defgeneric org-remark-icon-highlight-get-face (highlight _org-remark-type)
+ "Return the face of the HIGHLIGHT overlay.
+This is default method for range-highlights."
+ (overlay-get highlight 'face))
+
+
(provide 'org-remark-icon)
;;; org-remark-icon.el ends here
diff --git a/org-remark-line.el b/org-remark-line.el
index b6452ef848..79a314b94b 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -241,14 +241,22 @@ Return nil when no window is created for current buffer."
(cond (display-prop
(let* ((display-prop (list '(margin left-margin) display-prop))
(icon-string (propertize " " 'display display-prop)))
- (setq icon-string (propertize icon-string
- 'face
'org-remark-line-highlighter))
+ ;; (setq icon-string (propertize icon-string
+ ;; 'face
'org-remark-line-highlighter))
(overlay-put ov 'before-string icon-string)))
(icon-string
- (let ((icon-string (propertize icon-string
- 'face
'org-remark-line-highlighter)))
+ (let ((icon-string icon-string))
+ ;;(propertize icon-string
+ ;; 'face
'org-remark-line-highlighter)))
(overlay-put ov 'before-string (propertize " " 'display (list
'(margin left-margin) icon-string)))))
(t (ignore))))))
+
+(cl-defmethod org-remark-icon-highlight-get-face (highlight (_org-remark-type
(eql 'line)))
+ "Return the face of the line-highilght in a margin."
+ (get-text-property 0 'face
+ (cadr (get-text-property 0 'display
+ (overlay-get highlight
'before-string)))))
+
(provide 'org-remark-line)
;;; org-remark-line.el ends here
- [elpa] externals/org-remark f37ddb69e7 22/75: fix(change): force trigger of notes buffer face, (continued)
- [elpa] externals/org-remark f37ddb69e7 22/75: fix(change): force trigger of notes buffer face, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark d606d80a47 29/75: refactor: move highlights-delay-load to org-remark.el, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 335293a03e 41/75: style(line):Clean up comments, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 8c3238902b 54/75: docs: keybinding sync with README, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark e904b53b2c 60/75: refactor: silence compilier warning, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark af03b2103e 50/75: docs: Docstring for org-remark-default-features, etc., ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 16622af0c0 66/75: fix: add org-remark-find-overlay-at-point to local hook, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 2fd1025490 63/75: fix: Regression. Delete only removes., ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 8020d33380 47/75: docs: organize customizing groups, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 4e57d99e2d 68/75: fix: use space display specification instead of a string of \s, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 3997025261 33/75: feat: icons for line-hl get their default face when notes exit,
ELPA Syncer <=