0

I have upgraded to Emacs 25.3 from 24. This issue only appears in the ksh. I've found that when I use bash then all is good. I find that in shell-mode when I hit tab to perform completion of the rest of the filename or directory, then Emacs inserts annoying character(s) at the start of the command line. it inserts one or more of > as I hit the tab key. This didn't happen in 24. I have tried in terminal mode -nw and using a gtk build.

How do I revert to the correct behaviour ?

Here is an example of the shell prompt in Emacs:

stm5412dap: /home/danlsb $

stm5412dap: /home/danlsb $

I now hit the TAB key after ls ./ and completion window pops up and a > gets inserted after the prompt every time I hit TAB. These get sent to the shell when I hit return which the shell will barf an error upon:

stm5412dap: /home/danlsb $ > > > > ls ./

/bin/ksh: ^L^L^L^Llr: not found [No such file or directory]

It's strange that the problem does not occur as soon as I switch to a bash shell. I exported PS1=$ in ksh to test a very simple prompt but the problem persisted.

SOLVED >>> I found this was causing the issue in my .profile. For some reason emacs25 shell does not like the below lines (yet in worked in earlier versions).

case $- in
    *i*)
        set -o emacs
        set -o ignoreeof
        #bind "^I=complete"

esac
  • 1
    This doesn't sound like a known problem, so details will matter. Please provide excruciating details, e.g. showing the line before hit TAB and then the result after you hit TAB and pointing out which part you don't like (unless it's really obviously obvious). – Stefan Sep 24 '18 at 16:02
  • I updated with an example of shell prompt and the > characters that appear after hitting TAB – ali hodgkiss Sep 25 '18 at 8:32
  • Is there a way to turn on some verbose tracing of emacs so that it logs every elisp function that is being invoked ? That might help in showing what has changed since emacs 24 when i hit tab. – ali hodgkiss Sep 25 '18 at 8:34
  • I strongly suspect that this is linked to some extra package you're using. More specifically, if you try it in emacs -Q -nw the problem will likely not happen. So try and bisect your ~/.emacs config to figure out which part of it is involved. – Stefan Sep 25 '18 at 15:05
  • I tried with emacs -Q -nw and the same bug occurs. It could be related to the way I built emacs possibly but I also built 24.5 on the same host and that does not have this problem. – ali hodgkiss Sep 25 '18 at 15:18
1

This issue was caused by the following in my .profile file:

case $- in
    *i*)
        set -o emacs
        set -o ignoreeof
esac

Removing this portion resolved the problem.

  • Sorry, the system automatically downvoted when I edited your post for formatting (not sure why). I upvoted to compensate. – Dan Oct 2 '18 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.