|
From: | JD Smith |
Subject: | Re: Recommendation for CAPF setup when you don't know completion string in advance |
Date: | Sat, 3 Apr 2021 22:52:25 -0400 |
Thank you, that sounds quite promising. I’ve started sketching out a mash-up of `completion-table-with-cache’ and `python-shell-completion-at-point’ and it seems it should work out. There’s one thing I’m unclear on: how long does the completion engine in Emacs hold on to a collection aka "completion table" function? I’d expect this function to live only throughout a single “event" of completion (M-tab or what have you). But if that is indeed the case, I’m confused by why `completion-table-with-cache’ needs to test: (string-prefix-p last-arg arg ignore-case) Won’t this _always_ be true for the custom-wrapped closure which `completion-table-with-cache’ constructs? In other words, I can see two possibilities:
If #1 is true, wouldn’t all of these calls provide the same completion string? And if #2 is true, why does the completion engine “hold on” to a bespoke completion table function beyond the initial completion event which created it? Probably I’m missing the real #3. This is relevant here for deciding when to re-consult IPython for new completion data. |
[Prev in Thread] | Current Thread | [Next in Thread] |