emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-remark 1878b9ddce 029/173: fix: Error narrowed sour


From: ELPA Syncer
Subject: [elpa] externals/org-remark 1878b9ddce 029/173: fix: Error narrowed source for range
Date: Fri, 28 Jan 2022 16:57:56 -0500 (EST)

branch: externals/org-remark
commit 1878b9ddce339f1a1d270ef70d66ca7e336eb919
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>

    fix: Error narrowed source for range
    
    Error when the source file is narrowed, and has a marker in the invisible
    part. Calling (buffer-substring-no-properties beg end) because the range was
    out of range. Fixes by widening with `org-with-wide-buffer` -- as it is a
    macro that uses only built-in function, it should work with non-Org source
    files.
---
 org-marginalia.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/org-marginalia.el b/org-marginalia.el
index e9aa8b4b48..745c0c6ceb 100644
--- a/org-marginalia.el
+++ b/org-marginalia.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota <me@nobiot.com>
 ;; URL: https://github.com/nobiot/org-marginalia
 ;; Version: 0.0.3
-;; Last modified: 2020-12-23T181303
+;; Last modified: 2020-12-24T140044
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, writing, note-taking, margin-notes
 
@@ -421,7 +421,8 @@ creat a new headline at the end of the buffer."
   (let* ((pos (cdr highlight))
          (beg (marker-position (car pos)))
          (end (marker-position (cdr pos)))
-         (text (buffer-substring-no-properties beg end)))
+         ;;`org-with-wide-buffer is a macro that should work for non-Org file'
+         (text (org-with-wide-buffer (buffer-substring-no-properties beg 
end))))
     ;; TODO Want to add a check if save is applicable here.
     (with-current-buffer (find-file-noselect om/notes-file-path)
       (org-with-wide-buffer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]