[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark 07f5838c40 61/67: fix: Add headlines in the
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark 07f5838c40 61/67: fix: Add headlines in the correct order and in the correct headline |
Date: |
Sat, 22 Jul 2023 06:59:04 -0400 (EDT) |
branch: externals/org-remark
commit 07f5838c40f10b0eb7d073b5fe79a0ebb1f477f8
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
fix: Add headlines in the correct order and in the correct headline
This was missed in the refctoring for nov.el. It was not easy to detect
when one single notes file is created for a single source (e.g. a signle
EPUB book).
The problem was in the new logic to find and add new headlines. For each
headline, the point needs to move to inside the current headline;
otherwise, the narrowing and `point-max` would not work for the intended
headline, thus creating a new highlight headline in the wrong parent
node.
This fix adds the `goto-char` to move to the correct point in the
current headline intended to be narrowed to.
---
org-remark.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/org-remark.el b/org-remark.el
index 437144a7c1..e9f596094d 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
;; URL: https://github.com/nobiot/org-remark
;; Version: 1.1.0
;; Created: 22 December 2020
-;; Last modified: 15 July 2023
+;; Last modified: 16 July 2023
;; Package-Requires: ((emacs "27.1") (org "9.4"))
;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
@@ -918,12 +918,13 @@ buffer for automatic sync."
for (filename-fn title-fn prop-to-find) in
headline-constructors
;; This variable "point" is set in order to be returned at
;; the end of the loop.
- with point = nil
+ with point = 1
do (let (filename title)
(with-current-buffer source-buf
(setq filename (funcall filename-fn))
(setq title (funcall title-fn)))
(with-current-buffer notes-buf
+ (goto-char point)
(setq point
(or (org-find-property
prop-to-find filename)
@@ -955,6 +956,7 @@ title. PROPS is the alist of properties to be added to the
headline.
Return the point of begining of current heading."
;; If file-headline does not exist, create one at the bottom
+ (goto-char (point-max))
(org-narrow-to-subtree)
(goto-char (point-max))
;; Ensure to be in the beginning of line to add a new headline
- [elpa] externals/org-remark 58feed0c04 54/67: style: lint with flymake, (continued)
- [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
- [elpa] externals/org-remark 81bc062482 10/67: refactor(nov): highlight-save-book-entry, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark eed28d7b8d 26/67: Merge branch 'main' into dev/nov.el, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark e5de684b67 33/67: fix: adjust location of highlight, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 5b76fa930a 49/67: refactor(load): make load process robust., ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark b50d0f7688 52/67: refactor: rename highlights-after-load-hook to -functions, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 07f5838c40 61/67: fix: Add headlines in the correct order and in the correct headline,
ELPA Syncer <=
- [elpa] externals/org-remark 6ebbce9239 37/67: fix(load): clear obsolete highlight overlays before loading, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 0ec9d2f1c2 41/67: refactor(headline-add): WIP, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 1c2f9ed822 46/67: feat: toggle icons, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 36df818752 55/67: docs: Update user manaul, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 642d4b489f 13/67: docs: updated NEWS, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 2a10b3d75a 17/67: refactor: adjust-positions, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 09d95e7519 20/67: Merge branch 'main' into dev/nov.el, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 52bc575bb9 28/67: docs: comments and docstring, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark e10a00b426 35/67: feat: add icon for highlights with annotation body text #64, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 41f90c53a8 59/67: refactor: Add 'org-remark-string=' for highlight-adjust-positions, ELPA Syncer, 2023/07/22