From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.bugs Subject: bug#20202: Considered Harmful 73d213: 'Comint, term, and compile new set Emacs' Date: Thu, 07 Apr 2016 20:55:02 +0100 Message-ID: <87egahtcrt.fsf@russet.org.uk> References: <87oa9otixb.fsf@russet.org.uk> <5703E15B.7080601@cs.ucla.edu> <87k2kcovt8.fsf@russet.org.uk> <5704233B.4020103@cs.ucla.edu> <8737qzso88.fsf@russet.org.uk> <57045765.4000309@cs.ucla.edu> <87r3ei8vz9.fsf@russet.org.uk> <5705B246.10201@cs.ucla.edu> <5706764D.2010708@cs.ucla.edu> <282e74a937853505fddfea446c9bc46e.squirrel@cloud103.planethippo.com> <57067BF6.6000700@cs.ucla.edu> <4355cfa8cbbd947770537a9006732db0.squirrel@cloud103.planethippo.com> <57068A18.40207@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1460065904 17799 80.91.229.3 (7 Apr 2016 21:51:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Apr 2016 21:51:44 +0000 (UTC) Cc: 20202@debbugs.gnu.org, 20484@debbugs.gnu.org, monnier@iro.umontreal.ca To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 07 23:51:31 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aoHpm-0006yc-QH for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Apr 2016 23:51:27 +0200 Original-Received: from localhost ([::1]:52194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoHpm-0005Z5-8V for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Apr 2016 17:51:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoG2A-0004mp-K7 for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 15:56:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoG26-0000s1-Pw for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 15:56:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoG26-0000rx-IH for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 15:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1aoG26-0008FX-DW for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2016 15:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: phillip.lord@russet.org.uk (Phillip Lord) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Apr 2016 19:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20202 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20202-submit@debbugs.gnu.org id=B20202.146005891231656 (code B ref 20202); Thu, 07 Apr 2016 19:56:02 +0000 Original-Received: (at 20202) by debbugs.gnu.org; 7 Apr 2016 19:55:12 +0000 Original-Received: from localhost ([127.0.0.1]:53226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoG1I-0008ER-AC for submit@debbugs.gnu.org; Thu, 07 Apr 2016 15:55:12 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:47413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aoG1G-0008E6-Fz; Thu, 07 Apr 2016 15:55:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=hizR/H2ZnYYfSS9R9z0PemL84j1MbmmUKTY3CRT0nvM=; b=Sg7UqQLj4uuIck8yzfgbAALtwx U0L6UfcK627lZWwOmgRGr/s50lgtKj4v2oN0dU/WytyCfttjVPdFVa8bGOwWyoEWNnct84WYoZbkE jOl5oiUGfuarBSVklLtjy7MvRCrK1B9absSEddt3ca+nIjsbFn8hLySnUp0bz4aNzIvE6N2SUcM+q WOvr1eM98bgaOQDXhGtDflkFuHH/ugUGwHYV9B7C5WkYrj3mjPdeIQldgzWx0OSzDR2lHfpW5xmJu MtDsKH31Ol2OoAxr1FAphUCu7qerf2i2apKz0MZVfkTwEiv+nAXP3iTJnrMRnYyJai6KleHS78A+X I6ig/WuA==; Original-Received: from cpc1-benw10-2-0-cust373.gate.cable.virginm.net ([77.98.219.118]:59660 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1aoG19-0049Nd-Nn; Thu, 07 Apr 2016 20:55:03 +0100 In-Reply-To: <57068A18.40207@cs.ucla.edu> (Paul Eggert's message of "Thu, 7 Apr 2016 09:26:00 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116172 Archived-At: Paul Eggert writes: > On 04/07/2016 09:07 AM, Phillip Lord wrote: >> Well, I need to scope this. If the issue is tcsh and bash, then I will >> look at both. I cannot, of course, look at any arbitrary program which >> might be affected. > > I think we'd be OK if we work with the "common" shells. But that would include > zsh, whose current FAQ says the following: > > Probably the most reliable way of dealing with this is to look for > the environment variable `$EMACS', which is set to `t' in > Emacs' shell mode. Putting > > [[ $EMACS = t ]] && unsetopt zle > > in your .zshrc should be sufficient. > > So here it's not merely a matter of fixing zsh, it's also fixing all the > users' .zshrc files that are following this (obsolescent) advice. > > So far we've looked at three shells (bash, tcsh, zsh), and found compatibility > issues with all three. This is not a good sign. So, bash has a command line option to achieve the same thing as EMACS=t. I've checked tcsh and as far as I can tell, here, there is no clear solution. EMACS=t is used, and it's deep in the init code. In my hands, directory tracking in tcsh does not work in ansi-term either way. Zsh does not, AFAICT, use EMACS=t (it's hard to be sure searching through the code, since most instances of "emacs" refer to zsh's emulation of Emacs). In fact, though, as the FAQ entry you found shows, zsh actually does this... /* unset zle if using zsh under emacs */ if (!strcmp(term, "emacs")) opts[USEZLE] = 0; which, according to the faq is behaviour from < Emacs-19.29. So, zsh users already explicitly tell their zsh what to do. Possible solutions: 1) For bash, launch with -o emacs, or call set -o emacs after launch. 2) zsh, launch and call unsetopt zle. 3) For tcsh, EMACS=t only needs to be correct during init. So, EMACS=t, launch tcsh, set EMACS=what-ever-it-was-before. 4) Everything else -- move the "call-process" call to a single function which people can advice as they choose. Phil