From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: misbehavior in shell window with ksh Date: Wed, 03 May 2017 20:51:47 +0300 Message-ID: <83fuglhlqk.fsf@gnu.org> References: <12812.1493593946@alto> <83o9vdjcl6.fsf@gnu.org> <87pofszvue.fsf@rosalinde> <837f20ke4g.fsf@gnu.org> <87inlkzlkt.fsf@rosalinde> <831ss8k40f.fsf@gnu.org> <87bmrczi9s.fsf@rosalinde> <83h913iq9x.fsf@gnu.org> <87efw7jv1b.fsf@rosalinde> <83fugni5i8.fsf@gnu.org> <8760hjjj16.fsf@rosalinde> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1493834006 22553 195.159.176.226 (3 May 2017 17:53:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 May 2017 17:53:26 +0000 (UTC) Cc: emacs-devel@gnu.org, mkupfer@alum.berkeley.edu To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 03 19:53:21 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 1d5ySn-0005lf-68 for ged-emacs-devel@m.gmane.org; Wed, 03 May 2017 19:53:21 +0200 Original-Received: from localhost ([::1]:38023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5ySs-0006g1-Un for ged-emacs-devel@m.gmane.org; Wed, 03 May 2017 13:53:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5yS2-0006eU-Cx for emacs-devel@gnu.org; Wed, 03 May 2017 13:52:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d5yRz-0007a8-Bt for emacs-devel@gnu.org; Wed, 03 May 2017 13:52:34 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d5yRz-0007a2-8k; Wed, 03 May 2017 13:52:31 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4645 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d5yRw-0002fM-Mg; Wed, 03 May 2017 13:52:30 -0400 In-reply-to: <8760hjjj16.fsf@rosalinde> (message from Stephen Berman on Tue, 02 May 2017 18:55:01 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:214545 Archived-At: > From: Stephen Berman > Cc: mkupfer@alum.berkeley.edu, emacs-devel@gnu.org > Date: Tue, 02 May 2017 18:55:01 +0200 > > #52 0x0000000000553443 in internal_condition_case_1 (bfun=bfun@entry=0x589286 , arg=50273987, handlers=handlers@entry=19968, hfun=hfun@entry=0x589218 ) > at /home/steve/git/emacs-master/src/eval.c:1348 > #53 0x0000000000588e2f in read_and_dispose_of_process_output (p=p@entry=0x1365d60, chars=chars@entry=0x7ffcbb816460 "> ", nbytes=nbytes@entry=2, coding=coding@entry=0x105c330) at /home/steve/git/emacs-master/src/process.c:5979 > #54 0x0000000000589095 in read_process_output (proc=proc@entry=20340069, channel=channel@entry=18) at /home/steve/git/emacs-master/src/process.c:5890 > #55 0x0000000000590a0a in wait_reading_process_output (time_limit=time_limit@entry=30, nsecs=nsecs@entry=0, read_kbd=, do_display=do_display@entry=true, wait_for_cell=wait_for_cell@entry=0, wait_proc=wait_proc@entry=0x0, just_wait_proc=just---Type to continue, or q to quit--- > _wait_proc@entry=0) at /home/steve/git/emacs-master/src/process.c:5589 > #56 0x0000000000421953 in sit_for (timeout=timeout@entry=122, reading=reading@entry=true, display_option=display_option@entry=1) > at /home/steve/git/emacs-master/src/dispnew.c:5763 > #57 0x00000000004f313e in read_char (commandflag=1, map=map@entry=13473155, prev_event=0, used_mouse_menu=used_mouse_menu@entry=0x7ffcbb817b2b, end_time=end_time@entry=0x0) at /home/steve/git/emacs-master/src/keyboard.c:2722 The above is the interesting part: it shows that the "> " string was received from the shell subprocess. And that rings a bell: we have this window-adjust-process-window-size-function feature, which is new in Emacs 25. It sends a TIOCSWINSZ or TIOCSSIZE ioctl to the shell's pty; perhaps that causes the shell to respond with PS2? Can you play with the value of this variable, like set it to a function that returns nil, so that set-process-window-size is not called, and see if that helps to avoid the issue?