unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: 47665@debbugs.gnu.org
Cc: stefan monnier <monnier@iro.umontreal.ca>
Subject: bug#47665: elisp-completion-at-point doesn't work when no characters typed
Date: Fri, 9 Apr 2021 02:53:29 +0300	[thread overview]
Message-ID: <ba77505c-ba8c-6930-ef1c-93d469b8d2e9@yandex.ru> (raw)

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.





             reply	other threads:[~2021-04-08 23:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 23:53 Dmitry Gutov [this message]
2021-04-09  2:38 ` bug#47665: elisp-completion-at-point doesn't work when no characters typed Stefan Monnier
2021-04-09 22:52   ` Dmitry Gutov
2021-04-09 22:57     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba77505c-ba8c-6930-ef1c-93d469b8d2e9@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=47665@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).