GNU bug report logs - #76176
30.0.93; Suggested command: narrow-to-thing-at-point

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Mon, 10 Feb 2025 12:35:01 UTC

Severity: wishlist

Tags: patch

Found in version 30.0.93

Full log


View this message in rfc822 format

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 76176 <at> debbugs.gnu.org
Subject: bug#76176: 30.0.93; Suggested command: narrow-to-thing-at-point
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





This bug report was last modified 77 days ago.

Previous Next


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