emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: misbehavior in shell window with ksh


From: Mike Kupfer
Subject: Re: misbehavior in shell window with ksh
Date: Mon, 01 May 2017 08:29:13 -0700

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.)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]