From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.help Subject: TERM and shell mode Date: Thu, 2 Mar 2023 17:18:29 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31292"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 03 01:19:12 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 1pXt8g-0007rg-P5 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 03 Mar 2023 01:19:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXt89-00083F-2d; Thu, 02 Mar 2023 19:18:37 -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 1pXt87-00082a-Cp for help-gnu-emacs@gnu.org; Thu, 02 Mar 2023 19:18:35 -0500 Original-Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXt85-0006Dt-Jt for help-gnu-emacs@gnu.org; Thu, 02 Mar 2023 19:18:35 -0500 Original-Received: by mail-lj1-x232.google.com with SMTP id b10so792831ljr.0 for ; Thu, 02 Mar 2023 16:18:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677802710; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=yXLDDPWJaU/hwewrQ0ZVArgzsn/cDfwOtEWtqKyYz9w=; b=MuntmxJAnO9PwkO8kqQAS3q3fdPVFn0V0WHJZp4T89BJ9omTLns5cx0Tb3hhblzK7F ij5ED1+IVV9uBro9nwcVvpa7iTIiGSL0H78xpMwSC6ajwdGOvY8I53GaCKYPRTZ5EvDN C5HktDqQYqcnmseeVNDqSO/N7wzDPFK+kydT6/arRrA74vj1//V3FZbNu/EX6E9d98DX QrkszK+fd82t62UV8wEqN5tQOqKfXJpbVXpkJJsWDH9+SF/+RSVIlpB/unG07PcBEQwe ahthEDsM9nPPNILwdISk6raTPUwONx+BbiiW744nvI70wB63stye8ND0NTfCEtlcnO3M rqdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677802710; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=yXLDDPWJaU/hwewrQ0ZVArgzsn/cDfwOtEWtqKyYz9w=; b=jFZE0Hv+wfFQ6Hf7wQ8INVP8pGeHzpO/IL1qDhtgjWs2CtKDEiu4OnV0fOE81aQ962 pRLHBk1FgrCDU42uJoWLwC/8QR4CAjINgkdA3OHFKlMqByFCDSrQiv2DAM5wI9RwBvF8 q6sPPHKvmH442eWW0j8XDQ6t1jSN93ssexMEpda4edXuDNNAv5eiT+JkTTjrYCuLfFsr QBupjyTVQj3C+Jg2tOibEzIzqt9evkGd3pj7qNfMb5MH+u6+l+LXfhILuKuqOqkFce7u 09PcOzzDqDeMTSdPNh4uRvamNET3VnHKlNUJjWdldkIdyQe1skmyAyp/MRuLB7MSRNrj 2F+g== X-Gm-Message-State: AO0yUKUozye/HANsgC1zBiepSIWjKjhZdcLJ9DtLUdEM9NqbIm6T3xK3 vVHwkDKR98Wh4so4agoctoNwEwaVBABaYSYqPV0zrvin2PF23g== X-Google-Smtp-Source: AK7set8wwwiVpN1S6YwpvAFNM9zHqZeeEICTDVEFFUOe3UoOttGxVyjLDUyXtDxFwkpvkUiNChzf77CwlaMjVG6zcGY= X-Received: by 2002:a05:651c:1593:b0:293:27a9:ef34 with SMTP id h19-20020a05651c159300b0029327a9ef34mr1738899ljq.0.1677802710401; Thu, 02 Mar 2023 16:18:30 -0800 (PST) Original-Received: by 2002:aa6:ca07:0:b0:24f:57d9:a46d with HTTP; Thu, 2 Mar 2023 16:18:29 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=samologist@gmail.com; helo=mail-lj1-x232.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:142900 Archived-At: 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=dumb. 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. 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. example. thisis probably bad code but it helps with grep TERM=xterm \ LC_ALL=C grep -i --color=auto --devices=skip --directories=skip "$@" -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com