-
-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File name completion overwrites already entered path in shell-mode #1755
Comments
Having the same issue for a while. |
I just ran into this today, after using ivy for many years without issue. To reproduce from (require 'package)
(setq package-load-list
'((ivy t)))
(package-initialize)
(ivy-mode)
(shell) This opens a shell. In my case, I have a directory GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2024-07-02 |
The problem seems to occur in Lines 2682 to 2691 in 2a25a6f
At this point, it looks like the length of the first match in the completion list ( As a temporary fix, this resets the default (defun tws-shell-mode-hook ()
;; to override ivy-mode, which provides a problematic
;; completion-in-region variation:
(setq-local completion-in-region-function #'completion--in-region))
(add-hook 'shell-mode-hook 'tws-shell-mode-hook) |
Perhaps it was introduced by the following commit in Emacs 30? At least that's when I noticed the issue in
|
At first glance it looks like #3051 might be trying to address this issue; I'll try to dig deeper soon. |
Hi!
I have a long standing issue: in shell-mode, let's say there's /aa/bbb/cccc directory, and I want to complete this. If I enter "cd /aa/bbb" and I hit TAB, I get "cd /aabbb/" immediately. If I enter "cd /aa/bbb/" (there's a trailing /), and I hit TAB, the dropdown list appears which allows me to select from the candidates, which is "..", "cccc" and "." in this example. So after TAB, the already entered command switches to "cd /aa/b". If I go down and select "cccc" from the list, I get "cd /aa/bcccc". It varies how many characters of the already entered path is overwritten, but I couldn't figure out what it depends on.
If I toggle debug-on-quit, and hit ^G while the dropdown list is active, I get this back trace:
The buffer's name is "shell @ /to:dc153fnd:/" and the shell's prompt is "root@fnd01:/# ".
I'm using GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars) of 2018-06-13, and I'm using ivy 20180820.1526 installed via package.el.
I'd really appreciate any pointers how to debug this issue further, since I'm pretty sure I'm not the only one who uses Ivy like this, but seems that only I have this issue (for a long time, like at least half a year).
The text was updated successfully, but these errors were encountered: