[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark 1ce0a7dc31 061/173: add: org-marginalia-remo
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark 1ce0a7dc31 061/173: add: org-marginalia-remove can take C-u to delete |
Date: |
Fri, 28 Jan 2022 16:58:01 -0500 (EST) |
branch: externals/org-remark
commit 1ce0a7dc31a37b39c98efde709c1f0c2169367b5
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
add: org-marginalia-remove can take C-u to delete
---
org-marginalia.el | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/org-marginalia.el b/org-marginalia.el
index a0df8b4e2e..4d80d4653b 100644
--- a/org-marginalia.el
+++ b/org-marginalia.el
@@ -370,15 +370,22 @@ Load is automatically done when you activate the minor
mode."
(org-marginalia-mark beg end id))))))
;;;###autoload
-(defun org-marginalia-remove (point)
+(defun org-marginalia-remove (point &optional arg)
"Remove the highlight at POINT.
It will remove the highlight, and remove the properties from the
-marginalia, but will keep the headline and notes."
- (interactive "d")
+marginalia, but will keep the headline and notes.
+
+You can pass a universal argument with
+\\[universal-argument] (ARG). If this is the case, the command
+additionally deletes the entire heading subtree, along with the
+notes you have written, for the highlight."
+ (interactive "d\nP")
(when-let* ((id (get-char-property point 'org-marginalia-id))
(mks (cdr (assoc id org-marginalia-highlights))))
;; Remove the highlight text prop and id
- (remove-list-of-text-properties (marker-position (car mks))
(marker-position (cdr mks)) '(org-marginalia-id font-lock-face))
+ (remove-list-of-text-properties (marker-position (car mks))
+ (marker-position (cdr mks))
+ '(org-marginalia-id font-lock-face))
;; Remove the element in the variable org-marginalia-highlights
(setq org-marginalia-highlights (assoc-delete-all id
org-marginalia-highlights))
(org-marginalia-sort-highlights-list)
@@ -387,9 +394,14 @@ marginalia, but will keep the headline and notes."
(org-with-wide-buffer
(when-let ((id-headline (org-find-property org-marginalia-prop-id id)))
(goto-char id-headline)
+ (org-narrow-to-subtree)
(org-delete-property org-marginalia-prop-id)
(org-delete-property org-marginalia-prop-source-beg)
- (org-delete-property org-marginalia-prop-source-end))))
+ (org-delete-property org-marginalia-prop-source-end)
+ (when arg
+ ;; TODO I would love to add the y-n prompt if there is any notes
written
+ (delete-region (point-min)(point-max))
+ (message "Deleted the marginal notes.")))))
t))
(defun org-marginalia-next ()
- [elpa] externals/org-remark bc051adab9 022/173: doc: Add some clarification to readme, etc., (continued)
- [elpa] externals/org-remark bc051adab9 022/173: doc: Add some clarification to readme, etc., ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 1878b9ddce 029/173: fix: Error narrowed source for range, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 310b79efc5 033/173: doc: Add a limitatino of moving files, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 6bfac5368e 036/173: intrnl: Add eval org-marginalia-mode to file var, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 067681278f 038/173: fix: next/prev was reversed, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark b595c74a06 045/173: doc: Update docstring for the sort fn, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 9e2341a51f 049/173: [doc] fix code example, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 1ac1f2555b 050/173: Update README.org, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark e6bf242649 058/173: fix: Add highlighter face def for termianl, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 0dd01e91ec 060/173: fix: org-id-uuid is not found, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 1ce0a7dc31 061/173: add: org-marginalia-remove can take C-u to delete,
ELPA Syncer <=
- [elpa] externals/org-remark e4927186ef 063/173: feat: global auto-tracking, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark b62c6b3de4 072/173: readme, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 6b0bbad4b3 070/173: feat: link with org-id (WIP), ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark a9acfcd106 077/173: doc: README for 0.0.6, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 57bd3ab847 078/173: add: tracking-save to local kill-buffer-hook, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark c1adffe077 082/173: docs: 0.0.6 docs, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 60cbbc4e99 083/173: Merge dev/0.0.6-revise, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 2d11de2ec2 085/173: docs: README, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 3037be5ebc 087/173: docs: update README with global-tracking-mode, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark b988d580d8 090/173: add: Create pen to have different colors, ELPA Syncer, 2022/01/28