all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook
@ 2018-11-26 10:51 Hadrien Lacour
  2020-11-26 12:22 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Hadrien Lacour @ 2018-11-26 10:51 UTC (permalink / raw)
  To: 33513

Hello, by using these two files:
$ cat ~/.emacs
(add-to-list 'load-path "~/.emacs.d/lisp/")
$ cat -A ~/.emacs.d/lisp/term/st.el | sed 's#\$$##'
(message "Registering st keybinds")
(define-key input-decode-map "^[[1;5A" [C-up])
(define-key input-decode-map "^[[1;5B" [C-down])
(define-key input-decode-map "^[[1;5C" [C-right])
(define-key input-decode-map "^[[1;5D" [C-left])
(define-key input-decode-map "^[[1~" [home])
(define-key input-decode-map "^[[4~" [end])

I get the keybinds I want when using emacs -nw with st, but when using
emacs --daemon and emacsclient, these work only the first time:
$ emacs --daemon
$ emacsclient -nw myfile # no problem, close with C-x C-c
$ emacsclient -nw myfile # from here, tty frames don't remember the bindings


In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit)
 of 2018-11-10 built on gentoo-zen2700x
System Description:     Gentoo Base System release 2.6

Recent messages:
Registering st keybinds
When done with a buffer, type C-x # [2 times]
M-[ 1 ; 5 b is undefined [3 times]
previous-line: Beginning of buffer [2 times]
Making completion list... [2 times]
delete-backward-char: Text is read-only [2 times]
user-error: End of history; no default available
user-error: Beginning of history; no preceding item
user-error: End of history; no default available
funcall-interactively: End of buffer

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --disable-silent-rules
 --docdir=/usr/share/doc/emacs-26.1-r3
 --htmldir=/usr/share/doc/emacs-26.1-r3/html --libdir=/usr/lib64
 --program-suffix=-emacs-26 --infodir=/usr/share/info/emacs-26
 --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --without-compress-install --without-hesiod --without-pop
 --with-file-notification=inotify --enable-acl --without-dbus
 --without-modules --without-gameuser --without-gpm --without-kerberos
 --without-kerberos5 --without-lcms2 --without-xml2 --without-mailutils
 --without-selinux --with-gnutls --without-libsystemd --with-threads
 --without-wide-int --with-zlib --with-sound=no --with-x --without-ns
 --without-gconf --without-gsettings --without-toolkit-scroll-bars
 --without-gif --without-jpeg --without-png --without-rsvg
 --without-tiff --with-xpm --without-imagemagick --with-xft
 --without-cairo --without-libotf --without-m17n-flt
 --with-x-toolkit=lucid --without-xaw3d 'CFLAGS=-march=native -pipe -O2'
 CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''

Configured features:
XPM NOTIFY ACL GNUTLS FREETYPE XFT ZLIB LUCID X11 THREADS

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils server time-date elec-pair finder-inf info
tex-site package easymenu epg-config url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars
seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
site-gentoo mule-util tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type 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 elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame 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 minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote inotify dynamic-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 114847 11926)
 (symbols 48 22101 1)
 (miscs 40 52 154)
 (strings 32 34720 1085)
 (string-bytes 1 931459)
 (vectors 16 15307)
 (vector-slots 8 487591 6450)
 (floats 8 58 432)
 (intervals 56 445 56)
 (buffers 992 14))





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

* bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook
  2018-11-26 10:51 bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook Hadrien Lacour
@ 2020-11-26 12:22 ` Lars Ingebrigtsen
  2020-11-26 15:32   ` Hadrien Lacour
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-26 12:22 UTC (permalink / raw)
  To: Hadrien Lacour; +Cc: 33513

Hadrien Lacour <hadrien.lacour@posteo.net> writes:

> (define-key input-decode-map "^[[1;5A" [C-up])

[...]

> I get the keybinds I want when using emacs -nw with st, but when using
> emacs --daemon and emacsclient, these work only the first time:
> $ emacs --daemon
> $ emacsclient -nw myfile # no problem, close with C-x C-c
> $ emacsclient -nw myfile # from here, tty frames don't remember the bindings

(This bug report unfortunately got no response at the time.)

What key stroke is "^[[1;5A" (etc) representing?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook
  2020-11-26 12:22 ` Lars Ingebrigtsen
@ 2020-11-26 15:32   ` Hadrien Lacour
  2020-11-27  8:41     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Hadrien Lacour @ 2020-11-26 15:32 UTC (permalink / raw)
  To: 33513

On Thu, Nov 26, 2020 at 01:22:42PM +0100, Lars Ingebrigtsen wrote:
> Hadrien Lacour <hadrien.lacour@posteo.net> writes:
>
> > (define-key input-decode-map "^[[1;5A" [C-up])
>
> [...]
>
> > I get the keybinds I want when using emacs -nw with st, but when using
> > emacs --daemon and emacsclient, these work only the first time:
> > $ emacs --daemon
> > $ emacsclient -nw myfile # no problem, close with C-x C-c
> > $ emacsclient -nw myfile # from here, tty frames don't remember the bindings
>
> (This bug report unfortunately got no response at the time.)
>
> What key stroke is "^[[1;5A" (etc) representing?
>

Hello

as the line says, "Ctrl + Up arrow". I think I stopped used emacsclient because
of this, actually.

Regards





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

* bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook
  2020-11-26 15:32   ` Hadrien Lacour
@ 2020-11-27  8:41     ` Lars Ingebrigtsen
  2020-11-28  9:12       ` Hadrien Lacour
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-27  8:41 UTC (permalink / raw)
  To: Hadrien Lacour; +Cc: 33513

Hadrien Lacour <hadrien.lacour@posteo.net> writes:

>> > (define-key input-decode-map "^[[1;5A" [C-up])
>>
>> [...]
>>
>> > I get the keybinds I want when using emacs -nw with st, but when using
>> > emacs --daemon and emacsclient, these work only the first time:
>> > $ emacs --daemon
>> > $ emacsclient -nw myfile # no problem, close with C-x C-c
>> > $ emacsclient -nw myfile # from here, tty frames don't remember the bindings
>>
>> (This bug report unfortunately got no response at the time.)
>>
>> What key stroke is "^[[1;5A" (etc) representing?

[...]

> as the line says, "Ctrl + Up arrow". I think I stopped used
> emacsclient because of this, actually.

When I use emacsclient -nw (Debian bullseye), `C-up' works without
altering input-decode-map, so I'm wondering why your terminal is sending
key sequences making it necessary to alter input-decode-map.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook
  2020-11-27  8:41     ` Lars Ingebrigtsen
@ 2020-11-28  9:12       ` Hadrien Lacour
  2020-11-28  9:23         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Hadrien Lacour @ 2020-11-28  9:12 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 33513

On Fri, Nov 27, 2020 at 09:41:37AM +0100, Lars Ingebrigtsen wrote:
> Hadrien Lacour <hadrien.lacour@posteo.net> writes:
>
> >> > (define-key input-decode-map "^[[1;5A" [C-up])
> >>
> >> [...]
> >>
> >> > I get the keybinds I want when using emacs -nw with st, but when using
> >> > emacs --daemon and emacsclient, these work only the first time:
> >> > $ emacs --daemon
> >> > $ emacsclient -nw myfile # no problem, close with C-x C-c
> >> > $ emacsclient -nw myfile # from here, tty frames don't remember the bindings
> >>
> >> (This bug report unfortunately got no response at the time.)
> >>
> >> What key stroke is "^[[1;5A" (etc) representing?
>
> [...]
>
> > as the line says, "Ctrl + Up arrow". I think I stopped used
> > emacsclient because of this, actually.
>
> When I use emacsclient -nw (Debian bullseye), `C-up' works without
> altering input-decode-map, so I'm wondering why your terminal is sending
> key sequences making it necessary to alter input-decode-map.

Most probably because Emacs has some defaults for xterm based terminals, which
st isn't. And Emacs needs those defaults because "C-up" isn't described by
terminfo.

Anyway, that's not really the problem, the bindings shouldn't
disappear. Mind you, I haven't try to reproduce it with the current version,
I'll probably get to it.





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

* bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook
  2020-11-28  9:12       ` Hadrien Lacour
@ 2020-11-28  9:23         ` Eli Zaretskii
  2022-01-29 15:24           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2020-11-28  9:23 UTC (permalink / raw)
  To: Hadrien Lacour; +Cc: larsi, 33513

> Date: Sat, 28 Nov 2020 10:12:58 +0100
> From: Hadrien Lacour <hadrien.lacour@posteo.net>
> Cc: 33513@debbugs.gnu.org
> 
> > >> What key stroke is "^[[1;5A" (etc) representing?
> >
> > [...]
> >
> > > as the line says, "Ctrl + Up arrow". I think I stopped used
> > > emacsclient because of this, actually.
> >
> > When I use emacsclient -nw (Debian bullseye), `C-up' works without
> > altering input-decode-map, so I'm wondering why your terminal is sending
> > key sequences making it necessary to alter input-decode-map.
> 
> Most probably because Emacs has some defaults for xterm based terminals, which
> st isn't. And Emacs needs those defaults because "C-up" isn't described by
> terminfo.

So maybe the way forward is to update lisp/term/st.el with these
sequences?  Currently, we behave as if st is the same as xterm.

> Anyway, that's not really the problem, the bindings shouldn't
> disappear. Mind you, I haven't try to reproduce it with the current version,
> I'll probably get to it.

Please do, perhaps the latest code already fixes this problem.

Thanks.





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

* bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook
  2020-11-28  9:23         ` Eli Zaretskii
@ 2022-01-29 15:24           ` Lars Ingebrigtsen
  2022-01-30  9:44             ` Hadrien Lacour
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-29 15:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 33513, Hadrien Lacour

Eli Zaretskii <eliz@gnu.org> writes:

>> Anyway, that's not really the problem, the bindings shouldn't
>> disappear. Mind you, I haven't try to reproduce it with the current version,
>> I'll probably get to it.
>
> Please do, perhaps the latest code already fixes this problem.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Hadrien, are you still seeing these issues in more recent Emacs
versions? 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook
  2022-01-29 15:24           ` Lars Ingebrigtsen
@ 2022-01-30  9:44             ` Hadrien Lacour
  2022-01-30 16:02               ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Hadrien Lacour @ 2022-01-30  9:44 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 33513

On Sat, Jan 29, 2022 at 04:24:35PM +0100, Lars Ingebrigtsen wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> Anyway, that's not really the problem, the bindings shouldn't
> >> disappear. Mind you, I haven't try to reproduce it with the current version,
> >> I'll probably get to it.
> >
> > Please do, perhaps the latest code already fixes this problem.
> 
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
> 
> Hadrien, are you still seeing these issues in more recent Emacs
> versions? 
> 
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

Hello and sorry for my lack of effort, I reproduced it with Emacs 28.0.91 (built today).





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

* bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook
  2022-01-30  9:44             ` Hadrien Lacour
@ 2022-01-30 16:02               ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-30 16:02 UTC (permalink / raw)
  To: Hadrien Lacour; +Cc: 33513

Hadrien Lacour <hadrien.lacour@posteo.net> writes:

> Hello and sorry for my lack of effort, I reproduced it with Emacs
> 28.0.91 (built today).

No problem; thanks for checking.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2022-01-30 16:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-26 10:51 bug#33513: 26.1; emacsclient forgetting keybinds set by tty-setup-hook Hadrien Lacour
2020-11-26 12:22 ` Lars Ingebrigtsen
2020-11-26 15:32   ` Hadrien Lacour
2020-11-27  8:41     ` Lars Ingebrigtsen
2020-11-28  9:12       ` Hadrien Lacour
2020-11-28  9:23         ` Eli Zaretskii
2022-01-29 15:24           ` Lars Ingebrigtsen
2022-01-30  9:44             ` Hadrien Lacour
2022-01-30 16:02               ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.