szermatt / emacs-bash-completion

Add programmable bash completion to Emacs shell-mode
GNU General Public License v2.0
280 stars 33 forks source link

After updating to emacs 28.1, the completion failed #67

Closed crotoc closed 1 year ago

crotoc commented 1 year ago

Thanks for the great package. I have used it for a while. Appreciate your nice job!

I upgraded emacs to 28.1 because some packages require to do so. But boom, this essential package is broken. Here is the debug information, please help me have a check and teach me how to fix it. Thanks in advance!

This buffer contains information about the last completion command
and the BASH process it was sent to. This can help you figure out
what's happening.

If it doesn't, go to
https://github.com/szermatt/emacs-bash-completion/issues/new
to create a new issue that describes:

Then add a copy of the information below:

commandline: <<EOF
if type ebcpre &>/dev/null; then ebcpre; __ebcompgen -b -c -a -A function -- conda; else echo ==emacs==nopre=${BASH_VERSION}==.; __ebcp=("$PS1" "$PROMPT_COMMAND"); unset PS1 PROMPT_COMMAND;fi;
EOF

error: "timeout"
buffer-string: <<EOF
rm: remove fifo '/tmp/tmp.KAHhErEOaF'? EOF

process: #
output-buffer: <<EOF
rm: remove fifo '/tmp/tmp.KAHhErEOaF'? EOF

emacs-version: "28.1"
bash-version: "4.2.46(2)-release"
bash-version: "4.2.46(2)-release"
context: #s(completion "conda"
("conda")
0 "conda" 190 "conda" nil nil "\"'@><=;|&(:" nil)

crotoc commented 1 year ago

Another completion fail info: This buffer contains information about the last completion command
and the BASH process it was sent to. This can help you figure out
what's happening.

If it doesn't, go to
https://github.com/szermatt/emacs-bash-completion/issues/new
to create a new issue that describes:

Then add a copy of the information below:

commandline: <<EOF
if type ebcpre &>/dev/null; then ebcpre; __ebcompgen -b -c -a -A function -- cond; else echo ==emacs==nopre=${BASH_VERSION}==.; __ebcp=("$PS1" "$PROMPT_COMMAND"); unset PS1 PROMPT_COMMAND;fi;
EOF

error: "short-timeout"
buffer-string: <<EOF
conda
conda
conda
condenseBedGraph.pl
conda-pack
conda2solv
conda_build.sh
conda
conda
conda-env
conda2solv
==emacs==ret=0==.EOF

process: #
output-buffer: <<EOF
conda
conda
conda
condenseBedGraph.pl
conda-pack
conda2solv
conda_build.sh
conda
conda
conda-env
conda2solv
==emacs==ret=0==.EOF

emacs-version: "28.1"
bash-version: "4.2.46(2)-release"
context: #s(completion "cond"
("cond")
0 "cond" 190 "cond" nil nil "\"'@><=;|&(:" nil)

szermatt commented 1 year ago

The patch above, should fix your first issue. Apparently, "rm" is configured on your system to ask for confirmation, even for deleting a temporary file. Please use emacs-bash-completion from github or wait a few days for melpa to pick up the fix.

That should fix the first error. I just assume that the second error is caused by the first one. If it's not, please open another issue.

crotoc commented 1 year ago

Thanks very much!:) Will pick it up and see whether it's fixed.