Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1208205

Bug#708979: closed by Gioele Barabucci <gioele@svario.it> (Re: Bug#708979: bash (readline): Something is wrong with binding keys to functions)

From Reuben Thomas <rrt@sc3d.org>
Newsgroups linux.debian.bugs.dist
Subject Bug#708979: closed by Gioele Barabucci <gioele@svario.it> (Re: Bug#708979: bash (readline): Something is wrong with binding keys to functions)
Date 2024-08-13 19:50 +0200
Message-ID <Jb3OF-4MfT-3@gated-at.bofh.it> (permalink)
References (4 earlier) <Jb0xr-4Kqv-1@gated-at.bofh.it> <Jb1MR-4L57-3@gated-at.bofh.it> <Jb2SB-4LH4-9@gated-at.bofh.it> <lbbQu-7GC-25@gated-at.bofh.it> <Jb2SB-4LH4-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, 13 Aug 2024 at 17:41, Vincent Lefevre <vincent@vinc17.net> wrote:

> On 2024-08-13 16:28:42 +0100, Reuben Thomas wrote:
> > I'm not quite sure I understand you here: are you saying that it's
> > documented somewhere that one should use the "\e" form?
>
> I'm saying that since the documentation says that the Meta key
> may generate an Escape character (which is actually the case in
> general), you should use the \e form as a consequence.
>

OK, I'm not sure I follow why this should be necessary (e.g. it isn't with
Emacs), but I think I can now follow why it happens!

  convert-meta (On)
>     If  set  to  On, readline will convert characters with the eighth
>     bit set to an ASCII key sequence by stripping the eighth bit  and
>     prefixing it with an escape character (in effect, using escape as
>     the meta prefix).  The default is On, but readline will set it to
>     Off  if  the locale contains eight-bit characters.  This variable
>     is dependent on the LC_CTYPE locale category, and may  change  if
>     the locale is changed.
>

This is also confusing. I read this and thought "OK, so convert-meta should
be On in my UTF-8 locale, because UTF-8 doesn't have 8-bit characters", but
it is off, so I guess UTF-8 counts as having 8-bit characters?

>   enable-meta-key (On)
>     When set to On, readline will try to enable any meta modifier key
>     the terminal claims to support when it is called.  On many termi‐
>     nals, the meta key is used to send eight-bit characters.
>
> (Note: This is wrong, nowadays, the Meta key generates an Escape
> character.)
>

I guess that warrants an upstream bug report; I'm happy to file it.

m.  Fixed a bug that caused "\M-x" style key bindings to not obey the
> setting
>     of the `convert-meta' variable.
>

Aha!

Many thanks for your detailed explanation. I guess the question in 2024 is,
can we have our cake and eat it? I think it would be nice if things worked
as one might reasonably expect (i.e. "\M-" prefixes work as in Emacs) in
UTF-8 locales. I can see that it might be complicated to make them work
also in old terminals. But the convert-meta distinction would seem to be
otiose in wide-character environments.

I'm happy to take this to the readline mailing list if that seems
appropriate; in any case, I guess this Debian bug can be closed, because in
fact it's a deliberate change to readline 5.1.

-- 
https://rrt.sc3d.org

Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Bug#708979: closed by Gioele Barabucci <gioele@svario.it> (Re: Bug#708979: bash (readline): Something is wrong with binding keys to functions) Reuben Thomas <rrt@sc3d.org> - 2024-08-10 17:00 +0200
  Bug#708979: closed by Gioele Barabucci <gioele@svario.it> (Re: Bug#708979: bash (readline): Something is wrong with binding keys to functions) Vincent Lefevre <vincent@vinc17.net> - 2024-08-13 16:20 +0200
    Bug#708979: closed by Gioele Barabucci <gioele@svario.it> (Re: Bug#708979: bash (readline): Something is wrong with binding keys to functions) Reuben Thomas <rrt@sc3d.org> - 2024-08-13 17:40 +0200
      Bug#708979: closed by Gioele Barabucci <gioele@svario.it> (Re: Bug#708979: bash (readline): Something is wrong with binding keys to functions) Vincent Lefevre <vincent@vinc17.net> - 2024-08-13 18:50 +0200
        Bug#708979: closed by Gioele Barabucci <gioele@svario.it> (Re: Bug#708979: bash (readline): Something is wrong with binding keys to functions) Vincent Lefevre <vincent@vinc17.net> - 2024-08-13 19:00 +0200
        Bug#708979: closed by Gioele Barabucci <gioele@svario.it> (Re: Bug#708979: bash (readline): Something is wrong with binding keys to functions) Reuben Thomas <rrt@sc3d.org> - 2024-08-13 19:50 +0200

csiph-web