[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/shell-command+ 2e160f1 2/4: Kill *Shell Command Output*
From: |
ELPA Syncer |
Subject: |
[elpa] externals/shell-command+ 2e160f1 2/4: Kill *Shell Command Output* before running new commands |
Date: |
Fri, 15 Oct 2021 09:57:36 -0400 (EDT) |
branch: externals/shell-command+
commit 2e160f1979e28efde162df41a04b2a3cc5c6e4f3
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Kill *Shell Command Output* before running new commands
---
shell-command+.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/shell-command+.el b/shell-command+.el
index 5cd95e1..25d7fc8 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -345,6 +345,9 @@ between BEG and END. Otherwise the whole buffer is
processed."
(if (use-region-p) (region-end) (point-max))))
(pcase-let* ((`(,path ,mode ,command ,rest) (shell-command+-parse command))
(default-directory (shell-command+-expand-path (or path "."))))
+ ;; Make sure the previous output buffer was killed, to prevent
+ ;; TRAMP paths from persisting between commands.
+ (kill-buffer shell-command-buffer-name)
(cond ((eq mode 'input)
(delete-region beg end)
(shell-command rest t shell-command-default-error-buffer)