[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Alt-Shift-P freezes XTerm



On Sat, Oct 14, 2023 at 08:38:22AM -0400, Greg Wooledge wrote:
> On Sat, Oct 14, 2023 at 07:07:57AM +0200, tomas@tuxteam.de wrote:
> > On Fri, Oct 13, 2023 at 01:06:20PM -0700, Van Snyder wrote:
> > > I haven't figured out how to unlock the XTerm after accidentally giving
> > > it Alt-Shift-P.
> 
> I'm not seeing whatever it is you're seeing here.  On Debian 12, if I
> launch an xterm (simply "xterm &") with bash running inside it, and
> press Alt-P I get this character: ð
> 
> Shift-Alt-P gives me this character: Ð

Oh, that's interesting. Our setups seem to differ in some way.
What I see with AltGr (not Alt) is Þ, with shift it's þ (this
is Thorn; you are seeing eth)

It seems that your left alt isn't doing Meta and mine does
or something :)

[...]

> > The behaviour [of Alt-Shift-P] is the same if I do "ESC P". Does that "hang your
> > Xterm", too?
> 
> Looks like your bash is in emacs (default) mode.  Pressing Esc P in
> emacs mode triggers this guy:

It is.

> "\eP": do-lowercase-version

Well, we were talking about the uppercase one (remember: alt-shift),
so it is this:

> "\ep": non-incremental-reverse-search-history
> 
>     non-incremental-reverse-search-history (M-p)
>         Search backward through the history starting at the current line
>         using  a  non-incremental  search  for  a string supplied by the
>         user.
> 
> I'm not 100% sure what that means, but maybe you can figure it out if
> you continue experimenting with it.  I don't normally run bash in emacs
> mode myself, so many of these readline features are foreign to me.

I tried to describe what it does, and yes, this matches the behaviour
pretty well: readline (I suppose) prints a colon (I guess this is meant
as a prompt), you may enter some string, and then it searches back in
the history for the last matching command -- so like an incremental
backward search without the incremental bit :-)

> Anyway, all of that's an interesting tangent, but I still don't get
> a "freeze" in xterm from any of this.

Absolutely. To both.

> Van Snyder, can you try running this in your xterm:
> 
>     bind -p | grep P
> 
> That should tell us whether you have any unusual readline bindings
> involving the letter P (capital) which might be at fault here.  In my
> shell, I just have these:
> 
> unicorn:~$ set -o vi
> unicorn:~$ bind -p | grep P
> "P": self-insert
> unicorn:~$ set -o emacs
> unicorn:~$ bind -p | grep P
> "\C-xP": do-lowercase-version
> "\eP": do-lowercase-version
> "P": self-insert

That's what I get too. Now curious as to what Van Snyder gets :-)

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


Reply to: