From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Martin Marshall Newsgroups: gmane.emacs.bugs Subject: bug#68487: [PATCH] Make jump commands usable for all skeletons Date: Sat, 27 Jan 2024 13:27:31 -0500 Message-ID: <87v87e3a3w.fsf@martinmarshall.com> References: <877ckawckc.fsf@martinmarshall.com> <86wmrv87hf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13568"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68487@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 27 19:28:15 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rTnPb-0003Kw-GM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Jan 2024 19:28:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTnPL-0006bC-Sy; Sat, 27 Jan 2024 13:27:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTnPH-0006ak-AG for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 13:27:55 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTnPG-0006h7-Mz for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 13:27:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTnPN-0000KV-Sn for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 13:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Martin Marshall Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jan 2024 18:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68487 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68487-submit@debbugs.gnu.org id=B68487.17063800691249 (code B ref 68487); Sat, 27 Jan 2024 18:28:01 +0000 Original-Received: (at 68487) by debbugs.gnu.org; 27 Jan 2024 18:27:49 +0000 Original-Received: from localhost ([127.0.0.1]:55902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTnPB-0000K5-93 for submit@debbugs.gnu.org; Sat, 27 Jan 2024 13:27:49 -0500 Original-Received: from mail-yw1-x1134.google.com ([2607:f8b0:4864:20::1134]:46382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTnP8-0000Jr-2y for 68487@debbugs.gnu.org; Sat, 27 Jan 2024 13:27:47 -0500 Original-Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-602ab446cd8so15256287b3.1 for <68487@debbugs.gnu.org>; Sat, 27 Jan 2024 10:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martinmarshall-com.20230601.gappssmtp.com; s=20230601; t=1706380053; x=1706984853; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=aL+77uUF7b+p9oIOrshUgM8U6wuWrU8/BMDl0MLnJl4=; b=jYBxBslt3LLaGKwxTAImXYCSAgGjkT/ebNO4gyqmpoDwLcY71MEJZNIgLUo3wkPqvI TtoBsyzz4gzhjjFWDvQ4MwxIZOtQnWzDcBoZq4ckZMSKcb15xTbu/jDfQ45BZPMO8Go4 SRbNsn687Jr08hrcapd7ZApAtFu9N0hztR+VULH85iAa5v48yRu+nunRsD0DUqJlAXUS Bv8tc/Ze5gNsAkmQURvvjFvIOyPE65yePJ7hkVfyu7/4YrXNZ/ujGNhwcUmVw7soBnVQ 6USZs07UFwtDV1Mz7J/MIIikpFa0ltujuUS7rHL/p+4/Rl6iHY7/YPPC+Osemz3w102d wiKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706380053; x=1706984853; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aL+77uUF7b+p9oIOrshUgM8U6wuWrU8/BMDl0MLnJl4=; b=F/aPh4vMqx8v1J2btaJ8QuF9qIoKkaoI4ItiiP5w8JIqHULnF5TLSt9//71FqLqzBK ZIfL7twQ4GqsA/CbkCMx/ZtSS1XzUcXtalUdRV8po1uPp2E2FshBremZxyiPABFkY9bT 3AahvgnqzZ5rR2X8JWY33braT55CTanIpoQwzDn+1kmCS74MBfzBiWEAeGbRDyruQef2 BCJDPTPQBjdO6RRsr3CmG+pCxS9SCvzXGxwR2wBZUFXj+O8NJHmOwJGw0YdCFb5Cv3Ku Ykm0ACK1TtLpajyBPuCEi6LbvtTwm3uqDokUdJgvIsZXHS80bKDwiZVcqTYEIBHWbYui mFLQ== X-Gm-Message-State: AOJu0YwAbYoLWDBeKQiYrRULyVya9mWFjdXy2ops+1yF3GC6zZMB/3EB JB3CApAuHpBJt3xTdIga1IFi2i1zTlRmhHOkfxW/DbBkMqmR6NooXhA6kYJFlBl0goA3SYgdQ6U DyA== X-Google-Smtp-Source: AGHT+IGwctyjfnM6KxfZUZY4zbkr3ihy43KXLaQbehzs1z2o5XJ2xZW4mI/D+JV2ABxEm+pRRem5LA== X-Received: by 2002:a0d:d2c2:0:b0:602:ca2a:e3be with SMTP id u185-20020a0dd2c2000000b00602ca2ae3bemr1898990ywd.68.1706380053087; Sat, 27 Jan 2024 10:27:33 -0800 (PST) Original-Received: from vader (68-252-220-225.lightspeed.tukrga.sbcglobal.net. [68.252.220.225]) by smtp.gmail.com with ESMTPSA id q6-20020a819906000000b006000bddd691sm1248369ywg.77.2024.01.27.10.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 10:27:32 -0800 (PST) In-Reply-To: <86wmrv87hf.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 27 Jan 2024 11:13:00 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279025 Archived-At: Eli Zaretskii writes: >> From: Martin Marshall >> Date: Mon, 15 Jan 2024 15:45:23 -0500 >>=20 >> Dear Emacs Maintainers, >>=20 >> I noticed the following item in the Emacs TODO file: >>=20 >> > ** Improve the "code snippets" support >> > Consolidate skeleton.el, tempo.el, and expand.el (any other?) and then >> > advertise/use/improve it. >>=20 >> To that end, here's a patch which allows using expand.el's >> `expand-jump-to-next-slot' ("C-x=C2=A0a=C2=A0n") and >> `expand-jump-to-previous-slot' ("C-x=C2=A0a=C2=A0p") commands with all >> skeletons. >>=20 >> 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. >>=20 >> 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'. >>=20 >> 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. --=20 Best regards, Martin Marshall