Subject: bug#51118: 28.0.50; arrow keys break agda-input quail package since bd5c7404

From: Mauricio Collares <[email-masked]>
Date: Sun, 10 Oct 2021 19:25:48 +0200

Steps to reproduce:

1) Load the agda-input package (available at [1]) and do M-x
set-input-method Agda. This step is not minimized, sorry about that.

2) Type \< (that is, a backslash and a less-than sign) and then press
the right arrow.

Instead of just exiting the special "Quail translation state" (I don't
know the correct term for that; I mean the thing indicated by
underlining), I get the following error.

Lisp error: (wrong-type-argument sequencep right)
  append(right nil)
  quail-add-unread-command-events(right)
  quail-next-translation()
  funcall-interactively(quail-next-translation)
  call-interactively(quail-next-translation)
  quail-start-translation(92)
  quail-input-method(92)

After that, the backslash no longer does anything special, and several
emacs interactions fail in strange ways. I've verified that this does
affect bd5c7404195e45f11946b4e0933a1f8b697d8b87 but not its parent
commit (7bbd6b720e60cb5e726214268c5b80a3e23f799e).

Best regards,
Mauricio

[1] https://github.com/agda/agda/blob/731f300deac14e10792a0bbf22c86cbe0c9c7e4b/src/data/emacs-mode/agda-input.el

=================

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
Repository revision: fc8df2561b8e37089463d0d4d008d73e23cb2dc5
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: NixOS 21.11 (Porcupine)

Configured using:
 'configure
 --prefix=/nix/store/snvpyh9r23i3hr6ndx9mi4w4gzhffkcx-emacs-git-20210918.0
 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
 --with-cairo'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE
XIM XPM GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH: 
  value of $EMACSNATIVELOADPATH: /nix/store/4rbwpac13nknjpayr0c2bl88hhkdya1q-emacs-packages-deps/share/emacs/native-lisp::
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Agda

Minor modes in effect:
  windmove-mode: t
  async-bytecomp-package-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  counsel-projectile-mode: t
  ivy-rich-mode: t
  ivy-mode: t
  pdf-occur-global-minor-mode: t
  bug-reference-prog-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  global-fixmee-mode: t
  fixmee-mode: t
  button-lock-mode: t
  projectile-mode: t
  direnv-mode: t
  doom-modeline-mode: t
  display-time-mode: t
  display-battery-mode: t
  ace-window-display-mode: t
  which-key-mode: t
  key-chord-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Features:
(find-file-in-project windmove vc-mtn vc-hg vc-git vc-bzr vc-src vc-sccs
vc-svn vc-cvs vc-rcs agda2-mode agda2-queue agda2-abbrevs skeleton
agda2-highlight agda-input annotation eri ffap tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat ls-lisp shadow sort
mail-extr face-remap emacsbug paredit outshine outshine-org-cmds outorg
asana helm async-bytecomp helm-global-bindings helm-easymenu helm-source
helm-multi-match helm-lib debbugs soap-client rng-xsd xsd-regexp
yasnippet-snippets yasnippet rg vc vc-dispatcher rg-info-hack rg-menu
rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header arxiv-mode
arxiv-abstract arxiv-query arxiv-vars hydra lv counsel-projectile
counsel xref swiper ivy-rich ivy-avy ivy delsel ivy-faces ivy-overlay
colir smtpmail-async mu4e mu4e-org mu4e-main mu4e-view mu4e-view-gnus
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group
gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7
netrc nnoo gnus-spec gnus-int gnus-range gnus-win mu4e-view-common
mu4e-headers mu4e-compose mu4e-context mu4e-draft mu4e-actions ido
rfc2368 smtpmail sendmail mu4e-mark mu4e-proc mu4e-utils doc-view
mu4e-lists mu4e-message flow-fill mule-util hl-line mu4e-vars mu4e-meta
org-pomodoro alert log4e notifications gntp org-timer org-clock
org-agenda org-journal org-crypt cal-iso org-download async
org-noter-pdftools org-pdftools pdf-annot facemenu pdf-occur tablist
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch
pdf-misc pdf-tools cus-edit cus-load pdf-view magit-bookmark bookmark
jka-compr pdf-cache pdf-info tq pdf-util pdf-macs image-mode exif
org-noter org-board org-attach find-lisp org-web-tools eww xdg url-queue
shr kinsoku svg mm-url gnus nnheader wid-edit esxml-query dom org-caldav
icalendar diary-lib diary-loaddefs org-id org-refile ox-odt rng-loc
rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii
ox-publish ox org-element org-tempo tempo smartparens-org orgit
forge-list forge-commands forge-semi forge-bitbucket buck forge-gogs
gogs forge-gitea gtea forge-gitlab glab forge-github ghub-graphql treepy
gsexp ghub let-alist gnutls forge-notify forge-revnote forge-pullreq
forge-issue forge-topic yaml bug-reference forge-post
smartparens-markdown markdown-mode forge-repo forge forge-core forge-db
closql emacsql-sqlite emacsql emacsql-compiler magit-submodule
magit-obsolete 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 imenu magit-diff
smerge-mode git-commit log-edit message dired dired-loaddefs rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev gmm-utils
pcvs-util add-log magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor shell magit-mode transient
magit-git magit-section magit-utils crm org ob ob-tangle ob-ref ob-lob
ob-table org-macro org-footnote org-src ob-comint org-pcomplete
pcomplete org-list org-faces org-entities org-version ob-emacs-lisp
org-table org-keys org-loaddefs cal-menu calendar cal-loaddefs avl-tree
generator ol ob-exp ob-core org-compat ob-eval org-macs url-dav
parse-time iso8601 time-date url-http url-auth url-gw nsm rmc puny
lean-mode lean-dev lean-right-click lean-message-boxes lean-type
flymake-proc flymake project warnings lean-hole lean-flycheck lean-info
lean-server lean-debug lean-leanpkg lean-syntax lean-input quail
lean-settings lean-util lean-eri pcase flycheck find-func fixmee
string-utils back-button persistent-soft list-utils pcache eieio-base
ucs-utils smartrep nav-flash pulse color button-lock projectile lisp-mnt
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr grep
ibuf-ext ibuffer ibuffer-loaddefs smartparens-config smartparens-text
smartparens idris-mode idris-commands thingatpt idris-hole-list
idris-ipkg-mode compile text-property-search comint ansi-color
idris-tree-info idris-warnings-tree idris-info idris-repl
idris-highlight-input idris-prover inferior-idris idris-warnings
idris-log idris-events pp idris-simple-indent idris-syntax
idris-common-utils idris-settings idris-keys idris-core idris-compat
prop-menu agda2 direnv diff-mode ace-link request mailheader autorevert
filenotify mail-utils restclient noutline outline doom-modeline
doom-modeline-segments doom-modeline-env doom-modeline-core shrink-path
f s dash all-the-icons all-the-icons-faces data-material
data-weathericons data-octicons data-fileicons data-faicons
data-alltheicons spacemacs-dark-theme spacemacs-common time battery dbus
xml enwc format-spec enwc-backend daemons pulseaudio-control ace-window
avy ring exwm-randr xcb-randr exwm exwm-input xcb-keysyms xcb-xkb
exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout
exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types
xcb-debug server undo-tree diff which-key advice use-package-chords
bind-chord key-chord cl-extra help-mode edmacro kmacro use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core tex-site rx cl
info package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd 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 cl-generic 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 charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 723400 66969)
 (symbols 48 64920 28)
 (strings 32 482701 15593)
 (string-bytes 1 12919479)
 (vectors 16 128651)
 (vector-slots 8 2926843 35808)
 (floats 8 1068 674)
 (intervals 56 821 94)
 (buffers 992 19))