GNU bug report logs - #68514
30.0.50; minibuffer-choose-completion + elisp-c-a-p delete next sexp when completing after open paren

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Tue, 16 Jan 2024 17:07:01 UTC

Severity: normal

Found in version 30.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Spencer Baugh <sbaugh <at> janestreet.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: dmitry <at> gutov.dev, 68514 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#68514: 30.0.50; minibuffer-choose-completion + elisp-c-a-p delete next sexp when completing after open paren
Date: Wed, 17 Jan 2024 12:22:48 -0500
Juri Linkov <juri <at> linkov.net> writes:
>>> This is a known bug without a known fix:
>>> https://debbugs.gnu.org/64903#18
>>
>> Alright, how about this patch?  Should fix most of the issue without
>> changing the code too much.
>>
>> diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
>> @@ -668,6 +668,9 @@ elisp-completion-at-point
>>  		    (goto-char beg)
>>  		    (forward-sexp 1)
>>                      (skip-chars-backward "'’")
>> +                    (when (member (char-syntax (char-before (point)))
>> +                                  '(?\" ?\)))
>> +                      (goto-char beg))
>>  		    (when (>= (point) pos)
>>  		      (point)))
>
> Thanks.  I tried this patch, but it doesn't seem to have any effect.

How did you test?

If I insert:

( (foo)

and move point to:

(| (foo)

then hit M-TAB and select a completion, for me, after my patch, (foo) is
not deleted, whereas before it would be.




This bug report was last modified 1 year and 124 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.