emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47665: closed (elisp-completion-at-point doesn't work when no charac


From: GNU bug Tracking System
Subject: bug#47665: closed (elisp-completion-at-point doesn't work when no characters typed)
Date: Fri, 09 Apr 2021 22:53:01 +0000

Your message dated Sat, 10 Apr 2021 01:52:07 +0300
with message-id <ce58902a-b1f2-6a67-d689-27dbc7df86fe@yandex.ru>
and subject line Re: bug#47665: elisp-completion-at-point doesn't work when no 
characters typed
has caused the debbugs.gnu.org bug report #47665,
regarding elisp-completion-at-point doesn't work when no characters typed
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
47665: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47665
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: elisp-completion-at-point doesn't work when no characters typed Date: Fri, 9 Apr 2021 02:53:29 +0300 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1
X-Debbugs-CC: Stefan Monnier <monnier@IRO.UMontreal.CA>

Example:

(|)

press C-M-i -> nothing

(a|)

press C-M-i -> lots of completions

That's not very conducive to API exploration via completion.

Further, it triggers a problem when used with company: if I initiate completion when prefix is empty, it switches to the dabbrev-code backend. Then, even after I type some chars, the same backend continues to be used. Not company-capf, which I would want.

This patch seems to fix it:

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 8ade718640..203712f45d 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -496,7 +496,7 @@ elisp-completion-at-point
           (end
            (unless (or (eq beg (point-max))
                        (member (char-syntax (char-after beg))
-                                '(?\s ?\" ?\( ?\))))
+                                '(?\" ?\()))
              (condition-case nil
                  (save-excursion
                    (goto-char beg)


But I'm not sure why those elements were there in the first place.



--- End Message ---
--- Begin Message --- Subject: Re: bug#47665: elisp-completion-at-point doesn't work when no characters typed Date: Sat, 10 Apr 2021 01:52:07 +0300 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1
On 09.04.2021 05:38, Stefan Monnier wrote:
I don't think there was a deep reason.
More of a desire to be on the safe side and only provide completion when
there was some evidence that we were indeed in the presence of an identifier.

With your permission, I will change it then.

I don't think there are any significant cases where we're trying to complete something other than an identifier and would benefit from skipping over elisp-completion-at-point.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]