[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark 2ae9516091 40/67: fix(highlights-get): exist
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark 2ae9516091 40/67: fix(highlights-get): existence check beg and end |
Date: |
Sat, 22 Jul 2023 06:59:03 -0400 (EDT) |
branch: externals/org-remark
commit 2ae951609159cfcd1431a7651fc6aa2e434bae63
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
fix(highlights-get): existence check beg and end
beg and end must exist. If either is nil, `number-to-string` errors and
load stops prematurely. This can happen when the user manually manages
the notes file and accidentally deletes the beg/end props.
---
NEWS | 6 ++++++
org-remark.el | 14 ++++++++------
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/NEWS b/NEWS
index c63482bdf5..1fce3c7486 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,12 @@ Current development version
- feat: adjust positions after load
- feat: org-remark-highlights-after-load-hook
+ - fix: highlights-get existence check beg and end
+
+ beg and end must exist. If either is nil, `number-to-string`
+ errors and load stops prematurely. This can happen when the
+ user manually manages the notes file and accidentally deletes
+ the beg/end props.
Version 1.1.0
diff --git a/org-remark.el b/org-remark.el
index 5e3b8e2ca0..b8423b3819 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -1352,14 +1352,16 @@ highlight is a property list in the following
properties:
;; `org-remark-notes-headline-functions'
(while (not (org-next-visible-heading 1))
(let ((id (org-entry-get (point) org-remark-prop-id))
- (beg (string-to-number
- (org-entry-get (point)
- org-remark-prop-source-beg)))
- (end (string-to-number
- (org-entry-get (point)
- org-remark-prop-source-end)))
+ (beg (org-entry-get (point)
+ org-remark-prop-source-beg))
+ (end (org-entry-get (point)
+ org-remark-prop-source-end))
(body (org-remark-notes-get-body)))
+ ;; beg and end must exist. If either is nil
+ ;; `string-to-number' errors
(when (and id beg end)
+ (setq beg (string-to-number beg))
+ (setq end (string-to-number end))
(push (list :id id
:location (cons beg end)
:label (org-entry-get (point)
"org-remark-label")
- [elpa] externals/org-remark 3f71f58603 05/67: feat: dynamic notes headline level - WIP with test code, (continued)
- [elpa] externals/org-remark 3f71f58603 05/67: feat: dynamic notes headline level - WIP with test code, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark b2d2d432dd 06/67: feat(save): per-mode options for -notes-create-entry-functions WIP, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 8e067b1813 11/67: refactor(save): -highlight-save -> -highlight-add, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 3c25682d1d 14/67: fix: typo in regression issue, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 97c5f1c8e0 15/67: fix: missing defvar org-remark-source-find-file-name-functions, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark ba8e3433e0 18/67: feat: test/find-nov-file-buffer, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 9f95c8a6f9 22/67: refactor: adjust-positions and sync, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 7bf6359fae 23/67: refactor: remove org-remark-notes-update-source, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 5bd790cf3c 27/67: docs: docstring, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 5ea75070bc 29/67: refactor: move highlights-after-load-hook to org-remark.el, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 2ae9516091 40/67: fix(highlights-get): existence check beg and end,
ELPA Syncer <=
- [elpa] externals/org-remark 612629c366 51/67: docs: NEWS and README, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark e8e0693268 07/67: fix(save): source-setup-done needs to be done in source, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark b35fcfdbe4 16/67: feat: adjust positions after load via new hook, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 32860de66b 24/67: fix: typo in the previous refactor, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark f2a1e9f339 32/67: fix(eww) adjust the arg of fn link-to-source, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark fa81cc764a 36/67: feat(adjust-positions): Add an icon indicating the position adjusted, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 5a0299bdf7 39/67: refactor: (WIP) highlight-new-headline-maybe, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark eb9741e51f 44/67: refactor: highlights-add-icons, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark ae220ad29b 50/67: refactor(icon): change default to ascii characters only, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 112bbfa9ba 53/67: docs: Update user manual with new features, etc., ELPA Syncer, 2023/07/22