From 7cc736abfadf48e21386f68e28887dd2c72eb09e Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Thu, 11 Aug 2022 06:25:28 -0800 Subject: [PATCH] Function: `spawn-shell`. --- lisp/mitch-defuns.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/mitch-defuns.el b/lisp/mitch-defuns.el index 43291a7..6469df3 100644 --- a/lisp/mitch-defuns.el +++ b/lisp/mitch-defuns.el @@ -113,6 +113,12 @@ For instance: For use with `vterm'." (setq default-directory path)) +;; reference: https://stackoverflow.com/questions/4114577/how-do-i-define-an-emacs-lisp-function-to-spawn-a-shell-buffer-with-a-particular +(defun spawn-shell (name) + "Invoke shell test" + (interactive "MName of shell buffer to create: ") + (pop-to-buffer (get-buffer-create (generate-new-buffer-name name))) + (shell (current-buffer))) ;; This one line cost me over an hour of frustration... (provide 'mitch-defuns)