GNU bug report logs - #80109
30.2; Feature request: use markers in skeleton-positions

Previous Next

Package: emacs;

Reported by: Michael Shulman <shulman <at> sandiego.edu>

Date: Fri, 2 Jan 2026 04:39:02 UTC

Severity: wishlist

Found in version 30.2

To reply to this bug, email your comments to 80109 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#80109; Package emacs. (Fri, 02 Jan 2026 04:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Shulman <shulman <at> sandiego.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 02 Jan 2026 04:39:02 GMT) Full text and rfc822 format available.

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

From: Michael Shulman <shulman <at> sandiego.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.2; Feature request: use markers in skeleton-positions
Date: Thu, 1 Jan 2026 12:57:13 -0800
[Message part 1 (text/plain, inline)]
If a @ in a skeleton is followed by a > on the same line, then the
integer buffer position recorded in skeleton-positions will no longer
correspond to the original location of the @ relative to the surrounding
text.  For example, in Elisp mode, write some unfinished sexp like

(progn

place the cursor at the beginning of the next line (unindented), and
execute (skeleton-insert '(nil "foo" @ "bar" >)).  The result will be

(progn
  foobar

but if you then execute (goto-char (car skeleton-positions)), the cursor
will end up after the "f" of "foo", rather than in between the "foo" and
"bar" as was almost certainly intended.

I think this would be fixed by storing markers in skeleton-positions
rather than integers.  I can even do this as a manual workaround by
putting it in the skeleton:

(skeleton-insert
  '(nil "foo" @
    '(setq skeleton-positions (mapcar #'copy-marker skeleton-positions))
    "bar" >))

But I think it would be better if this were the default behavior.
Although technically an incompatible change, I suspect that usually the
integers in skeleton-positions are used in ways that also accept a
marker.


In GNU Emacs 30.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.41,
 cairo version 1.18.0) of 2025-12-16 built on lcy02-amd64-070
Repository revision: ff7d3f02b943af29afb1c68a2b31f88441dee928
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Ubuntu 22.04.5 LTS

Configured using:
 'configure --prefix=/snap/emacs/current/usr --with-x-toolkit=gtk3
 --without-xaw3d --with-modules --with-cairo
 --with-native-compilation=aot --without-pgtk --with-xinput2
 --with-tree-sitter 'CFLAGS=-isystem
 /build/emacs/parts/emacs/install/usr/include -isystem
 /build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu -isystem
 /build/emacs/stage/usr/include -O2' 'CPPFLAGS=-isystem
 /build/emacs/parts/emacs/install/usr/include -isystem
 /build/emacs/parts/emacs/install/usr/include/x86_64-linux-gnu -isystem
 /build/emacs/stage/usr/include'
 'LDFLAGS=-L/build/emacs/parts/emacs/install/lib
 -L/build/emacs/parts/emacs/install/usr/lib
 -L/build/emacs/parts/emacs/install/lib/x86_64-linux-gnu
 -L/build/emacs/parts/emacs/install/usr/lib/x86_64-linux-gnu
 -L/build/emacs/stage/usr/lib''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: ELisp/l

Minor modes in effect:
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  auto-revert-mode: t
  etags-regen-mode: t
  TeX-PDF-mode: t
  TeX-source-correlate-mode: t
  windmove-mode: t
  recentf-mode: t
  server-mode: t
  pixel-scroll-precision-mode: t
  auto-insert-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/shulman/.emacs.d/elpa/git-commit-20240623.1335/git-commit hides
/home/shulman/.emacs.d/elpa/magit-20251217.1836/git-commit
/home/shulman/.emacs.d/elpa/transient-20251215.2209/transient hides
/snap/emacs/current/usr/share/emacs/30.2/lisp/transient

Features:
(shadow sort mail-extr emacsbug mule-util jka-compr vc-hg vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs log-view bug-reference face-remap
magit-submodule magit-blame magit-stash magit-reflog magit-bisect
magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func magit-diff
smerge-mode diff git-commit log-edit message sendmail yank-media puny
dired dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config
gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log magit-core magit-margin magit-transient
debug backtrace dabbrev pulse color find-func xref mmm-noweb mmm-sample
shortdoc cl-print help-fns radix-tree misearch multi-isearch vc-git
diff-mode track-changes reftex-dcr reftex-auc reftex reftex-loaddefs
reftex-vars preview noutline outline tex-mode mmm-mode mmm-univ rng-xsd
xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse
nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode
nxml-outln nxml-rap sgml-mode facemenu dom nxml-util nxml-enc xmltok
magit-process with-editor shell pcomplete magit-mode transient pp
benchmark magit-git magit-base magit-section format-spec cursor-sensor
llama comp-run cond-let compat magit-autorevert autorevert filenotify
etags-regen pretext-mode mmm-cmds mmm-class mmm-region mmm-auto mmm-vars
mmm-utils mmm-compat imenu-list hideshow imenu treesit cram-mode
ocamlformat vc vc-dispatcher opam-user-setup agda2-mode derived
agda2-queue agda2-abbrevs agda2-highlight agda-input quail annotation
eri time-date agda2 abc-mode align skeleton font-latex latex easy-mmode
edmacro kmacro latex-flymake flymake project compile
text-property-search comint ansi-osc ansi-color thingatpt tex-ispell
tex-style tex dbus xml crm texmathp auctex windmove recentf tree-widget
wid-edit server manoj-dark-theme pixel-scroll cua-base ring cus-load
site-start comp comp-cstr cl-extra help-mode comp-common warnings rx
autoinsert auctex-autoloads tex-site consult-autoloads dash-autoloads
git-commit-autoloads gtags-mode-autoloads imenu-list-autoloads
magit-autoloads pcase magit-section-autoloads llama-autoloads
markdown-mode-autoloads mmm-mode-autoloads proof-general-autoloads
proof-site proof-autoloads transient-autoloads cond-let-autoloads
vterm-autoloads info with-editor-autoloads yaml-mode-autoloads package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs icons
password-cache json subr-x map byte-opt gv bytecomp byte-compile
url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo gtk
x-toolkit xinput2 x multi-tty move-toolbar make-network-process
native-compile emacs)

Memory information:
((conses 16 558606 108273) (symbols 48 28772 0)
 (strings 32 109079 15200) (string-bytes 1 3256863) (vectors 16 63351)
 (vector-slots 8 1503432 136481) (floats 8 377 257)
 (intervals 56 29866 11) (buffers 992 32))
[Message part 2 (text/html, inline)]

This bug report was last modified 9 days ago.

Previous Next


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