From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Abhiseck Paira Newsgroups: gmane.emacs.help Subject: Re: Run multiple shells in Emacs. Date: Tue, 01 Jun 2021 08:53:12 +0530 Message-ID: <8735u2gten.fsf@disroot.org> References: <87pmx6cws0.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22622"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?=C3=93scar?= Fuentes , help-gnu-emacs@gnu.org To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 01 05:18:09 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lnuuv-0005du-GT for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Jun 2021 05:18:09 +0200 Original-Received: from localhost ([::1]:38168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnuuu-0001nx-G6 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 31 May 2021 23:18:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnuuP-0001kZ-ET for help-gnu-emacs@gnu.org; Mon, 31 May 2021 23:17:37 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:38002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnuuN-0002EU-Au for help-gnu-emacs@gnu.org; Mon, 31 May 2021 23:17:37 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id DE24453C13; Tue, 1 Jun 2021 05:17:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xj9z4uZcg9DV; Tue, 1 Jun 2021 05:17:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1622517450; bh=5W7jnKAtUA0UE4ZmFO7T+1+KCypocyWRu4ENoPyPWws=; h=References:From:To:Cc:Subject:In-reply-to:Date; b=M3U+MmYHKSrEySmCsEjg7iqKw9XfL9hItkHALUInXneSZh33zqEJbgJvXwsTtDTqr qVJo5kjO9/kymGcZiAxW434HU5Vl8mso1xTYcOGyx8O+ESqA3M0UEEUuadM4/jC5E2 XVAO0nEOMbd4pX8ke6LJK5nkkD9EuXhenlFe/SutYfS+2cqWGJ+9g54UBhvzPAik4M QL3jRV2f3hyWo5g6YSbwzvdnrdv0akFx6Xvnt2jIql6TCUELhI3jMIOPXtelTkrhQ9 HQBhAs64UjbtX5FaOKIvixse+Bo+r0jbSKZaengfuY9dUKmTW/B6WBfyscIW8tquuN BF5kdCKTM7L/w== In-reply-to: Received-SPF: pass client-ip=178.21.23.139; envelope-from=abhiseckpaira@disroot.org; helo=knopi.disroot.org X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_OTHER_BAD_TLD=1.997, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130429 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > I want to use Emacs as an advanced terminal multiplexer similar to > tmux. Now, I find the method described here: > . > Any hints/comments/suggestions will be highly appreciated. When I first started using Emacs, I wanted to recreate tmux+terminal workflow with Emacs. So I tried to use *shell* and found it inadequate because I tried to run TUI (not CLI) applications and it would complain that terminal wasn't fully operational. Also if I use *term* then I don't get to use the Emacs keybindings. Then I read this article[1] and it opened my eyes. [1] https://ambrevar.xyz/emacs-eshell/index.html I was thinking it wrong, why does terminal emulator and POSIX shell should go together? I should be able to use POSIX shell without using a terminal emulator. So the first thing I did was to remove all TUI applications. So I use Emacs packages and CLI programs. CLI programs can easily be used in *shell* (with Bash running) without any problem. The benefits are: 1. You can have as many buffers running shell as you want. "C-u M-x shell" will create as many shell buffers as you want. 2. You get to use Emacs keybindings and other Emacs perks everywhere in a buffer. (See shell manual for details). I also added this option in my init.el file: (setq shell-command-switch "-ic") This makes it possible to type "M-!" and "M-&" and run shell commands from anywhere in Emacs. Also in dired mode you can type ! and & to run shell commands with the file at point. So this is what I have done with my workflow, sometimes I go by weeks without needing to open a proper terminal emulator. I was even considering uninstalling it, but thought it may come in handy in emergency situations. =2D-=20 Abhisek Paira E34E 825B 979E EB9F 8505 F80E E93D 353B 7740 0709 "There is no system but GNU, and Linux is one of its kernels." --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE406CW5ee65+FBfgO6T01O3dABwkFAmC1qCUACgkQ6T01O3dA Bwmi4hAArT/MvqtrKnht/g4d8X0m53JnQVTvEOlrvx+ksGindW2Z7Jy3MXG0tKJ5 lX2ICTKFBTAN7xPt3eyXIP94yao+KVYc4PiRkH7HtUus9MLzsdyKcHFpFUmTyNEN aS0C965EzQvQg8ZjohUTnOJIKNnRX7U/nBcyOjApqOUJkAKegCehuS5KFD8AhmIf 7Xb8XUCBTqF1QgpZg2pAjnNVIeRCzuzj62JPwqx1tRH6ys4WuPcSwpTJymyy2FwB J9JF3lI5gN180eS9Yh/vUCMs4EpIwKd9UxTA/R8fc+0PtiZGJHP7lzobciPM7Dc6 cFUu980JqrHrQWt4hqoa00cFrpfB2Dyuxk2Ic+bHdEPEOPFqEBTX1j0WYGZgyLhS PEvx2Qeucg+/8mpa6nvdM11qOx9CR62ZNb2qBYGObsrPUqSCu+LL0azEwy3HaHqj oWV/dpcIRpa4WQbUOmub34svsH/mtBeyF/Iyv+iCX3rI7ysvSWpBgrQPQb9MOb8C ChgGl9LUdpAXctQIVgPnzl86X5UmFnHZ20iWMc4pTkprFJdY8nDV03mS4iIUAKmV uOUBEH9/5o+QwYBehBU5YRPioB/DwMXKWCc0bOz7o+eL0q3SaiACLp4cOIu9gsf0 MmtJyJiLq1IGFwnb7pCtY7DCtqmxEn1Bj/nEZcSUelJzXajY1QM= =+Mu2 -----END PGP SIGNATURE----- --=-=-=--