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 #50 received at 31772 <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 31772 <at> debbugs.gnu.org
Subject: Re: bug#31772: 26.1; (thing-at-point 'list) regression
Date: Fri, 07 Sep 2018 12:42:55 +0800
On 2018-09-06 21:01 +0200, Andreas Röhler wrote:
> 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?

I carefully considered this case when preparing the patch.

In the last 10 years (thing-at-point 'list) always returns the enclosing
list so I opted to keep this for now. It is confusing and I don't like
it personally.

It can be tweaked to look at "list" at point first if that's what
everybody wants.

Cheers,
Leo




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.