From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mike Kupfer Newsgroups: gmane.emacs.devel Subject: Re: misbehavior in shell window with ksh Date: Mon, 01 May 2017 08:29:13 -0700 Message-ID: <18024.1493652553@alto> References: <87inlkzlkt.fsf@rosalinde> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: blaine.gmane.org 1493652621 16401 195.159.176.226 (1 May 2017 15:30:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 May 2017 15:30:21 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 01 17:30:12 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5DH9-00043u-0R for ged-emacs-devel@m.gmane.org; Mon, 01 May 2017 17:30:11 +0200 Original-Received: from localhost ([::1]:54749 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5DHE-0006L4-Qi for ged-emacs-devel@m.gmane.org; Mon, 01 May 2017 11:30:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5DGQ-0006DP-SW for emacs-devel@gnu.org; Mon, 01 May 2017 11:29:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5DGL-0007Kk-TV for emacs-devel@gnu.org; Mon, 01 May 2017 11:29:26 -0400 Original-Received: from shell1.rawbw.com ([198.144.192.42]:60084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5DGL-0007Iu-K1; Mon, 01 May 2017 11:29:21 -0400 Original-Received: from alto (m208-249.dsl.rawbw.com [198.144.208.249]) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTP id v41FTDtG091416; Mon, 1 May 2017 08:29:14 -0700 (PDT) (envelope-from mkupfer@alum.berkeley.edu) X-Authentication-Warning: shell1.rawbw.com: Host m208-249.dsl.rawbw.com [198.144.208.249] claimed to be alto In-Reply-To: Your message of "Mon, 01 May 2017 16:41:06 +0200." <87inlkzlkt.fsf@rosalinde> X-Mailer: MH-E 8.6+git; nmh 1.6; GNU Emacs 26.0.50 Content-ID: <18023.1493652553.1@alto> X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 198.144.192.42 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214489 Archived-At: Stephen Berman wrote: > By edebugging shell.el and comint.el I see that after typing `C-x 0' in > the recipe, the function comint-output-filter is invoked with the value > # for its argument `proc' and the value "> " for its > argument `string', and the latter value is what is inserted into the > *shell* buffer. I have failed to find out how that argument gets that > value or even how comint-output-filter gets invoked. If anyone has any > advice for how to proceed, I can try it. The "> " is coming from the PS2 environment variable (secondary prompt string). If I change PS2 to "foo> ", then "foo> " is what gets inserted. (This probably isn't what you were asking for, but I thought I'd note it.) Also, I looked into Eli's question > Could this be related to some of your shell customizations? Having EDITOR set to emacs (or emacsclient) seems to be required for me to reproduce the problem. $ export EDITOR=emacs $ emacs -Q -nw => problem reproduces $ emacs -Q -nw (w/o EDITOR set) M-x shell RET export EDITOR=emacs RET ksh RET => problem reproduces $ export EDITOR=emacs $ emacs -Q -nw M-x shell RET unset EDITOR RET ksh RET => problem does not reproduce mike