unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73813: 30.0.91; icomplete-mode keymap unusable in xterm for for/backward completions
@ 2024-10-15  5:44 Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-15 12:27 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-15  5:44 UTC (permalink / raw)
  To: 73813

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]


Hello,

The two keymaps "C-." and "C-," for for/backward icomplete-mode
completions do not work in xterm where emacs is run without the
graphical user interface.

See,

> icomplete.el:177:183:
> (defvar-keymap icomplete-minibuffer-map
>   :doc "Keymap used by `icomplete-mode' in the minibuffer."
>   "C-M-i" #'icomplete-force-complete
>   "C-j"   #'icomplete-force-complete-and-exit
>   "C-."   #'icomplete-forward-completions
>   "C-,"   #'icomplete-backward-completions
>   "<remap> <minibuffer-complete-and-exit>" #'icomplete-ret)

To demonstrate

 1. start at xterm shell prompt, emacs --color=no -nw -Q
 2. use, M-x icomplete-mode
 3. use, M-x man RET fe

the keymaps "C-." and "C-," are received as "." and "," when intending
to move among available icomplete completions, and the presented
completions are unexpectedly lost.

Perhaps, "C-s" and "C-r" could be used in icomplete-mode since they are
received as "C-s" and "C-r" but carry the search for/backward meaning.
The documentation says fido-mode uses the "C-s" and "C-r" keymaps.


The following keymap is a possible workaround



> (keymap-set icomplete-minibuffer-map "C-c ." #'icomplete-forward-completions)
> (keymap-set icomplete-minibuffer-map "C-c ," #'icomplete-backward-completions)




[-- Attachment #2: bug-gnu-emacs report --]
[-- Type: application/octet-stream, Size: 4601 bytes --]

From: xxx@xxx.mail-host-address-is-not-set
To: bug-gnu-emacs@gnu.org
Subject: 30.0.91; icomplete-mode keymap back/forward completions unusable in xterm
X-Debbugs-Cc: 
--text follows this line--




In GNU Emacs 30.0.91 (build 2, x86_64--netbsd, X toolkit, cairo version
 1.18.0) of 2024-09-27 built on xxx
System Description: NetBSD xxx 10.0_STABLE NetBSD 10.0_STABLE (GENERIC) #0: Wed Oct  9 15:29:37 UTC 2024  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

Configured using:
 'configure --srcdir=/u/xxx/src/emacs/30.0.91 --localstatedir=/var
 --disable-autodepend --with-native-compilation --without-ns --with-rsvg
 --without-imagemagick --without-xaw3d --without-toolkit-scroll-bars
 --x-includes=/usr/X11R7/include --x-libraries=/usr/X11R7/lib
 --with-x-toolkit=lu --prefix=/usr/local --build=x86_64--netbsd
 --host=x86_64--netbsd --infodir=/usr/pkg/info --mandir=/usr/pkg/man
 --enable-option-checking=yes 'CFLAGS=-O2 -I/usr/pkg/include/cairo
 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2
 -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0
 -I/usr/pkg/lib/glib-2.0/include -I/usr/X11R7/include
 -I/usr/pkg/include/harfbuzz -I/usr/X11R7/include/libdrm'
 'CPPFLAGS=-DTERMINFO -I/usr/pkg/include -I/usr/include
 -I/usr/pkg/include/freetype2 -I/usr/pkg/include/glib-2.0
 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include
 -I/usr/X11R7/include -I/usr/pkg/include/harfbuzz
 -I/usr/X11R7/include/libdrm' 'LDFLAGS=-Wl,-R/usr/pkg/gcc13/lib
 -Wl,-zrelro -L/usr/pkg/lib -lcairo -L/usr/lib -Wl,-R/usr/lib
 -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib
 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lgnutls''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GNUTLS GSETTINGS HARFBUZZ JPEG LCMS2
LIBOTF LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE PDUMPER PNG RSVG SOUND
SQLITE3 THREADS TIFF TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM LUCID
ZLIB

Important settings:
  value of $LC_COLLATE: en_AU.UTF-8
  value of $LC_CTYPE: en_AU.UTF-8
  value of $LC_MESSAGES: en_AU.UTF-8
  value of $LC_MONETARY: en_AU.UTF-8
  value of $LC_NUMERIC: en_AU.UTF-8
  value of $LC_TIME: en_AU.UTF-8
  value of $LANG: en_AU.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  icomplete-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
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils man
ansi-color cus-start cus-load icomplete cl-loaddefs cl-lib term/xterm
xterm byte-opt gv bytecomp byte-compile 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
kqueue lcms2 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 73261 11139) (symbols 48 7379 0) (strings 32 18162 1988)
 (string-bytes 1 507642) (vectors 16 7683)
 (vector-slots 8 95796 10361) (floats 8 28 11897) (intervals 56 302 0)
 (buffers 992 10))

[-- Attachment #3: Type: text/plain, Size: 10 bytes --]




-- 
vl

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#73813: 30.0.91; icomplete-mode keymap unusable in xterm for for/backward completions
  2024-10-15  5:44 bug#73813: 30.0.91; icomplete-mode keymap unusable in xterm for for/backward completions Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-15 12:27 ` Eli Zaretskii
  2024-10-15 14:07   ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-10-15 12:27 UTC (permalink / raw)
  To: Van Ly; +Cc: 73813

> Date: Tue, 15 Oct 2024 05:44:16 +0000
> From:  Van Ly via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> The two keymaps "C-." and "C-," for for/backward icomplete-mode
> completions do not work in xterm where emacs is run without the
> graphical user interface.

lisp/term/xterm.el claims that C-. and C-, should be supported
starting from xterm version 216 if the modifyOtherKeys resource is set
to 1.  Did you try that?

> Perhaps, "C-s" and "C-r" could be used in icomplete-mode since they are
> received as "C-s" and "C-r" but carry the search for/backward meaning.
> The documentation says fido-mode uses the "C-s" and "C-r" keymaps.

You can bind commands to the keys you like even if by default they
stay unbound.  There's no need to make changes in the default
keybindings because users can bind keys very easily in their own local
configurations.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#73813: 30.0.91; icomplete-mode keymap unusable in xterm for for/backward completions
  2024-10-15 12:27 ` Eli Zaretskii
@ 2024-10-15 14:07   ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-15 14:47     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-15 14:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 73813


Eli Zaretskii <eliz@gnu.org> writes:

>
> lisp/term/xterm.el claims that C-. and C-, should be supported
> starting from xterm version 216 if the modifyOtherKeys resource is set
> to 1.  Did you try that?
>

The local xterm is version 372.  Merging the following .Xresources

  > XTerm*VT100.modifyOtherKeys: 1
  > UXTerm*VT100.modifyOtherKeys: 1

does let emacs receive C-, and C-. for icomplete for/backward completes
to work as expected in the xterm.

> You can bind commands to the keys you like even if by default they
> stay unbound.  There's no need to make changes in the default
> keybindings because users can bind keys very easily in their own local
> configurations.

From the user's perspective, I recall using icomplete-mode first but
couldn't make the completion selector move in xterm,
icomplete-vertical-mode worked because C-n and C-p were received by
emacs in the xterm.

Having in the documentation the need for xterm version 216 or later
with setting "XTerm*VT100.modifyOtherKeys: 1" will help.



-- 
vl





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#73813: 30.0.91; icomplete-mode keymap unusable in xterm for for/backward completions
  2024-10-15 14:07   ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-15 14:47     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2024-10-15 14:47 UTC (permalink / raw)
  To: Van Ly; +Cc: 73813

> From: Van Ly <van.ly@sdf.org>
> Cc: 73813@debbugs.gnu.org
> Date: Tue, 15 Oct 2024 14:07:00 +0000
> 
> Having in the documentation the need for xterm version 216 or later
> with setting "XTerm*VT100.modifyOtherKeys: 1" will help.

I don't know where to document this factoid.  I found it in the
comments inside xterm.el, and I supposed anyone else could find it
there.  Maybe we could add this to the Emacs FAQ?





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-15 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-15  5:44 bug#73813: 30.0.91; icomplete-mode keymap unusable in xterm for for/backward completions Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-15 12:27 ` Eli Zaretskii
2024-10-15 14:07   ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-15 14:47     ` Eli Zaretskii

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).