[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark fa81cc764a 36/67: feat(adjust-positions): Ad
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark fa81cc764a 36/67: feat(adjust-positions): Add an icon indicating the position adjusted |
Date: |
Sat, 22 Jul 2023 06:59:02 -0400 (EDT) |
branch: externals/org-remark
commit fa81cc764a78795b3fcc55728f4436d2dc0d9ba8
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
feat(adjust-positions): Add an icon indicating the position adjusted
---
org-remark.el | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/org-remark.el b/org-remark.el
index 558dbb6fdf..9dec7a440c 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -58,6 +58,18 @@
:inherit highlight))
"Face for the default highlighter pen.")
+(defface org-remark-highlighter-warning
+ '((((class color) (min-colors 88) (background light))
+ :background "#fff3da")
+ (((class color) (min-colors 88) (background dark))
+ :background "#fff3da")
+ (t
+ :inherit warning))
+ "Face for highlighter warning.
+For example, it is used by the characters that indicate the
+location of the highlight has been automatically adjusted from its
+original.")
+
(defcustom org-remark-create-default-pen-set t
"When non-nil, Org-remark creates default pen set.
Set to nil if you prefer for it not to."
@@ -1055,7 +1067,10 @@ Adjustment is done by TEXT, which should be the original
text of the highlight."
;; overlay; this way, you don't need to look forward and backward
;; separately.
(when (re-search-forward text paragraph-end :noerror)
- (move-overlay highlight (match-beginning 0) (match-end 0)))))))
+ (move-overlay highlight (match-beginning 0) (match-end 0))))
+ ;; Even if the new location could not be found, indicate that it is
different to the original
+ (overlay-put highlight 'after-string
+ (propertize "!?" 'face 'org-remark-highlighter-warning)))))
(defun org-remark-highlight-link-to-source-default (filename point)
"Return Org link string for the source when adding a highlight.
@@ -1335,16 +1350,20 @@ load the highlights"
;; highlight.
;; FIXME Currently the when clause is used to guard against
- ;; the case wheremarkre a highlight overlay is not found. It should
+ ;; the case where a highlight overlay is not found. It should
;; be an edge case but the highlight could have moved to a
;; completely new location where the old location does not
;; overlap with the new location at all.
(when ov (org-remark-highlight-clear ov))
(push (org-remark-highlight-load highlight) overlays)))
(unless update (org-remark-notes-setup notes-buf source-buf))
- (run-hook-with-args 'org-remark-highlights-after-load-hook
- overlays notes-buf)
- t)))
+ (if overlays
+ (progn (run-hook-with-args 'org-remark-highlights-after-load-hook
+ overlays notes-buf)
+ ;; Return t
+ t)
+ ;; if there is no overlays loaded, return nil
+ nil))))
(defun org-remark-highlights-get-positions (&optional reverse)
"Return list of the beginning point of all visible highlights in this buffer.
- [elpa] externals/org-remark 9f95c8a6f9 22/67: refactor: adjust-positions and sync, (continued)
- [elpa] externals/org-remark 9f95c8a6f9 22/67: refactor: adjust-positions and sync, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 7bf6359fae 23/67: refactor: remove org-remark-notes-update-source, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 5bd790cf3c 27/67: docs: docstring, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 5ea75070bc 29/67: refactor: move highlights-after-load-hook to org-remark.el, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 2ae9516091 40/67: fix(highlights-get): existence check beg and end, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 612629c366 51/67: docs: NEWS and README, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark e8e0693268 07/67: fix(save): source-setup-done needs to be done in source, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark b35fcfdbe4 16/67: feat: adjust positions after load via new hook, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 32860de66b 24/67: fix: typo in the previous refactor, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark f2a1e9f339 32/67: fix(eww) adjust the arg of fn link-to-source, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark fa81cc764a 36/67: feat(adjust-positions): Add an icon indicating the position adjusted,
ELPA Syncer <=
- [elpa] externals/org-remark 5a0299bdf7 39/67: refactor: (WIP) highlight-new-headline-maybe, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark eb9741e51f 44/67: refactor: highlights-add-icons, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark ae220ad29b 50/67: refactor(icon): change default to ascii characters only, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 112bbfa9ba 53/67: docs: Update user manual with new features, etc., ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark d133a32786 58/67: docs: Minor style updates to user manual, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 58feed0c04 54/67: style: lint with flymake, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark e4c42d7fd4 56/67: docs: Fix footnote (remove), ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 536c2cca1e 63/67: fix: add-headline. Location of new highlight notes was wrong, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 883f948bbf 66/67: style: make org-remark-highlight-save obsolete and add alias, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 3216d951fc 09/67: feat: nov.el title and nov-file-name in H1 of the notes, ELPA Syncer, 2023/07/22