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


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

From: Martin Marshall <law <at> martinmarshall.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 68487 <at> debbugs.gnu.org
Subject: Re: bug#68487: [PATCH] Make jump commands usable for all skeletons
Date: Sat, 27 Jan 2024 13:27:31 -0500
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Martin Marshall <law <at> martinmarshall.com>
>> Date: Mon, 15 Jan 2024 15:45:23 -0500
>> 
>> 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?
>
> Martin,
>
> Is this patch still relevant, or you intend to resolve this while
> consolidating the related packages, perhaps based on yasnippet?

I think it's still relevant.

As I understand it, a goal for the snippet-engine project is to include
it in core and implement skeleton.el, expand.el, and tempo.el on top of
it.

When completed, that will make this patch irrelevant, but I don't know
how long that process will take.

-- 
Best regards,
Martin Marshall




This bug report was last modified 94 days ago.

Previous Next


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