Tags: patch The below patch adds an option that has a *shell* buffer automatically killed when a shell process terminates. I find this useful, because it helps to avoid re-activating old shell buffers in the wrong `default-directory'. Eshell has a "similar" behaviour (setting aside that it doesn't have an inferior process), but term doesn't. If this patch is merged, perhaps something similar for term could be done too?` In GNU Emacs 29.0.50 (build 12, x86_64-pc-linux-gnu, GTK+ Version 2.24.33, cairo version 1.16.0) of 2022-05-11 built on icterid Repository revision: 474241f356c638bfd8d4eecb7138e3af76a8c036 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --with-tree-sitter'