GNU bug report logs - #31772
26.1; (thing-at-point 'list) regression

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Sun, 10 Jun 2018 03:59:01 UTC

Severity: normal

Found in version 26.1

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #47 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#31772: 26.1; (thing-at-point 'list) regression
Date: Thu, 6 Sep 2018 21:01:55 +0200
On 06.09.2018 12:37, Leo Liu wrote:
> Hi there,
> 
> I have been using 26.1 as my main editor for the last few months and
> this breakage remains a pain point in my day-to-day editing. For example
> whenever I rewrite a function, I normally comment out the old one (to
> keep the linter, pretty-printer or whatnot happy) and write the new one
> from scratch, occasionally copy things from the old one to save typing
> and this bug gets in the way many times a day. I propose a patch that
> doesn't divert too much from the old and tried behaviour.
> 
> The idea that is currently in thing-at-point-bounds-of-list-at-point is
> fine for a higher level function such as list-at-point but doing it
> there affects all functions that build on it including some from
> thingatpt.el itself.
> 
> I hope you can find time to review the patch and come to a solution for
> 26.2 which I very much look forward to.
> 
> Thanks,
> Leo
> 

Hi Leo,

lets consider the following proposed change of tests:

-                         ("(foo\n(a ;(b c d)\ne) bar)" . (a e))
+                         ("(foo\n(a ;(b c d)\ne) bar)" . (foo (a e) bar))

As the ert-test mentioned  calls (re-search-backward "\\((a\\|^a\\)")

point will be behind foo at "(a". I.e. "foo" belongs to outer list, not 
to list-at-point. The desired result shown by this change looks wrong, 
"(foo" should not be part of.

Maybe I'm missing something.
May you provide a standalone example where current behavior breaks your 
code?

Thanks,
Andreas
gladly using GNU Emacs 27.0.50 (build 1, i686-pc-linux-gnu, GTK+ Version 
3.14.5) of 2018-08-29




This bug report was last modified 6 years and 252 days ago.

Previous Next


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