GNU bug report logs - #68487
[PATCH] Make jump commands usable for all skeletons

Previous Next

Package: emacs;

Reported by: Martin Marshall <law <at> martinmarshall.com>

Date: Mon, 15 Jan 2024 20:46:01 UTC

Severity: wishlist

Tags: patch

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#68487: closed ([PATCH] Make jump commands usable for all
 skeletons)
Date: Thu, 13 Feb 2025 11:51:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 13 Feb 2025 05:50:34 -0600
with message-id <CADwFkmmUBzg7vCa4Tk3MtuBkOVyiP9vNBVyeNo-uH8dVruJUNQ <at> mail.gmail.com>
and subject line Re: bug#68487: [PATCH] Make jump commands usable for all skeletons
has caused the debbugs.gnu.org bug report #68487,
regarding [PATCH] Make jump commands usable for all skeletons
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
68487: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68487
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Martin Marshall <law <at> martinmarshall.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Make jump commands usable for all skeletons
Date: Mon, 15 Jan 2024 15:45:23 -0500
[Message part 3 (text/plain, inline)]
Dear Emacs Maintainers,

I noticed the following item in the Emacs TODO file:

> ** Improve the "code snippets" support
> Consolidate skeleton.el, tempo.el, and expand.el (any other?) and then
> advertise/use/improve it.

To that end, here's a patch which allows using expand.el's
`expand-jump-to-next-slot' ("C-x a n") and
`expand-jump-to-previous-slot' ("C-x a p") commands with all
skeletons.

In the current Emacs release, an expanded skeleton adds the locations
of `@' symbols to `skeleton-positions' list.  One could theoretically
convert these positions to markers and write commands for navigating
to the locations.  Fortunately, expand.el already implements this
behavior.  The only problem is that it's limited to skeletons being
expanded as abbrevs.  Skeletons invoked by a keybinding, menu entry,
or "M-x" can't use expand.el's jumping commands.

This patch changes that by updating `define-skeleton', so that
skeleton commands will update the list of markers in `expand-pos'
whenever called outside of `expand-abbrev'.

What do you think?

-- 
Best regards,
Martin Marshall
[0001-Make-jump-commands-usable-for-all-skeletons.patch (text/x-diff, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Martin Marshall <law <at> martinmarshall.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 68487-done <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#68487: [PATCH] Make jump commands usable for all skeletons
Date: Thu, 13 Feb 2025 05:50:34 -0600
Martin Marshall <law <at> martinmarshall.com> writes:

>> Did you find the time to look into this?  Thanks.
>
> No, sorry for leaving this bug open.  It can be closed as far as I'm
> concerned.
>
> I ended up moving away from skeletons and haven't looked at the issue in a
> long time.

OK, thanks.  I'm therefore closing this bug report.


This bug report was last modified 154 days ago.

Previous Next


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