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

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

[elpa] externals/org-remark 35b8cbfcfb 1/2: fix: "Wrong type argument: s


From: ELPA Syncer
Subject: [elpa] externals/org-remark 35b8cbfcfb 1/2: fix: "Wrong type argument: stringp, nil" on highlightintg in scratch
Date: Sat, 12 Mar 2022 03:57:39 -0500 (EST)

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

    fix: "Wrong type argument: stringp, nil" on highlightintg in scratch
    
    This is an error caused by the fact that the *scratch* buffer is not 
visiting a
    file.  This fix lets Org-remark identify non-file visitng buffer on
    `org-remark-mark` and output a more user-friendly message.
---
 org-remark.el | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 024fede07d..9d8c3bc915 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.0.3
 ;; Created: 22 December 2020
-;; Last modified: 28 February 2022
+;; Last modified: 12 March 2022
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, writing, note-taking, marginal-notes
 
@@ -691,10 +691,13 @@ to the database."
      ;; for mode, nil and :change result in saving the highlight.  :load
      ;; bypasses save.
      (unless (eq mode :load)
-       (org-remark-highlight-save (buffer-file-name)
-                                  beg end
-                                  (overlay-properties ov)
-                                  (org-remark-highlight-get-title)))))
+       (let ((filename (buffer-file-name)))
+         (if filename
+             (org-remark-highlight-save filename
+                                        beg end
+                                        (overlay-properties ov)
+                                        (org-remark-highlight-get-title))
+           (message "org-remark: Highlights not saved; buffer is not visiting 
a file"))))))
   (deactivate-mark)
   (org-remark-highlights-housekeep)
   (org-remark-highlights-sort))



reply via email to

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