GNU bug report logs - #29193
26.0.90; Using (thing-at-point 'sexp) in flymake-diag-region might be suboptimal

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Tue, 7 Nov 2017 15:29:01 UTC

Severity: minor

Found in version 26.0.90

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#29193: closed (26.0.90; Using (thing-at-point 'sexp) in
 flymake-diag-region might be suboptimal)
Date: Wed, 16 Dec 2020 00:57:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 16 Dec 2020 02:55:04 +0200
with message-id <e06a2f2b-9ea7-4f0b-c381-c3c2f76a0bc1 <at> yandex.ru>
and subject line Re: bug#29193: 26.0.90; Using (thing-at-point 'sexp) in flymake-diag-region might be suboptimal
has caused the debbugs.gnu.org bug report #29193,
regarding 26.0.90; Using (thing-at-point 'sexp) in flymake-diag-region might be suboptimal
to be marked as done.

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


-- 
29193: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29193
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.90; Using (thing-at-point 'sexp) in flymake-diag-region might be
 suboptimal
Date: Tue, 7 Nov 2017 17:28:06 +0200
Example:

Rubocop can report warning when 'end' is at wrong column. It just
reports the beginning column, of course.

In ruby-mode, (thing-at-point 'sexp) signals an error at this position.
I'm not sure exactly whether it's a problem in ruby-mode.

But Flycheck uses (thing-at-poing 'symbol) for the same purpose, and the
whole 'end' token gets highlighted (which is probably what we expect).

In contrast, Flymake only highlights its first character ('e').

++

In GNU Emacs 26.0.90 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-11-07 built on zappa
Repository revision: ca2d94ba61dee678f85bfc7299d167e7219e6d8f
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description:	Ubuntu 17.04


[Message part 3 (message/rfc822, inline)]
From: Dmitry Gutov <dgutov <at> yandex.ru>
To: João Távora <joaotavora <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 29193-done <at> debbugs.gnu.org
Subject: Re: bug#29193: 26.0.90; Using (thing-at-point 'sexp) in
 flymake-diag-region might be suboptimal
Date: Wed, 16 Dec 2020 02:55:04 +0200
On 14.12.2020 13:03, João Távora wrote:
> Feel free to push if you can't come up with anything better in ruby-mode.

Pushed, and closing, thanks.

Regarding "doing the fix in the proper place", the alternative would be 
changing the implementation of thing-at-point--end-of-sexp.

But I'm not sure it's a well-defined function. It clearly special-cases 
characters with class "closing paren". And there's no clear counterpart 
for 'end' (even though it's a sexp closer in ruby-mode's syntax).


This bug report was last modified 4 years and 158 days ago.

Previous Next


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