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

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

[elpa] externals/hyperbole 9ebcba0229 2/2: Ensure outline root 0 cell fi


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 9ebcba0229 2/2: Ensure outline root 0 cell file attribute is updated when reading in
Date: Thu, 20 Jan 2022 04:57:33 -0500 (EST)

branch: externals/hyperbole
commit 9ebcba0229fc6e4301e3d8c862569610f9fbbc2b
Author: Robert Weiner <rsw@gnu.org>
Commit: Robert Weiner <rsw@gnu.org>

    Ensure outline root 0 cell file attribute is updated when reading in
---
 ChangeLog     | 5 +++++
 kotl/kview.el | 7 +++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0ef802019e..6e2d47cd2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-01-20  Bob Weiner  <rsw@gnu.org>
+
+* kotl/kview.el (kview:create): Ensure top-level 0 cell file attribute is 
always updated
+    to match current file location.
+
 2022-01-19  Bob Weiner  <rsw@gnu.org>
 
 * kotl/kotl-mode.el (kotl-mode:set-cell-attribute, 
kotl-mode:remove-cell-attribute):
diff --git a/kotl/kview.el b/kotl/kview.el
index 86ffcda6ea..ed0741a9f3 100644
--- a/kotl/kview.el
+++ b/kotl/kview.el
@@ -619,8 +619,11 @@ BLANK-LINES, LEVELS-TO-SHOW, and LINES-TO-SHOW may also be 
given, otherwise defa
     ;; Don't recreate view if it exists.
     (unless (and (boundp 'kview) (kview:is-p kview) (eq (kview:buffer kview) 
buf))
       (make-local-variable 'kview)
-      (unless top-cell-attributes
-       (setq top-cell-attributes (list 'file buffer-file-name 'id-counter 
id-counter)))
+      ;; File location may have changed since saved, so always inject the
+      ;; current file name here and update cell count id-counter.
+      (setq top-cell-attributes
+           (plist-put (plist-put top-cell-attributes 'id-counter id-counter)
+                      'file buffer-file-name))
       (setq kview
            (list 'kview 'plist
                  (list 'view-buffer (current-buffer)



reply via email to

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