-
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
Wrong completion-at-point in Haskell interpreter with helm #1113
Comments
Can you please inspect and post here values of |
In REPL: |
@issue-dispenser thanks, using |
@issue-dispenser: you seem to know what you are doing and to know Emacs. Can you help us with this and submit a pull request? |
Yeah, join in! (: |
You overestimate me, but I still might be able to do something. I found the secondary issue (easy one) in (if (string= inp (car-safe haskell-interactive-mode-completion-cache))
(cdr haskell-interactive-mode-completion-cache) This assumes that if you have the same partial input (in this case |
This cache thing is an interesting find... I did not know we have it there. Anyway a cache without a solid invalidation scheme is a source of issues. Can you remove |
@issue-dispenser: Can I assign this issue to you? We will see how far you will get. |
I can get rid of the cache. However, I can't seem to find the cause of the main issue. When completing When completing The result seems to comply with |
Maybe the issue is on helm's side after all (not sure why eshell's completion was different). Apparently Edit: Just tested in a scratch buffer and indeed, the issue is on helm's side. I'll open an issue there. |
Can you link the relevant helm PR here? (And thanks for digging into this issue). |
Phew, great. Also, I can't remember that I did anything to completion cache, likely is it a heritage from past times. |
It's emacs-helm/helm#1357 |
Suppose you have a folder structure like so:
and you start the interpreter inside ~.
With the prompt
:cd top/_
and with _ as the cursor, doinghaskell-interactive-mode-tab
(or(completion-at-point)
as that's what it actually uses) gives a selection for helm betweentop/mid1/
andtop/mid2/
.Selecting the latter then yields:
:cd top/top/mid2/
It seems that the selection candidates shouldn't include what's already written, at least when working with helm. For reference, doing the same thing in eshell:
Starting at
cd top/_
and doing(completion-at-point)
showsmid1/
andmid2/
as selections and yields:cd top/mid2/
Another thing that I found out while testing this was that sometimes (inconsistently) whatever
haskell-interactive-mode-tab
uses for its selection doesn't update by itself. For instance, starting in ~/::cd top/
:cd _
Pressing tab here behaves as if it was in the
~
directory, not intop
. If you instead have a valid starting letter (e.g:cd m_
in this case), then it seems to expand consistently.The text was updated successfully, but these errors were encountered: