From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.help Subject: Re: TERM and shell mode Date: Fri, 03 Mar 2023 11:05:18 +0600 Message-ID: <87h6v2fmr5.fsf@disroot.org> References: 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="29180"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Samuel Wales Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 03 14:35:32 2023 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 1pY5ZM-0007Jn-6j for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 03 Mar 2023 14:35:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pY5Yt-00034e-Ug; Fri, 03 Mar 2023 08:35:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY5Ys-00034C-Hw for help-gnu-emacs@gnu.org; Fri, 03 Mar 2023 08:35:02 -0500 Original-Received: from knopi.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY5Yq-0007CV-GV for help-gnu-emacs@gnu.org; Fri, 03 Mar 2023 08:35:02 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id AF8AC445E6; Fri, 3 Mar 2023 14:34:56 +0100 (CET) X-Virus-Scanned: SPAM Filter 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 gTCLyNU7HrNk; Fri, 3 Mar 2023 14:34:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1677850495; bh=Lk6kNytEequuJ0T5uqe8nI2nQJUYnZjELHVLCaLhso0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=bxCQIBZktadNsi5T/ZJD9sPWLoYmgITkDlryXaarLuENaOVoWPCOujG8gk7nHaLh+ LNc4PjIdmX9QFx7ZRmKGxes3xqg3v73b7rn3bn7z0VCLU3pMzEERVmBRZnTkiNE8Cz A/g8O9jj4pfQPtvupy9cHiwc1BMbb4Sm41w6v/S/EXjLY5LqMkD0/Zc9t1fAdl7xAn JiG+tSGN2C9QUk9bwt63R771E78YnzDtgI/GhhWP/GWUyQxlbqcfn3PDLUCVKbf77G LgWvJCCFZoGwe/gjHJ0H5tMJSeDbK375ebeCPac8VtDysfwUuPY9A9RzLlb6ze7A8O nC7lrRu0gy6/A== In-Reply-To: (Samuel Wales's message of "Thu, 2 Mar 2023 17:18:29 -0700") Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142906 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Samuel Wales writes: > ok, so this is going to be a really dumb question that i should have > figured out over the years. and ... i sorta kinda but not really did > but i have too many notes and can't fiure them out. > > and even legacy shell stuff from xemacs days and such. > > emacs -Q says dumb for TERM for shell mode. one issue with this i > have a note saying is that colored output can silently corrupt cmd | > grep if TERM=3Ddumb. or similr. idr the details. but i recall the > problem and debugged it to the TERM variable. > > termprarily setting term to xterm fixed that problem but i have no > idea where it is being set permanntly. > Setting TERM to xterm will fix the issue for some programs, but will create a big problem when you run Emacs or GNU Screen in Shell mode. By the way, you can use Coterm to enable full terminal emulation in Shell mode. > i can't actually figure out where in my shell code or elsewhere the > following occurs: TERM gets set to xterm. it works well or seems to > but it might be WRONG on the internet. and root vs. user and linux vt > console might require special casing. > > -Q says supposed to be dumb, except i also recall emacs as a terminal > type. dunno where that came from. > > literally i have no shell code that sets the var althuogh it is used > as a prefix to grep and such. of course i am not asking you to intuit > where the variable is being set but you might have interesting > comments about TERM. It's probably your init file that's responsible. What does the user option (variable) 'comint-terminfo-terminal' contain? > > example. thisis probably bad code but it helps with grep > > TERM=3Dxterm \ > LC_ALL=3DC grep -i --color=3Dauto --devices=3Dskip --directories= =3Dskip "$@" =2D-=20 Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5 Fediverse: akib@hostux.social Codeberg: akib emailselfdefense.fsf.org | "Nothing can be secure without encryption." --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmQBgA8ACgkQVTX89U2I YWs1dg/9GfXVnnay4Q1rUKs1HG+AgyDE8aBtAZb8TufROq5KsSbYsY2NWk6jYxgw WDHx7I6owLSpD3oU02mHAv2IDPI257iMlCRkYgBNyqSkY9V7gpL80hus9D3AbU0j fxd7iCygwoGmum1CGTj9rdz+YXiIuocbMDplkb60SsVaByUG2MSjnUHn6pDR49X9 xvb0Qkv7gt4My9e+yWNzQYLPh70lqlebLUI3BaBbIYCrfX0ccBrBIuaPjg8BO1Ej 7ifzr0ZzhAOiN0ni4NJWZ2RfXYFtjidFs7P1xLOzsKl9eCk47mBVqCyj4kZ7H1eD unksWU/pBYmX3XoNU+lS6+QL+NoHYO0dopXqzEADN6wrBnDa4Io+hktgqvZHCIKu bbD/Wrkz7KYE8eR/iwjyL2wIK0RPa4Y0EoOBLgHq17GAqiBnA9DbsVjmd4Twq+ZK ev69pGJ/qyxRlD32d6X4Lh6FEbHrg0o9jmrDCJjz776o5EAdb3Sr9pd7ThMnGrJF mZN974doUDTjW9kfBR58GTszc8UUdJNDFZ8OBI584mJM7iBnSWX9nuuw/WLVFEUA lhirFGx/jEO1akmrWbAvXpqBNmCn31xYGyoTHm1c2f6Zb2uPKIN9FbIxDaAKcDnG b/VBfcm9KdMwwYmerl6U4t+j2zL2CgIpX/e1UaAdEjqUZVHC3o8= =jtDk -----END PGP SIGNATURE----- --=-=-=--