Package: emacs;
Reported by: Cass Alexandru <g.cassian.alexandru <at> posteo.eu>
Date: Tue, 15 Jul 2025 12:30:02 UTC
Severity: wishlist
Found in version 30.1
To reply to this bug, email your comments to 79026 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
bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Tue, 15 Jul 2025 12:30:02 GMT) Full text and rfc822 format available.Cass Alexandru <g.cassian.alexandru <at> posteo.eu>
:bug-gnu-emacs <at> gnu.org
.
(Tue, 15 Jul 2025 12:30:03 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Cass Alexandru <g.cassian.alexandru <at> posteo.eu> To: bug-gnu-emacs <at> gnu.org Subject: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Tue, 15 Jul 2025 08:21:56 +0000
1. Steps to reproduce: Type the following in a buffer with `Fundamental` mode: ``` M-x set-input-method RET TeX RET \ab ``` 2. Expected behaviour: `TAB` completes to the only possible option (\above) and inserts `┴`. 3. Actual behaviour: `TAB` pops up the `*Quail Completions*` buffer with the following content, and I need to fully type out `\above` for `┴` to be inserted in the main buffer: ``` Possible completion and corresponding characters are: \ab: - \abo: - \abov: - \above:(1/1) 1.┴ ``` My question is: How can I get the expected behaviour instead of the observed one? In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.2, Xaw3d scroll bars) Windowing system distributor 'The X.Org Foundation', version 11.0.12101016 System Description: NixOS 25.05 (Warbler) Configured using: 'configure --prefix=/nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1 --disable-build-details --with-modules --with-x-toolkit=lucid --with-cairo --without-xft --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --with-xinput2 --without-xwidgets --with-dbus --with-selinux' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG 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 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $EMACSLOADPATH: value of $EMACSNATIVELOADPATH: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: global-git-commit-mode: t magit-auto-revert-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-mode: t server-mode: t desktop-save-mode: t TeX-PDF-mode: t winner-mode: t ido-everywhere: t yas-global-mode: t yas-minor-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-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 buffer-read-only: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/site-start hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/site-lisp/site-start /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/transient-20250306.1916/transient hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/transient /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/bind-key-2.4.1/bind-key hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/bind-key /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/use-package-2.4.6/use-package-diminish hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/use-package/use-package-diminish /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/use-package-2.4.6/use-package hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/use-package/use-package /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/use-package-2.4.6/use-package-core hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/use-package/use-package-core /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/use-package-2.4.6/use-package-ensure-system-package hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/use-package/use-package-ensure-system-package /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/use-package-2.4.6/use-package-delight hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/use-package/use-package-delight /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/use-package-2.4.6/use-package-ensure hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/use-package/use-package-ensure /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/use-package-2.4.6/use-package-jump hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/use-package/use-package-jump /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/use-package-2.4.6/use-package-bind-key hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/use-package/use-package-bind-key /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/use-package-2.4.6/use-package-lint hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/use-package/use-package-lint /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/xref-1.7.0/xref hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/progmodes/xref /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/project-0.11.1/project hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/progmodes/project /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.6/let-alist hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/emacs-lisp/let-alist /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/seq-2.24/seq hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/emacs-lisp/seq /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/compat-30.0.2.0/compat hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/emacs-lisp/compat /nix/store/38farb3b39kgi9ccyfqnjb6iigirgihw-emacs-packages-deps/share/emacs/site-lisp/elpa/eldoc-1.15.0/eldoc hides /nix/store/glh7dkancz0wlk5gh6zii601f0alys2v-emacs-30.1/share/emacs/30.1/lisp/emacs-lisp/eldoc Features: (shadow sort mail-extr emacsbug align debug backtrace ind-util help-macro cl-print shortdoc whitespace files-x mc-edit-lines descr-text direnv mule-util ibuf-ext ibuffer ibuffer-loaddefs vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view vc bug-reference magit-extras 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 pcvs-util add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor magit-mode transient benchmark magit-git magit-base pcmpl-unix tabify help-fns radix-tree cus-edit cus-start cus-load misearch multi-isearch ace-window avy reftex-sel reftex-ref reftex-parse reftex-toc conf-mode make-mode display-line-numbers oc-basic org-element org-persist org-id org-refile org-element-ast avl-tree ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr pixel-fill kinsoku url-file svg gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range message sendmail rfc822 mml mml-sec epa mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util mail-utils range mm-util mail-prsvr ol-docview doc-view image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi smartparens-org org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src sh-script executable ob-comint org-pcomplete org-list org-footnote org-faces org-entities org-version ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-compat org-macs smartparens-python python company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb view lsp-zig lsp-yang lsp-yaml lsp-xml lsp-wgsl lsp-volar lsp-vimscript lsp-vhdl lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v lsp-typespec lsp-typeprof lsp-ttcn3 lsp-ts-query lsp-trunk lsp-toml lsp-tilt lsp-tex lsp-terraform lsp-svelte lsp-steep lsp-sqls lsp-sql lsp-sorbet lsp-solidity lsp-solargraph lsp-semgrep lsp-rust lsp-ruff lsp-ruby-syntax-tree lsp-ruby-lsp lsp-rubocop lsp-roslyn lsp-roc lsp-rf lsp-remark lsp-racket lsp-r lsp-qml lsp-pylsp lsp-pyls lsp-pwsh lsp-purescript lsp-pls lsp-php lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-nushell lsp-nix lsp-nim lsp-nginx lsp-nextflow lsp-move lsp-mojo lsp-mint lsp-meson lsp-mdx lsp-matlab lsp-marksman lsp-markdown lsp-magik lsp-fennel lsp-lua lsp-lisp lsp-kubernetes-helm lsp-kotlin lsp-json lsp-jq lsp-javascript lsp-idris lsp-haxe lsp-haskell lsp-hack lsp-groovy lsp-graphql lsp-golangci-lint lsp-glsl lsp-gleam lsp-gdscript lsp-fsharp lsp-futhark lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elm lsp-elixir lsp-earthly lsp-dockerfile lsp-dhall lsp-d lsp-cypher lsp-cucumber lsp-copilot lsp-css lsp-c3 lsp-csharp lsp-crystal lsp-credo lsp-cobol lsp-cmake lsp-clojure lsp-clangd lsp-bufls lsp-go lsp-completion lsp-beancount lsp-bash lsp-awk lsp-autotools lsp-astro lsp-asm lsp-ansible lsp-angular lsp-ada lsp-semantic-tokens lsp-actionscript smartparens-haskell haskell-mode haskell-cabal haskell-utils haskell-font-lock haskell-indentation haskell-string haskell-sort-imports haskell-lexeme haskell-align-imports haskell-complete-module haskell-ghc-support flymake-proc etags fileloop generator dabbrev haskell-customize agda2-mode agda2-queue agda2-abbrevs skeleton agda2-highlight agda2 annotation eri bibtex-style smartparens-javascript js c-ts-common treesit nix-mode ffap nix-repl nix-shell nix-store nix-log nix-instantiate nix-shebang nix-format nix jka-compr dired-aux hl-line dired dired-loaddefs yank-media smartparens-c cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs autorevert vc-git diff-mode track-changes vc-dispatcher reftex-dcr reftex-auc reftex reftex-loaddefs reftex-vars smartparens-config smartparens-markdown smartparens-text smartparens-latex smartparens-html smartparens loadhist tex-bar toolbar-x tex-mode font-latex latexenc preview global-prefs mediawiki-mode server delsel re-builder desktop frameset crdt gnutls forms forms-mode xdg auctex-latexmk latex latex-flymake flymake tex-ispell tex-style tex dbus xml crm texmathp auctex magma-snippets magma-mode magma-interactive magma-q magma-completion magma-scan term disp-table shell pcomplete ehelp magma-extra autoinsert magma-smie smie magma-font-lock magma-vars rcirc-color rcirc parse-time iso8601 time-date yaml-mode ultra-scroll pixel-scroll cua-base agda-input quail polymode derived poly-lock polymode-base polymode-weave polymode-export polymode-compat polymode-methods polymode-core polymode-classes eieio-custom eieio-base lean4-mode lean4-lake lean4-fringe lean4-dev lean4-info magit-section format-spec cursor-sensor llama lean4-syntax lean4-util lean4-settings compat lean4-eri lsp-mode lsp-protocol tree-widget wid-edit spinner network-stream puny nsm markdown-mode color noutline outline lv inline imenu ht filenotify f s ewoc epg rfc6068 epg-config dash idris-mode idris-commands idris-hole-list idris-ipkg-mode compile text-property-search comint ansi-osc ansi-color idris-tree-info idris-warnings-tree idris-info idris-repl idris-xref xref project 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 iedit iedit-lib mc-hide-unmatched-lines-mode mc-mark-more sgml-mode facemenu dom thingatpt mc-cycle-cursors multiple-cursors-core comp comp-cstr warnings comp-run comp-common rx rect advice winner ring company ido move-text yasnippet edmacro kmacro cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core ace-window-autoloads agda2-mode-autoloads auctex-latexmk-autoloads avy-autoloads cargo-autoloads company-auctex-autoloads auctex-autoloads tex-site company-coq-autoloads company-math-autoloads company-reftex-autoloads company-autoloads crdt-autoloads direnv-autoloads flx-ido-autoloads flx-autoloads flycheck-haskell-autoloads flycheck-rust-autoloads flycheck-autoloads fsharp-mode-autoloads haskell-mode-autoloads highlight-indentation-autoloads htmlize-autoloads idris-mode-autoloads iedit-autoloads lsp-haskell-autoloads lsp-ui-autoloads lsp-mode-autoloads ht-autoloads lv-autoloads magit-autoloads pcase magma-mode-autoloads math-symbol-lists-autoloads move-text-autoloads multiple-cursors-autoloads nix-mode-autoloads magit-section-autoloads llama-autoloads pcre2el-autoloads phi-search-autoloads polymode-autoloads proof-general-autoloads proof-site proof-autoloads prop-menu-autoloads racer-autoloads pos-tip-autoloads rustic-autoloads markdown-mode-autoloads f-autoloads rust-mode-autoloads s-autoloads smartparens-autoloads dash-autoloads spinner-autoloads transient-autoloads info with-editor-autoloads ws-butler-autoloads xelb-autoloads xterm-color-autoloads yaml-mode-autoloads yasnippet-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 dynamic-setting system-font-setting font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 2068960 351359) (symbols 48 74110 0) (strings 32 457206 25309) (string-bytes 1 17653278) (vectors 16 144083) (vector-slots 8 2460867 369307) (floats 8 2888 2727) (intervals 56 93902 101) (buffers 992 371))
bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Tue, 15 Jul 2025 13:54:01 GMT) Full text and rfc822 format available.Message #8 received at 79026 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Cass Alexandru <g.cassian.alexandru <at> posteo.eu>, Stefan Monnier <monnier <at> iro.umontreal.ca>, Arash Esbati <arash <at> gnu.org> Cc: 79026 <at> debbugs.gnu.org Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Tue, 15 Jul 2025 16:53:23 +0300
> Date: Tue, 15 Jul 2025 08:21:56 +0000 > From: Cass Alexandru <g.cassian.alexandru <at> posteo.eu> > > 1. Steps to reproduce: Type the following in a buffer with `Fundamental` > mode: > ``` > M-x set-input-method RET TeX RET > \ab > ``` > 2. Expected behaviour: `TAB` completes to the only possible option > (\above) and inserts `┴`. > > 3. Actual behaviour: `TAB` pops up the `*Quail Completions*` buffer with > the following content, and I need to fully type out `\above` for `┴` to > be inserted in the main buffer: > ``` > Possible completion and corresponding characters are: > \ab: - > \abo: - > \abov: - > \above:(1/1) 1.┴ > ``` > > My question is: How can I get the expected behaviour instead of the > observed one? It doesn't look like quail-completion (which is the command bound to TAB in that input method) is supposed to work as you expect. Instead, it is a fancy visual feedback for typing long sequences, fancier than what Emacs usually shows in the echo-area (which is just the list of candidates for the next character). IOW, after pressing TAB, you are supposed to: . realize that there's just one candidate "\above" . type its characters one by one, guided by the moving highlight in the *Quail Completions* buffer as you go Stefan and Arash, am I right?
bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Tue, 15 Jul 2025 14:12:02 GMT) Full text and rfc822 format available.Message #11 received at 79026 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Cass Alexandru <g.cassian.alexandru <at> posteo.eu> Cc: Arash Esbati <arash <at> gnu.org>, 79026 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca> Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Tue, 15 Jul 2025 17:11:17 +0300
[Please use Reply All to reply, to keep everyone CC'ed.] > Date: Tue, 15 Jul 2025 13:58:41 +0000 > From: Cass Alexandru <g.cassian.alexandru <at> posteo.eu> > > Hi all, > > On 15/07/2025 15:53, Eli Zaretskii wrote: > >> Date: Tue, 15 Jul 2025 08:21:56 +0000 > >> From: Cass Alexandru<g.cassian.alexandru <at> posteo.eu> > >> > >> 1. Steps to reproduce: Type the following in a buffer with `Fundamental` > >> mode: > >> ``` > >> M-x set-input-method RET TeX RET > >> \ab > >> ``` > >> 2. Expected behaviour: `TAB` completes to the only possible option > >> (\above) and inserts `┴`. > >> > >> 3. Actual behaviour: `TAB` pops up the `*Quail Completions*` buffer with > >> the following content, and I need to fully type out `\above` for `┴` to > >> be inserted in the main buffer: > >> ``` > >> Possible completion and corresponding characters are: > >> \ab: - > >> \abo: - > >> \abov: - > >> \above:(1/1) 1.┴ > >> ``` > >> > >> My question is: How can I get the expected behaviour instead of the > >> observed one? > > It doesn't look like quail-completion (which is the command bound to > > TAB in that input method) is supposed to work as you expect. Instead, > > it is a fancy visual feedback for typing long sequences, fancier than > > what Emacs usually shows in the echo-area (which is just the list of > > candidates for the next character). > > > > IOW, after pressing TAB, you are supposed to: > > > > . realize that there's just one candidate "\above" > > . type its characters one by one, guided by the moving highlight in > > the *Quail Completions* buffer as you go > It was suggested to me on the emacs stackexchange > <https://emacs.stackexchange.com/questions/84747/tab-in-minibuffer-when-using-a-quail-input-method-doesnt-complete-the-longest-c> > to report this as a bug, though I suppose it's more of a feature > request, and if I was more proficient in elisp I could perhaps ascertain > how to get the desired behaviour by means of custom function or a > `defadvice`. I do think one could argue that greedy suffix completion on > tab is the desired behaviour in this circumstance, as this is the > behaviour in all other settings where tab-completion is used in emacs > (and unix systems generally). > > > > Stefan and Arash, am I right?
bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Tue, 15 Jul 2025 14:30:02 GMT) Full text and rfc822 format available.Message #14 received at 79026 <at> debbugs.gnu.org (full text, mbox):
From: Stefan Monnier <monnier <at> iro.umontreal.ca> To: Eli Zaretskii <eliz <at> gnu.org> Cc: Cass Alexandru <g.cassian.alexandru <at> posteo.eu>, 79026 <at> debbugs.gnu.org, Arash Esbati <arash <at> gnu.org> Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Tue, 15 Jul 2025 10:29:31 -0400
> It doesn't look like quail-completion (which is the command bound to > TAB in that input method) is supposed to work as you expect. Instead, > it is a fancy visual feedback for typing long sequences, fancier than > what Emacs usually shows in the echo-area (which is just the list of > candidates for the next character). > > IOW, after pressing TAB, you are supposed to: > > . realize that there's just one candidate "\above" > . type its characters one by one, guided by the moving highlight in > the *Quail Completions* buffer as you go > > Stefan and Arash, am I right? I sadly don't know any more than you do about it. I hope Handa would know better. I have wished for a quail completion mechanism based on the usual minibuffer completion, but IIUC it's not completely straightforward. Stefan
bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Wed, 16 Jul 2025 07:55:01 GMT) Full text and rfc822 format available.Message #17 received at 79026 <at> debbugs.gnu.org (full text, mbox):
From: Arash Esbati <arash <at> gnu.org> To: Eli Zaretskii <eliz <at> gnu.org> Cc: Cass Alexandru <g.cassian.alexandru <at> posteo.eu>, 79026 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca> Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Wed, 16 Jul 2025 09:53:51 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes: >> It doesn't look like quail-completion (which is the command bound to >> TAB in that input method) is supposed to work as you expect. Instead, >> it is a fancy visual feedback for typing long sequences, fancier than >> what Emacs usually shows in the echo-area (which is just the list of >> candidates for the next character). >> >> IOW, after pressing TAB, you are supposed to: >> >> . realize that there's just one candidate "\above" >> . type its characters one by one, guided by the moving highlight in >> the *Quail Completions* buffer as you go >> >> Stefan and Arash, am I right? > > I sadly don't know any more than you do about it. Same here, sorry. Best, Arash
bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Wed, 16 Jul 2025 12:08:02 GMT) Full text and rfc822 format available.Message #20 received at 79026 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Arash Esbati <arash <at> gnu.org> Cc: g.cassian.alexandru <at> posteo.eu, 79026 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Wed, 16 Jul 2025 15:07:14 +0300
severity 79026 wishlist thanks > From: Arash Esbati <arash <at> gnu.org> > Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, Cass Alexandru > <g.cassian.alexandru <at> posteo.eu>, 79026 <at> debbugs.gnu.org > Date: Wed, 16 Jul 2025 09:53:51 +0200 > > Stefan Monnier <monnier <at> iro.umontreal.ca> writes: > > >> It doesn't look like quail-completion (which is the command bound to > >> TAB in that input method) is supposed to work as you expect. Instead, > >> it is a fancy visual feedback for typing long sequences, fancier than > >> what Emacs usually shows in the echo-area (which is just the list of > >> candidates for the next character). > >> > >> IOW, after pressing TAB, you are supposed to: > >> > >> . realize that there's just one candidate "\above" > >> . type its characters one by one, guided by the moving highlight in > >> the *Quail Completions* buffer as you go > >> > >> Stefan and Arash, am I right? > > > > I sadly don't know any more than you do about it. > > Same here, sorry. Thanks. I guess this makes this bug report a request for enhancement, since no one has implemented TAB completion for input methods.
Eli Zaretskii <eliz <at> gnu.org>
to control <at> debbugs.gnu.org
.
(Wed, 16 Jul 2025 12:08:02 GMT) Full text and rfc822 format available.bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Wed, 16 Jul 2025 15:10:02 GMT) Full text and rfc822 format available.Message #25 received at 79026 <at> debbugs.gnu.org (full text, mbox):
From: Visuwesh <visuweshm <at> gmail.com> To: Eli Zaretskii <eliz <at> gnu.org> Cc: Arash Esbati <arash <at> gnu.org>, Cass Alexandru <g.cassian.alexandru <at> posteo.eu>, 79026 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca> Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Wed, 16 Jul 2025 20:39:41 +0530
[செவ்வாய் ஜூலை 15, 2025] Eli Zaretskii wrote: > It doesn't look like quail-completion (which is the command bound to > TAB in that input method) is supposed to work as you expect. Instead, > it is a fancy visual feedback for typing long sequences, fancier than > what Emacs usually shows in the echo-area (which is just the list of > candidates for the next character). > > IOW, after pressing TAB, you are supposed to: > > . realize that there's just one candidate "\above" > . type its characters one by one, guided by the moving highlight in > the *Quail Completions* buffer as you go > > Stefan and Arash, am I right? Looking at quail-completion, it only seems to list the possible translations and their keys. There is quail-choose-completion but it seems to be broken (it inserts the same translation twice when trying it with tamil-phonetic), and does not work at all for TeX (maybe because of non-nil TRANSLATION-KEYS (why BTW?)). If it works, then you can click on the translation shown in *Quail Completions* to insert it. I gave a shot implementing a CAPF for Quail but it does not "recontinue" the translation process if one "rejects" the completion completely i.e., using C-g. To try it out, evaluate the following in emacs -Q (defun vz/quail--string (def key) "Return the translation of KEY as specified by DEF." (let ((translation (quail-get-translation (car def) key (length key)))) (if (characterp translation) (string translation) ;; When there are multiple candidates, then a vector is ;; returned. (and (consp translation) (append (cdr translation) nil))))) (defun vz/quail--candidates (key &optional map candidates) "Return an alist of translations and corresponding keys leading from KEY. The optional argument MAP is the `quail-map' for KEY, and CANDIDATES is an internal variable." (let* ((map (or map (quail-lookup-key key nil t))) (map (if (and (symbolp map) (functionp map)) (funcall map key (length key)) map))) ;; If car of MAP is non-nil, then KEY translates to car of MAP. (when (car map) (let ((translation (vz/quail--string map key))) (if (stringp translation) (push (cons translation key) candidates) (dolist (tr translation) (push (cons tr key) candidates))))) ;; If cdr of MAP is non-nil, then the translation continues on ;; forward. (when (cdr map) ;; See `quail-completion-1'. (dolist (rest (if (functionp (cdr map)) (funcall (cdr map)) (cdr map))) (setq candidates (append (vz/quail--candidates (concat key (string (car rest))) (cdr rest)) candidates)))) candidates)) (defun vz/quail--capf () (let ((candidates (vz/quail--candidates quail-current-key))) ;; For `quail-overlay', see `quail-delete-region'. (when (and candidates (overlay-start quail-overlay))) (quail-delete-region) (list (overlay-start quail-overlay) (overlay-end quail-overlay) (completion-table-with-metadata candidates `((annotation-function . ,(lambda (string) (concat "\t← " (cdr (assoc string candidates))))))) :exit-function (lambda (string status) (when (memq status '(finished sole)) ;; Setting to nil is required for sole candidate. (setq quail-current-str nil) (quail-terminate-translation)))))) (defun vz/quail-complete-at-point () (interactive) (let ((completion-at-point-functions (list #'vz/quail--capf))) (completion-at-point))) (with-temp-buffer ;; Load the TeX IM. (let (message-log-max) (activate-input-method "TeX")) (let ((quail-current-package (assoc "TeX" quail-package-alist))) (define-key (nth 5 quail-current-package) (kbd "TAB") #'vz/quail-complete-at-point))) (define-key quail-translation-keymap (kbd "TAB") #'vz/quail-complete-at-point) and say C-u C-\ TeX RET to activate the TeX IM. Then say \al TAB which should pop up the *Completions* buffer from which you can select the desired translation. For reasons I have not explored, M-<up> and M-<down> does not work and kills the completion.
bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Thu, 17 Jul 2025 05:36:02 GMT) Full text and rfc822 format available.Message #28 received at 79026 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Visuwesh <visuweshm <at> gmail.com> Cc: arash <at> gnu.org, g.cassian.alexandru <at> posteo.eu, 79026 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Thu, 17 Jul 2025 08:35:33 +0300
> From: Visuwesh <visuweshm <at> gmail.com> > Cc: Cass Alexandru <g.cassian.alexandru <at> posteo.eu>, Stefan Monnier > <monnier <at> iro.umontreal.ca>, Arash Esbati <arash <at> gnu.org>, > 79026 <at> debbugs.gnu.org > Date: Wed, 16 Jul 2025 20:39:41 +0530 > > [செவ்வாய் ஜூலை 15, 2025] Eli Zaretskii wrote: > > > It doesn't look like quail-completion (which is the command bound to > > TAB in that input method) is supposed to work as you expect. Instead, > > it is a fancy visual feedback for typing long sequences, fancier than > > what Emacs usually shows in the echo-area (which is just the list of > > candidates for the next character). > > > > IOW, after pressing TAB, you are supposed to: > > > > . realize that there's just one candidate "\above" > > . type its characters one by one, guided by the moving highlight in > > the *Quail Completions* buffer as you go > > > > Stefan and Arash, am I right? > > Looking at quail-completion, it only seems to list the possible > translations and their keys. There is quail-choose-completion but it > seems to be broken (it inserts the same translation twice when trying it > with tamil-phonetic), and does not work at all for TeX (maybe because of > non-nil TRANSLATION-KEYS (why BTW?)). TRANSLATION-KEYS non-nil is what makes TAB invoke quail-completion in the first place, right? > If it works, then you can click on the translation shown in *Quail > Completions* to insert it. I think part of the request here is to make it work. But there's also another part: if there's only one completion, TAB should complete it and exit the Quail loop. IOW, the request here is to make quail-completion work as minibuffer completion works elsewhere. If you can come up with a patch to do that (probably optionally, given how quail-completion's original behavior was very different), that'd be appreciated.
bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Thu, 17 Jul 2025 07:48:01 GMT) Full text and rfc822 format available.Message #31 received at 79026 <at> debbugs.gnu.org (full text, mbox):
From: Visuwesh <visuweshm <at> gmail.com> To: Eli Zaretskii <eliz <at> gnu.org> Cc: arash <at> gnu.org, 79026 <at> debbugs.gnu.org, g.cassian.alexandru <at> posteo.eu, monnier <at> iro.umontreal.ca Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Thu, 17 Jul 2025 13:16:54 +0530
[வியாழன் ஜூலை 17, 2025] Eli Zaretskii wrote: >> Looking at quail-completion, it only seems to list the possible >> translations and their keys. There is quail-choose-completion but it >> seems to be broken (it inserts the same translation twice when trying it >> with tamil-phonetic), and does not work at all for TeX (maybe because of >> non-nil TRANSLATION-KEYS (why BTW?)). > > TRANSLATION-KEYS non-nil is what makes TAB invoke quail-completion in > the first place, right? You're right. I didn't notice that the TeX IM had SIMPLE non-nil. >> If it works, then you can click on the translation shown in *Quail >> Completions* to insert it. > > I think part of the request here is to make it work. But there's also > another part: if there's only one completion, TAB should complete it > and exit the Quail loop. I think the problem here is that mouse-2 is not bound to quail-mouse-choose-completion in the translation keymap of TeX IM. This, of course, does not rule out the other bug I talked about. > IOW, the request here is to make quail-completion work as minibuffer > completion works elsewhere. If you can come up with a patch to do > that (probably optionally, given how quail-completion's original > behavior was very different), that'd be appreciated. If there is only one translation for the current key, it should just insert it? I.e., typing TAB after \alph should insert α. If there is more than one, it should complete to the longest possible common key i.e., typing TAB after \app should complete to \approx and the Quail loop would be active. Another TAB from here on would pop up the *Quail Completions* buffer? Did I get it right? I wonder if we can reuse the completion facility for this.
bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Thu, 17 Jul 2025 08:02:01 GMT) Full text and rfc822 format available.Message #34 received at 79026 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Visuwesh <visuweshm <at> gmail.com> Cc: arash <at> gnu.org, 79026 <at> debbugs.gnu.org, g.cassian.alexandru <at> posteo.eu, monnier <at> iro.umontreal.ca Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Thu, 17 Jul 2025 11:00:59 +0300
> From: Visuwesh <visuweshm <at> gmail.com> > Cc: arash <at> gnu.org, g.cassian.alexandru <at> posteo.eu, 79026 <at> debbugs.gnu.org, > monnier <at> iro.umontreal.ca > Date: Thu, 17 Jul 2025 13:16:54 +0530 > > [வியாழன் ஜூலை 17, 2025] Eli Zaretskii wrote: > > > IOW, the request here is to make quail-completion work as minibuffer > > completion works elsewhere. If you can come up with a patch to do > > that (probably optionally, given how quail-completion's original > > behavior was very different), that'd be appreciated. > > If there is only one translation for the current key, it should just > insert it? I.e., typing TAB after \alph should insert α. > > If there is more than one, it should complete to the longest possible > common key i.e., typing TAB after \app should complete to \approx and > the Quail loop would be active. Another TAB from here on would pop up > the *Quail Completions* buffer? Yes, I think so. > Did I get it right? I wonder if we can reuse the completion facility > for this. That's the question, yes.
bug-gnu-emacs <at> gnu.org
:bug#79026
; Package emacs
.
(Thu, 17 Jul 2025 13:00:04 GMT) Full text and rfc822 format available.Message #37 received at 79026 <at> debbugs.gnu.org (full text, mbox):
From: Visuwesh <visuweshm <at> gmail.com> To: Eli Zaretskii <eliz <at> gnu.org> Cc: arash <at> gnu.org, 79026 <at> debbugs.gnu.org, g.cassian.alexandru <at> posteo.eu, monnier <at> iro.umontreal.ca Subject: Re: bug#79026: 30.1; TAB in Minibuffer when using a quail input-method should complete the longest common suffix of candidates Date: Thu, 17 Jul 2025 18:29:33 +0530
[வியாழன் ஜூலை 17, 2025] Eli Zaretskii wrote: >> From: Visuwesh <visuweshm <at> gmail.com> >> Cc: arash <at> gnu.org, g.cassian.alexandru <at> posteo.eu, 79026 <at> debbugs.gnu.org, >> monnier <at> iro.umontreal.ca >> Date: Thu, 17 Jul 2025 13:16:54 +0530 >> >> [வியாழன் ஜூலை 17, 2025] Eli Zaretskii wrote: >> >> > IOW, the request here is to make quail-completion work as minibuffer >> > completion works elsewhere. If you can come up with a patch to do >> > that (probably optionally, given how quail-completion's original >> > behavior was very different), that'd be appreciated. >> >> If there is only one translation for the current key, it should just >> insert it? I.e., typing TAB after \alph should insert α. >> >> If there is more than one, it should complete to the longest possible >> common key i.e., typing TAB after \app should complete to \approx and >> the Quail loop would be active. Another TAB from here on would pop up >> the *Quail Completions* buffer? > > Yes, I think so. > >> Did I get it right? I wonder if we can reuse the completion facility >> for this. > > That's the question, yes. OK, I will see if I can achieve the desired behaviour. For now, can someone confirm if the double-insertion bug in quail-mouse-choose-completion is fixed with the patch at the end? It seems that setting _both_ quail-current-str and choose-completion leads to the double insertion. The code was last changed in commit 35fffde1df8d896c964b6d3b42fff70f4dd1c49b Author: Dave Love <fx <at> gnu.org> Date: Sat Dec 15 16:40:33 2001 +0000 (quail-keyboard-layout-alist): Add pc105-uk. (quail-keyboard-layout-type): Fix :type. (quail-choose-completion-string): Simplify. (quail-update-leim-list-file): Don't get fooled by commented-out code. (quail-input-string-to-events): Run events through translation-table-for-input. where the extra choose-completion-string seems to have added. Before, the comment in quail-choose-completion-string said: ;; Store the completion in `quail-current-str', which will later ;; be converted to a character event list, then inserted into ;; the buffer where completion was requested. and only quail-current-str was set, so I wonder if the call to choose-completion-string is necessary. Here's the promised patch: diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 2b66a0bc0f7..e6fcc2b0cb8 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -2316,10 +2316,6 @@ quail-mouse-choose-completion ;; (select-window owindow)) (quail-delete-region) (setq quail-current-str choice) - ;; FIXME: We need to pass `base-position' here. - ;; FIXME: why do we need choose-completion-string with all its - ;; completion-specific logic? - (choose-completion-string choice buffer) (quail-terminate-translation))) (defun quail-build-decode-map (map-list key decode-map num
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.