all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, mkupfer@alum.berkeley.edu
Subject: Re: misbehavior in shell window with ksh
Date: Mon, 01 May 2017 17:52:31 +0200	[thread overview]
Message-ID: <87bmrczi9s.fsf@rosalinde> (raw)
In-Reply-To: <831ss8k40f.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 01 May 2017 18:09:36 +0300")

On Mon, 01 May 2017 18:09:36 +0300 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Stephen Berman <stephen.berman@gmx.net>
>> Cc: mkupfer@alum.berkeley.edu,  emacs-devel@gnu.org
>> Date: Mon, 01 May 2017 16:41:06 +0200
>> 
>> 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
>> #<process shell> 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.
>
> Thanks.
>
> Can you show the backtrace for the invocation of comint-output-filter?

After `M-o' in the recipe I did `M-: (debug-on-entry
'comint-output-filter) RET' (when I tried `M-x debug-on-entry RET' the string
"> " was then inserted into the *shell* buffer).  This showed this backtrace:

   Debugger entered--entering a function:
   * comint-output-filter(#<process shell> "> ")

I typed `q' then proceeded with `M-0' from the recipe, which produced
the same backtrace.  Why isn't the caller of comint-output-filter shown?

On Mon, 01 May 2017 08:29:13 -0700 Mike Kupfer <mkupfer@alum.berkeley.edu> wrote:

> 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
>> #<process shell> 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.)

FTR the same thing happens here.

> 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

Here, EDITOR had not been set when I tested previously, and it makes no
difference if I set it and execute the recipe, also after unsetting it;
in all cases I get the problematic behavior.

Steve Berman



  reply	other threads:[~2017-05-01 15:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 23:12 misbehavior in shell window with ksh Mike Kupfer
2017-05-01  6:49 ` Eli Zaretskii
2017-05-01 10:59   ` Stephen Berman
2017-05-01 11:31     ` Eli Zaretskii
2017-05-01 14:41       ` Stephen Berman
2017-05-01 15:09         ` Eli Zaretskii
2017-05-01 15:52           ` Stephen Berman [this message]
2017-05-02  9:03             ` Eli Zaretskii
2017-05-02 12:35               ` Stephen Berman
2017-05-02 16:32                 ` Eli Zaretskii
2017-05-02 16:55                   ` Stephen Berman
2017-05-03 17:51                     ` Eli Zaretskii
2017-05-04  7:54                       ` Stephen Berman
2017-05-04 14:42                         ` Eli Zaretskii
2017-05-05  3:04                           ` Mike Kupfer
2017-05-05  6:13                             ` Eli Zaretskii
2017-05-06 18:41                               ` Mike Kupfer
2017-05-09 16:36                                 ` Eli Zaretskii
2017-05-01 15:29         ` Mike Kupfer
2017-05-02 13:03           ` Tino Calancha
2017-05-01  7:38 ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bmrczi9s.fsf@rosalinde \
    --to=stephen.berman@gmx.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mkupfer@alum.berkeley.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.