unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Martin Marshall <law@martinmarshall.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 68487@debbugs.gnu.org
Subject: bug#68487: [PATCH] Make jump commands usable for all skeletons
Date: Sat, 27 Jan 2024 13:27:31 -0500	[thread overview]
Message-ID: <87v87e3a3w.fsf@martinmarshall.com> (raw)
In-Reply-To: <86wmrv87hf.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 27 Jan 2024 11:13:00 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Martin Marshall <law@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





  reply	other threads:[~2024-01-27 18:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15 20:45 bug#68487: [PATCH] Make jump commands usable for all skeletons Martin Marshall
2024-01-27  9:13 ` Eli Zaretskii
2024-01-27 18:27   ` Martin Marshall [this message]
2024-01-27 18:51     ` Eli Zaretskii
2024-01-27 21:48       ` Martin Marshall
2024-01-28  5:52         ` Eli Zaretskii
2024-01-28 18:47           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-28 19:24             ` Eli Zaretskii
2024-01-28 19:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-05 21:46   ` Martin Marshall
2024-02-06  2:46     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-06 22:11       ` Martin Marshall
2024-02-07 17:13         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-26  1:26           ` Martin Marshall
2024-03-03  4:07             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-14  7:50               ` Eli Zaretskii
2024-03-22  0:05                 ` martin
2024-04-06  8:56                   ` Eli Zaretskii
2024-04-18  8:58                     ` Eli Zaretskii
2024-05-02  8:37                       ` Eli Zaretskii
2024-05-18  8:28                         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v87e3a3w.fsf@martinmarshall.com \
    --to=law@martinmarshall.com \
    --cc=68487@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).