Subject: bug#29193: closed (Re: bug#29193: 26.0.90; Using (thing-at-point 'sexp) in flymake-diag-region might be suboptimal)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 16 Dec 2020 00:57:02 +0000

Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
29193: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29193
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#29193: 26.0.90; Using (thing-at-point 'sexp) in flymake-diag-region might be suboptimal
From: Dmitry Gutov <[email-masked]>
To: João Távora <[email-masked]>
Cc: Lars Ingebrigtsen <[email-masked]>, [email-masked]
Date: Wed, 16 Dec 2020 02:55:04 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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).

Subject: 26.0.90; Using (thing-at-point 'sexp) in flymake-diag-region might be suboptimal
From: Dmitry Gutov <[email-masked]>
To: [email-masked]
Date: Tue, 7 Nov 2017 17:28:06 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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