From d0096dfd0ba60f0bff96b8e37c1bc2d00475943b Mon Sep 17 00:00:00 2001 From: JSDurand Date: Thu, 24 Aug 2023 10:17:09 +0800 Subject: 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. --- account.el | 6 ++++-- 1 file 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 -- cgit v1.2.3-18-g5258