unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).