[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark d58e8f256c 012/173: break: Change om/save-al
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark d58e8f256c 012/173: break: Change om/save-all to om/save |
Date: |
Fri, 28 Jan 2022 16:57:54 -0500 (EST) |
branch: externals/org-remark
commit d58e8f256c86e57de6859028f2c731770c60f835
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
break: Change om/save-all to om/save
---
README.org | 6 +++---
org-marginalia.el | 21 +++++++++++----------
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/README.org b/README.org
index c87e0d150a..1e8e724b36 100644
--- a/README.org
+++ b/README.org
@@ -64,13 +64,13 @@ For example, I use this in my init file. Org-marginalia is
a local minor mode. A
:END:
- =org-marginalia-mode= ::
-Org-marginalia is a local minor mode. Toggle it on/off with using
=org-marginalia-mode=. On activating, it loads your saved highlights from the
marginalia file, and enables automatic saving of highlights. The automatic
saving is achieved via function =om/save-all= added to =after-save-hook=.
+Org-marginalia is a local minor mode. Toggle it on/off with using
=org-marginalia-mode=. On activating, it loads your saved highlights from the
marginalia file, and enables automatic saving of highlights. The automatic
saving is achieved via function =om/save= added to =after-save-hook=.
- =om/mark= (=C-c m= by default) ::
Select a region of text, and call =om/mark= to highlight the region. It will
generate a new ID, and start tracking the location -- so you can edit text
around the marked text. Do not copy and paste as it will disappear and it is a
bit tricky to recover the highlights. To create a new margin note entry in the
marginalia file, save the buffer.
-- =om/save-all= ::
-By default, Org-marginalia creates or updates the highlight's location and
text inside automatically in the marginalia file. You can manually call
=om/save-all= to manually do it (automatic process also call this command).
+- =om/save= ::
+By default, Org-marginalia automatically creates or updates corresponding
entries in the marginalia file with location and text of highlights on saving
the buffer. Nevertheless, you can manually call =om/save= to do so (automatic
process also call this command).
- =om/open-at-point= (=C-c n o= by default) ::
Move your cursor on the highlighted text, and call =om/open-at-point= to open
the relevant margin notes in a separate window. Your cursor should move to the
marginalia buffer narrowed to the relevant margin notes entry. You can edit the
margin notes as a normal Org file. Once you have done editing, you can simply
save and close the buffer (kill or close the window) as per your normal
workflow. Technically, the marginalia buffer is a cloned indirect buffer of the
marginalia file.
diff --git a/org-marginalia.el b/org-marginalia.el
index d1f8b3ab68..4ccbf5f0a2 100644
--- a/org-marginalia.el
+++ b/org-marginalia.el
@@ -50,7 +50,7 @@
;; - =org-marginalia-mode= :: Org-marginalia is a local minor mode. Toggle it
;; on/off with using =org-marginalia-mode=. On activating, it loads your saved
;; highlighters from the marginalia file, and enables automatic saving of
-;; highlighters. The automatic saving is achieved via function =om/save-all=
+;; highlighters. The automatic saving is achieved via function =om/save=
;; added to =after-save-hook=.
;; - =om/mark= :: Select a region of text, and call =om/mark= (bound to =C-c n
@@ -60,9 +60,9 @@
;; recover the highlighter. To create a new margin note entry in the
;; marginalia file, save the buffer.
-;; - =om/save-all= :: By default, Org-marginalia creates or updates the
+;; - =om/save= :: By default, Org-marginalia creates or updates the
;; highlighter's location and text inside automatically in the marginalia
-;; file. You can manually call =om/save-all= to manually do it (automatic
+;; file. You can manually call =om/save= to manually do it (automatic
;; process also call this command).
;; - =om/open-at-point= :: Move your cursor on the highlighted text, and call
@@ -184,7 +184,7 @@ It is meant to exist only one of these in each Emacs
session.")
(defun om/mark (beg end &optional id)
"Highlight the selected region (BEG and END) when used interactively.
It will generate a new ID, and start tracking the location, but
-will not create a marginalia entry yet. Call `om/save-all' to
+will not create a marginalia entry yet. Call `om/save' to
create a new entry (it is automatic with `after-save-hook').
When this function is called from Elisp, ID can be optionally
@@ -211,7 +211,7 @@ beginning point; this should be useful when `om/next' and
(om/sort-highlights-list))
;;;###autoload
-(defun om/save-all ()
+(defun om/save ()
"Save all the highlights tracked in current buffer to marginalia file.
The marginalia file is defined in `om/notes-file-path' variable.
@@ -228,7 +228,8 @@ current buffer. Each highlight is represented by this data
structure:
(source-path (abbreviate-file-name filename))
(title (or (car (cdr (assoc "TITLE" (org-collect-keywords
'("TITLE")))))
(file-name-sans-extension (file-name-nondirectory
(buffer-file-name))))))
- (dolist (highlight om/highlights) (om/save highlight title source-path))))
+ (dolist (highlight om/highlights)
+ (om/save-single-highlight highlight title source-path))))
;;;###autoload
(defun om/open-at-point (point)
@@ -338,7 +339,7 @@ text file in Org Mode.
It loads your saved highlighters from the marginalia file, and
enables automatic saving of highlighters.
-The automatic saving is achieved via function `om/save-all' added
+The automatic saving is achieved via function `om/save' added
to `after-save-hook'.
Interactively with no argument, this command toggles the mode. A
@@ -356,16 +357,16 @@ the mode, `toggle' toggles the state."
(org-marginalia-mode
;; Activate
(om/load)
- (add-hook 'after-save-hook #'om/save-all nil t))
+ (add-hook 'after-save-hook #'om/save nil t))
(t
;; Deactivate
- (remove-hook 'after-save-hook #'om/save-all t))))
+ (remove-hook 'after-save-hook #'om/save t))))
;;;; Functions
;;;;; Private
-(defun om/save (highlight title source-path)
+(defun om/save-single-highlight (highlight title source-path)
"Save a single HIGHLIGHT in the marginalia file with properties.
The marginalia file is specified by SOURCE-PATH. If headline with
the same ID already exists, update it based on the new highlight
- [elpa] externals/org-remark 1abcfe0881 005/173: doc: Add license badge and link to LICENSE, (continued)
- [elpa] externals/org-remark 1abcfe0881 005/173: doc: Add license badge and link to LICENSE, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 211c2ccb05 013/173: break: Change om/open-at-point to om/open, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 4e694b8562 010/173: doc: Fix doc string, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark ec76d6e82f 006/173: doc: Fix the badge display, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark bb321f57f5 001/173: Initial commit for GH, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 794d9e5169 008/173: doc: Fix the badge display, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 6038ab7c30 009/173: fix: align highlight and position, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark f5905ac735 004/173: admin: Add LICENSE, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 1d496daeb7 014/173: internal: Move minor mode to the top, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark e96941d8c2 002/173: doc: minor spelling correction, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark d58e8f256c 012/173: break: Change om/save-all to om/save,
ELPA Syncer <=
- [elpa] externals/org-remark 3d6207ae20 011/173: doc: Update doc, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 22d7d373bc 003/173: doc: Replace wrong images; minior spelling fix, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 8762fdad61 024/173: fix: defface for highlighter, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 5511d32062 026/173: doc: Add title image, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 13f36d7241 020/173: internal: Fix the macro expansion, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 66da9a3fb9 028/173: doc: Update title image; add its source files, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark de889ea114 030/173: doc: marginalia.org for the program, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 6aa087a6d0 034/173: doc: Add a limitatino of moving files, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark ca86e1156c 041/173: fix: om/list-highlights-positions, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 460eab8db0 046/173: doc: Update README (marginalia), ELPA Syncer, 2022/01/28