all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* always local shell?
@ 2022-04-24  0:36 Emanuel Berg via Users list for the GNU Emacs text editor
  2022-04-24  1:28 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 4+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-04-24  0:36 UTC (permalink / raw)
  To: help-gnu-emacs

(defun shell-local ()
  (interactive)
  (while (file-remote-p default-directory)
    (bury-buffer) )
  (shell) )
(defalias 'sh #'shell-local)

If not a single file is local, it'll be an endless loop!

But OTOH if you rely that exclusively on remote files ... why
ever would you like the shell to always be local?

Still ... one suspects one could do it better ...
stay tuned for the O(1) solution ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-24 19:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-24  0:36 always local shell? Emanuel Berg via Users list for the GNU Emacs text editor
2022-04-24  1:28 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-04-24 17:21   ` Thibaut Verron
2022-04-24 19:27     ` Emanuel Berg via Users list for the GNU Emacs text editor

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.