unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 72824@debbugs.gnu.org
Subject: bug#72824: Eglot highlights matches incorrectly wrt case sensitivity
Date: Tue, 27 Aug 2024 15:38:37 +0100	[thread overview]
Message-ID: <CALDnm53jsV6sC0yWwCspL=Rba2pe4hODCUy7SwR+2gGt66tTDQ@mail.gmail.com> (raw)
In-Reply-To: <CALDnm506TL7kppHeF3sKD3=0ZUtkUWUVADfC=hm9YGZ2o3ju0g@mail.gmail.com>

Also, btw, completion highlighting is naturally borked too.  There is
no guarantee that that naive flex algorithm is what the server used
to select those completions.

On Tue, Aug 27, 2024 at 3:36 PM João Távora <joaotavora@gmail.com> wrote:
>
> I think the fix makes sense.  Please push it to Emacs 30, and thanks
> in advance.
>
> If you can please use this format for the commit message subject,
> which is my more or less usual practice.
>
> Eglot: fix the frobnication (bug#12345)
>
> * lisp/progmodes/eglot.el (eglot-foo): pass foo to eglot-bar.
>
> On Tue, Aug 27, 2024 at 2:41 AM Dmitry Gutov <dmitry@gutov.dev> wrote:
> >
> > X-Debbugs-Cc: joaotavora@gmail.com
> >
> > 1. Server gopls, for example.
> > 2. completion-ignore-case=nil, its default value.
> > 3. Input "clCe" and completions for it like
> >
> >    clockCenterX
> >    clockCenterY
> >
> > Completions are case-sensitive, but completions' highlighting works as
> > if it's insensitive - highlights are on "cl", second "c" and "e",
> > whereas the capital "C" is not highlighted.
> >
> > This fixes it for me:
> >
> > diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
> > index 844fc634be9..acc197754db 100644
> > --- a/lisp/progmodes/eglot.el
> > +++ b/lisp/progmodes/eglot.el
> > @@ -3260,7 +3260,7 @@ eglot-completion-at-point
> >              (try-completion pattern (funcall proxies)))
> >             ((eq action t)                                 ; all-completions
> >              (let ((comps (funcall proxies)))
> > -             (dolist (c comps) (eglot--dumb-flex pattern c t))
> > +             (dolist (c comps) (eglot--dumb-flex pattern c
> > completion-ignore-case))
> >                (all-completions
> >                 ""
> >                 comps
> >
> >
> >
>
>
> --
> João Távora



-- 
João Távora





  reply	other threads:[~2024-08-27 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  1:38 bug#72824: Eglot highlights matches incorrectly wrt case sensitivity Dmitry Gutov
2024-08-27 14:36 ` João Távora
2024-08-27 14:38   ` João Távora [this message]
2024-08-27 22:57     ` Dmitry Gutov
2024-08-28  9:03       ` João Távora
2024-08-28 21:20         ` Dmitry Gutov
2024-08-27 23:23   ` Dmitry Gutov

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='CALDnm53jsV6sC0yWwCspL=Rba2pe4hODCUy7SwR+2gGt66tTDQ@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=72824@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    /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).