GNU bug report logs - #50989
28.0.60; nobreak-char-display in Eldoc buffers

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Sun, 3 Oct 2021 10:03:01 UTC

Severity: normal

Tags: patch

Found in version 28.0.60

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 50989 <at> debbugs.gnu.org, arstoffel <at> gmail.com
Subject: bug#50989: 28.0.60; nobreak-char-display in Eldoc buffers
Date: Sun, 03 Oct 2021 14:07:41 +0300
> From: João Távora <joaotavora <at> gmail.com>
> Date: Sun, 3 Oct 2021 11:34:32 +0100
> Cc: 50989 <at> debbugs.gnu.org
> 
> On Sun, Oct 3, 2021 at 11:03 AM Augusto Stoffel <arstoffel <at> gmail.com> wrote:
> >
> > Using the pylsp language server via Eglot, I sometimes get docstrings
> > with lots of non-breaking spaces in them.  Those end up being
> > highlighted with the `nobreak-space' face in the Eldoc buffer, which is
> > very distracting.
> >
> > I'm not sure this should be addressed in Eglot or in Eldoc.  But the
> > following advice fixes things for me.
> >
> >     (advice-add 'eldoc--format-doc-buffer :after
> >                 (lambda (&rest _) "Don't display non-breaking spaces."
> >                   (with-current-buffer eldoc--doc-buffer
> >                     (setq-local nobreak-char-display nil))))
> 
> I'd say put this in ElDoc directly. If someone then objects, we could make a
> eldoc-no-break-char-display variable.  Can you make a patch?

IMNSHO, this doesn't make much sense.  That face exists for a reason:
to signal to the users that some innocently-looking characters aren't
what they look like.  What you suggest above is to sweep the problem
under the carpet.  I think this is not TRT.

Why does the server return these NBSP characters?  Would it make sense
to automatically convert them to spaces on input?




This bug report was last modified 3 years and 224 days ago.

Previous Next


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