[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark ca648a1876 18/75: fix: change now can only s
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark ca648a1876 18/75: fix: change now can only select pens from the same type |
Date: |
Fri, 6 Oct 2023 12:59:17 -0400 (EDT) |
branch: externals/org-remark
commit ca648a18767418b5b3774daa3a9720b472743bf0
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
fix: change now can only select pens from the same type
Changing from the range-highlight to line-highlight and vice versa must
not be possible. This would break the begin end properties.
---
org-remark.el | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/org-remark.el b/org-remark.el
index 9e8cb1d8b4..18fb9dd5ac 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -622,15 +622,27 @@ and the current source buffer."
This function will show you a list of available pens to choose
from."
(interactive)
- (when-let* ((ov (org-remark-find-overlay-at-point))
- (id (overlay-get ov 'org-remark-id))
- (beg (overlay-start ov))
- (end (overlay-end ov)))
- (let ((new-pen (if pen pen
- (intern
- (completing-read "Which pen?:"
org-remark-available-pens)))))
- (org-remark-highlight-clear ov)
- (funcall new-pen beg end id :change))))
+ (if-let* ((ov (org-remark-find-dwim))
+ (id (overlay-get ov 'org-remark-id))
+ (beg (overlay-start ov))
+ (end (overlay-end ov)))
+ (let* ((available-pens (seq-filter
+ (lambda (pen-fn)
+ (let ((type (overlay-get ov 'org-remark-type)))
+ (eql type (function-get pen-fn
'org-remark-type))))
+ org-remark-available-pens))
+ (new-pen
+ (if pen pen
+ (intern
+ ;; To guard against minibuffer quit error when
+ ;; the user quit without selecting any pen.
+ (unwind-protect
+ (completing-read "Which pen?:"
+ available-pens))))))
+ (org-remark-highlight-clear ov)
+ (funcall new-pen beg end id :change))
+ ;; if ov or any other variables are not found
+ (message "No highlight here.")))
(defun org-remark-remove (point &optional delete)
"Remove the highlight at POINT.
- [elpa] externals/org-remark d5a3fcf612 17/75: refactor(create): quoting org-remark-type value, (continued)
- [elpa] externals/org-remark d5a3fcf612 17/75: refactor(create): quoting org-remark-type value, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark e77787ca5d 27/75: refactor:spacer, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 7a9c0454b2 74/75: fix: declare-function file location, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 1a6745acce 71/75: fix(line): change some customizing options from integer to natnum, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark bdd54cf237 57/75: Merge branch 'main' into dev/1.3.0, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark ceef4b537c 53/75: Merge branch 'main' into dev/line-highlight, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 32b8699b12 64/75: doc: docstring for `org-remark-notes-auto-delete`, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark ace9570070 52/75: refactor: simply org-remark-open, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 73766a03f0 69/75: docs: update NEWS, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 52cf20297b 67/75: feat: #72 org-remark-open can open the marginal notes file, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark ca648a1876 18/75: fix: change now can only select pens from the same type,
ELPA Syncer <=
- [elpa] externals/org-remark 2f7d16ef4e 31/75: refactor(line): remove unused functions, source comments, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark c7dc42bf30 28/75: fix: margin width, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 56557549ec 16/75: refactor: Create macro to add function-put, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 94ba0ecea0 21/75: fix(line): When source narrowed, existing line-hls move wrongly, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark e7aae5e4f4 25/75: doc: docstring for org-remark-highlight-mark-overlay, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark f28dc7e7f5 62/75: docs: update docstrings for remove and delete, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 18f39bf119 56/75: Merge branch 'main' into dev/1.3.0, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 4ad2be30e4 13/75: fix(icon): the line icon not displaying, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark e136189485 34/75: fix(line): window margin wrongly sets minibuffer's margin, ELPA Syncer, 2023/10/06
- [elpa] externals/org-remark 8f9875f714 24/75: doc(line): Remove unused source comments (old code), ELPA Syncer, 2023/10/06