From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: misbehavior in shell window with ksh Date: Thu, 04 May 2017 09:54:23 +0200 Message-ID: <87k25xawgg.fsf@rosalinde> 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> <83fuglhlqk.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1493884488 13421 195.159.176.226 (4 May 2017 07:54:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 May 2017 07:54:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, mkupfer@alum.berkeley.edu To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 04 09:54:41 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 1d6Bax-0003H7-79 for ged-emacs-devel@m.gmane.org; Thu, 04 May 2017 09:54:39 +0200 Original-Received: from localhost ([::1]:40268 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6Bb1-0003bC-DF for ged-emacs-devel@m.gmane.org; Thu, 04 May 2017 03:54:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6Bav-0003b4-HN for emacs-devel@gnu.org; Thu, 04 May 2017 03:54:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6Bau-0001Vi-KI for emacs-devel@gnu.org; Thu, 04 May 2017 03:54:37 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:60708) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6Ban-0001RJ-Vy; Thu, 04 May 2017 03:54:30 -0400 Original-Received: from rosalinde ([83.135.1.176]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MFi1J-1dKm2O2KWr-00EbnL; Thu, 04 May 2017 09:54:25 +0200 In-Reply-To: <83fuglhlqk.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 03 May 2017 20:51:47 +0300") X-Provags-ID: V03:K0:BmWWrSw/HgGI8oFMXCYcagXGJzNF2CP9pzB/LATMyks6j547oqT itoh9vfS3Xtei/er6qw3RA0FLEozD4b5hnkVamZAbpDh4ortRoRJzSz3/1+BWWpUSVXDx3K z3+BfyI9st0QAo/JEywdVd4w/S4jAc9zc9V1714vWLaUg3cwYRUnNRiYO5wRY98+EQ0RHAq WzXgLPVxjPjcbmAB7yZ4A== X-UI-Out-Filterresults: notjunk:1;V01:K0:N2oJX7/hvBk=:8AB6CPIQtlHZRiE0iNuVzW EebtQKKD2xSx/sHwiNRChiCUIWxEBGiR2Cr6q7O9E6yK0Rj8b/6zSaV2hdFYb7MpakMtD9pNm p/FlrwOntJGgl+PqZTy8Lamw5LJW0vKXSw6kwovjfNbWed0AGLjpDOmaoTgQ5ae8KSahMXOQK IXaON75qTxZdeLQ7ZfkLE4aKxlnxBp3kkrxLFG/7Br1DNRmO2XTZpbOg1HF6Wsg204WvcOvUc qWsGv2DlVDvEGCdFo8FKaV/kDO/mNR/YX0590yxlhKJAuiZHGEumDCeyKKzB0FRYl8W8lUHwa Hr9PWwP0jxu6UbR0QZBUefGCkhOzwFFWKC0TDfxB0Bc8bGUiixRHmG/FyqYouEZgxhUnZ1ylM BuX8n3dvr4C3Z9JRA813SamAezUDMQKF5rQYeTeQCj23V6mUjjhcqyl9+i9CR7ap9ZMfGVi1U VUJGuxWTxOo6YCcgYDP2JHqxudSzNG0G+s79vN+gATRMKNdkepCgZVMjH1GuErhz4hUowAO9y p8xqKUtI6C+BprCV96KWKfaw9F0BQyuKApkuuwp7B7zIxvVZxv+KEhyJQ/N0df4brr6rh0Iyu CMa+sUG2vEh9KP4YnXexANIv/ifuj86ufHszgnf825LMCWvzkQ8ZgX/nmUwzsUZAHL/guii1B Td8DmYWRj5OR1Ky8MH5wbre5okqhXT9s/MNjurD+OmpyZVY1S80DYX8usKYRdSEDDfDysjnKg +RcTUFrM89AfdwxkSDZzYwMBTnyEtUDtRw69Y+RA6c5loZdqCRhSfZMtwXZkh6y2qARu2UiQ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.22 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:214559 Archived-At: On Wed, 03 May 2017 20:51:47 +0300 Eli Zaretskii wrote: >> 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=> out>, 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? Bingo! That variable is a user option and when I change its value with M-x customize-option to "Do not adjust process window sizes" (i.e. the function `ignore') and then execute the recipe, "> " is not inserted. When I return to the customization buffer and change the value back to the default "Minimum area of any window" (i.e. the function `window-adjust-process-window-size-smallest') and then switch back to the *shell* buffer, "> " I see that has now been inserted. Steve Berman