unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Clemente <n142857@gmail.com>, Paul Eggert <eggert@cs.ucla.edu>
Cc: 71343@debbugs.gnu.org
Subject: bug#71343: 30.0.50; TTY frame doesn't automatically redisplay itself after having closed another frame
Date: Thu, 06 Jun 2024 14:54:02 +0300	[thread overview]
Message-ID: <86o78egucl.fsf@gnu.org> (raw)
In-Reply-To: <CAJKAhPD5ZCp=71qMMqzJn5_YJSa=wYhpZrJ1M7g2M4R=ibu0vw@mail.gmail.com> (message from Daniel Clemente on Mon, 3 Jun 2024 15:33:16 +0000)

> From: Daniel Clemente <n142857@gmail.com>
> Date: Mon, 3 Jun 2024 15:33:16 +0000
> 
> This happens since I started using TTY emacs (with no X support)
> around 2 months ago. It's easy to reproduce but it may have something
> to do with my terminal or window manager.
> 
> The problem is that Emacs doesn't redisplay in one particular case.
> It's just a minor annoyance because I can just press a key or move the
> mouse and the frame will redisplay. But it may hint at some other bug
> that could be worthy of fixing.
> 
> 
> I can consistently do this to reproduce it:
> 
> 1. Launch emacs --daemon -Q
> 2. Using my tiling window manager "wmii", I divide the screen in a
> left part and a right part. Each one has other non-Emacs windows
> 3. In the left side, I press a key to launch a terminal with TTY
> emacs. I use a command like this: urxvtcd -e emacsclient -c &
> 4. I move focus to the right side, I launch another
> terminal+emacsclient with the same command
> 5. Sanity check; verifying that everything works: I move to the left
> terminal and press wmii keys to make the terminal wider or thinner. It
> works as expected, it redisplays; Emacs uses all available space
> inside the X window
> 6. Now I go to the right side. I press a key to kill the terminal
> running emacsclient. Now only the terminal in the left side remains
> 7. I move to the left side (pressing a wmii key) and I press the wmii
> keys to make the terminal wider or thinner (same as step 5). wmii
> obeys, the X windows change size as expected.
> 8. However, the Emacs TTY frame isn't redisplayed: if I made it wider,
> the new area at the right of the frame is shown in black (it sometimes
> shows garbage from previous attempts). The mode line doesn't extend to
> the right. If I make it thinner, the text isn't readjusted to the new
> line length. Etc. The cursor keeps blinking.
> 9. I can keep circulating through other X windows and come back to
> this X window, and try to resize it again. It still doesn't redisplay.
> Pressing Ctrl also doesn't redisplay it
> 10. Only when I press a non-modifier key (e.g. right arrow) or I move
> the mouse, it redisplays and starts using the whole X window
> 
> 
> Note that step 6 is essential. This issue only appears immediately
> after having killed another emacslient. It doesn't happen e.g. after
> killing another type of X window. Or after having shuffled the X
> windows (moving the terminal around, left/right, without killing it).
> It's just after killing a frame.

I'm not sure this is a bug.  Emacs switches to reading input from a
different terminal/keyboard when there's actually some input from that
terminal's keyboard.  In the situation you described, the terminal
whose keyboard was active was killed.  I'm guessing we get SIGHUP in
this case, so we could do something about it, but what exactly should
we do?  Since no other keyboard provided any input, to which keyboard
to switch, and why?

So I think we should not change this behavior, since the "workaround"
is so easy.

Paul, any other ideas or comments?





  parent reply	other threads:[~2024-06-06 11:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 15:33 bug#71343: 30.0.50; TTY frame doesn't automatically redisplay itself after having closed another frame Daniel Clemente
2024-06-03 16:31 ` Eli Zaretskii
2024-06-06 13:22   ` Daniel Clemente
2024-06-06 11:54 ` Eli Zaretskii [this message]
2024-06-06 13:24   ` Daniel Clemente
2024-06-06 13:44     ` Eli Zaretskii
2024-06-16  5:40       ` Daniel Clemente
2024-06-16  6:33         ` Eli Zaretskii
2024-06-21 10:47           ` Daniel Clemente

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86o78egucl.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71343@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=n142857@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).