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

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

[nongnu] elpa/hyperdrive 6874248ed5 16/26: Fix: (hyperdrive-write-buffer


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 6874248ed5 16/26: Fix: (hyperdrive-write-buffer) Clean up encoded buffer
Date: Fri, 30 Aug 2024 16:00:11 -0400 (EDT)

branch: elpa/hyperdrive
commit 6874248ed5594713691e9fd59b0e9cbc0757eb9f
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Fix: (hyperdrive-write-buffer) Clean up encoded buffer
    
    Suggested-by: Adam Porter <adam@alphapapa.net>
---
 hyperdrive.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index 7ea7f0a3bf..a573b30bb3 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -566,9 +566,13 @@ For non-interactive use, see `hyperdrive-write'."
                   ;; and lets us avoid making another request for
                   ;; metadata.
                   (set-visited-file-modtime (current-time))))
-              (h/message "Wrote: %S to \"%s\"" name url))
+              (h/message "Wrote: %S to \"%s\"" name url)
+              (when (buffer-live-p encoded-buffer)
+                (kill-buffer encoded-buffer)))
       :else (lambda (plz-error)
-              (h/message "Unable to write: %S: %S" name plz-error)))
+              (h/message "Unable to write: %S: %S" name plz-error)
+              (when (buffer-live-p encoded-buffer)
+                (kill-buffer encoded-buffer))))
     (h/message "Saving to \"%s\"..." url)
     ;; TODO: Reload relevant hyperdrive-dir buffers after writing buffer (if 
ewoc buffers display version, then possibly all ewoc buffers for a given 
hyperdrive should be reloaded)
     ))



reply via email to

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