Subject: Re: bug#76176: 30.0.93; Suggested command: narrow-to-thing-at-point

From: Phil Sainty <[email-masked]>
Date: Sun, 30 Mar 2025 00:20:10 +1300

I've pushed some work-in-progress to the branch
scratch/narrow-to-thing-at-point

NEWS etc is still pending.

I did some more digging in thingatpt.el and have written a new
`thing-at-point-things' function which is more comprehensive
than the list I was obtaining previously.

After looking at `bounds-of-thing-at-point' more closely, I
realised it defers to `forward-thing' which in turn requires
nothing more than the existence of a function `forward-FOO'
for 'FOO to be a valid Thing.  This magic naming feels slightly
tenuous, but at present it's the only way to obtain a complete
list, so I'm using it.

Let me know if you have thoughts on that or other aspects.

I've included a `narrow-to-sexp-at-point' command as well
(should maybe be just `narrow-to-sexp') as I thought that
seemed like a generally useful thing.  I haven't added a
key binding for it, and the one which sprang to mind was
"C-x n (" which I thought was slightly clunky but might
be a good choice regardless.  I'm happy to ditch this if
you don't think it's a useful addition.

-Phil