[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark 7176e9d460 073/173: add: ID inherits. fix: h
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark 7176e9d460 073/173: add: ID inherits. fix: housekeep |
Date: |
Fri, 28 Jan 2022 16:58:02 -0500 (EST) |
branch: externals/org-remark
commit 7176e9d460479cff5be99edf10cde67ccdfe45f1
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
add: ID inherits. fix: housekeep
---
README.org | 12 ++++++++++++
org-marginalia.el | 17 ++++++++---------
2 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/README.org b/README.org
index 79fc7509a3..f3fb6a91c7 100644
--- a/README.org
+++ b/README.org
@@ -43,6 +43,7 @@ Refer to the screenshots below for a teaser of what it can
do.
- [[#deleted-notes-on-jit-lock-register][Deleted Notes on jit-lock-register]]
- [[#org-marginalia-load][org-marginalia-load]]
- [[#set-buffer-modified-p][set-buffer-modified-p]]
+ - [[#overlay-put][overlay-put]]
- [[#local-variables][Local Variables]]
:END:
@@ -309,6 +310,17 @@ Adding overlay does not set the buffer modified.
It's more fluid with save operation.
You cannot use `undo' to undo highlighter.
+** overlay-put
+:PROPERTIES:
+:marginalia-id: 44c310d9
+:marginalia-source-beg: 11551
+:marginalia-source-end: 11562
+:END:
+[[file:~/local-repos/org-marginalia/org-marginalia.el][org-marginalia]]
+
+Do not add the =evaporate t= property for the highlight's overlay. By
remaining in the buffer, =undo= puts overlays in their original location when
text regions get killed and subsequently the kill gets undone.
+
+Using overlays instead of text-properties has an advantage of easy composition
of faces; e.g. when marking on a comment line in =emacs-lisp-mode=, the
highlighters face won't be composed onto the underlying syntax face for
comments. Overlay can make it easy to add an additional face to comments and
other syntactically font-locked regions.
* Local Variables
# Local Variables:
diff --git a/org-marginalia.el b/org-marginalia.el
index 6aaa9fe6ea..8e03cf606c 100644
--- a/org-marginalia.el
+++ b/org-marginalia.el
@@ -380,10 +380,10 @@ in the current buffer. Each highlight is represented by
this data structure:
(file-name-nondirectory (buffer-file-name))))))
(org-marginalia-housekeep)
(org-marginalia-sort-highlights-list)
- (dolist (highlight org-marginalia-highlights)
+ (dolist (h org-marginalia-highlights)
(let ((orgid (and org-marginalia-use-org-id
- (org-id-get (overlay-start highlight)))))
- (org-marginalia-save-single-highlight highlight title source-path
orgid)))
+ (org-entry-get (overlay-start h) "ID" 'INHERIT))))
+ (org-marginalia-save-single-highlight h title source-path orgid)))
;; Tracking
(when org-marginalia-files-tracked
(add-to-list 'org-marginalia-files-tracked
@@ -672,7 +672,7 @@ notes of the entry."
(defun org-marginalia-housekeep ()
"Housekeep the internal variable `org-marginalia-highlights'.
-Case 1. Both start and end of an overlay are 1
+Case 1. Both start and end of an overlay are identical
This should not happen when you manually mark a text
region. A typical cause of this case is when you delete a
@@ -685,12 +685,11 @@ Case 2. The overlay points to no buffer
(interactive)
(dolist (ov org-marginalia-highlights)
- ;; Both start and end of an overlay is 1 should not happen when you
manually
- ;; mark a text region. A typical cause of this case is when you delete a
- ;; region that contains a highlight overlay.
+ ;; Both start and end of an overlay are indentical; this should not happen
+ ;; when you manually mark a text region. A typical cause of this case is
+ ;; when you delete a region that contains a highlight overlay.
(when (and (overlay-buffer ov)
- (= 1 (overlay-start ov))
- (= 1 (overlay-end ov)))
+ (= (overlay-start ov) (overlay-end ov)))
(org-marginalia-remove-marginalia (overlay-get ov 'org-marginalia-id))
(delete-overlay ov))
(unless (overlay-buffer ov)
- [elpa] externals/org-remark 2954965bb3 127/173: add: define org-remark-mark explicitly for autoload cookie, (continued)
- [elpa] externals/org-remark 2954965bb3 127/173: add: define org-remark-mark explicitly for autoload cookie, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark e27e0d6dad 023/173: feat: Add om/toggle for show/hide highlighters, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark bfeffae259 027/173: doc: Minor update, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 6be3fc988b 039/173: doc: Minor update, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 3c270b4e28 025/173: doc: Update readme with a title screen, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 3af3a47e1b 047/173: feat: Add transient navigation to next/prev, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark d8908d6aba 054/173: doc: fix code example in README, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark f9c313342c 067/173: chg: separate global-tracking.el, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark a42ca0f756 066/173: readme for marginalia, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark e78f549267 069/173: intrnl: housekeep to save; refactor remove, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 7176e9d460 073/173: add: ID inherits. fix: housekeep,
ELPA Syncer <=
- [elpa] externals/org-remark 9bb66a742e 074/173: fix: overlay front-advance, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 2ed345c66c 071/173: rm: create-id option, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark b6e6a55f63 075/173: chg: customization notes-file-path type to file, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark ca0c0ac674 080/173: doc: global-tracking docstring, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 12e0b631eb 076/173: lint: shorten longer than 80 char, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 9d63088869 086/173: docs: README, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark ad93331bf7 089/173: doc: update README with comment on autoload, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 75698160aa 098/173: fix: for name change, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark c946340b50 096/173: intrnl: refactor & docstrings, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 92d3b17bf3 099/173: change name org-hana to org-remark, ELPA Syncer, 2022/01/28