]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/automated/eshell.el (with-temp-eshell): Use a temp directory
authorGlenn Morris <rgm@gnu.org>
Fri, 13 Sep 2013 03:55:56 +0000 (20:55 -0700)
committerGlenn Morris <rgm@gnu.org>
Fri, 13 Sep 2013 03:55:56 +0000 (20:55 -0700)
for eshell-directory-name.

It seems we don't have permission to write to HOME on hydra.

test/ChangeLog
test/automated/eshell.el

index 0587373144a36ce0b53b6e96d4fa86442c5a8a92..de1676341e529497c5f16d2276539ec8ca0bd184 100644 (file)
@@ -1,3 +1,8 @@
+2013-09-13  Glenn Morris  <rgm@gnu.org>
+
+       * automated/eshell.el (with-temp-eshell):
+       Use a temp directory for eshell-directory-name.
+
 2013-09-12  Glenn Morris  <rgm@gnu.org>
 
        * automated/eshell.el (with-temp-eshell): Avoid hangs in batch mode
index a78c34e4f397a3d9afad27f2631ecebb8d3b2285..310e9b6dfde444be2c505a5594c2c14ed512cf9e 100644 (file)
 
 (defmacro with-temp-eshell (&rest body)
   "Evaluate BODY in a temporary Eshell buffer."
-  `(let ((eshell-buffer (eshell t)))
+  `(let* ((eshell-directory-name (make-temp-file "eshell" t))
+          (eshell-history-file-name nil)
+          (eshell-buffer (eshell t)))
      (unwind-protect
          (with-current-buffer eshell-buffer
            ,@body)
        (let (kill-buffer-query-functions)
-         (kill-buffer eshell-buffer)))))
+         (kill-buffer eshell-buffer)
+         (delete-directory eshell-directory-name t)))))
 
 (defun eshell-insert-command (text &optional func)
   "Insert a command at the end of the buffer."