summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2023-08-24 10:17:09 +0800
committerJSDurand <mmemmew@gmail.com>2023-08-24 10:17:09 +0800
commitd0096dfd0ba60f0bff96b8e37c1bc2d00475943b (patch)
tree802671c2460302cb952315c0791e8fc55cf7af13
parent7fbb663c91754a6454a9a7a8e47a3b2e4c39550a (diff)
account: erase buffer before inserting image
* account.el (account-agenda-export-to-svg): Previously I did not erase the buffer before displaying the image. This means if the image buffer was already used, the function would fail to insert the image again. Now this is fixed.
-rw-r--r--account.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/account.el b/account.el
index d21a2e8..00c6e61 100644
--- a/account.el
+++ b/account.el
@@ -856,8 +856,10 @@ the displayed information.")
result)
(with-current-buffer
(get-buffer-create svg-buffer-name)
- (svg-print svg)
- (image-mode))
+ (let ((inhibit-read-only t))
+ (erase-buffer)
+ (svg-print svg)
+ (image-mode)))
(display-buffer
svg-buffer-name
(list