unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel McClanahan <danieldmcclanahan@gmail.com>
To: 18931@debbugs.gnu.org
Subject: bug#18931: 24.4; delete-frame suspends tty when running emacs on virtual terminal
Date: Mon, 3 Nov 2014 01:07:07 -0600	[thread overview]
Message-ID: <CALuGEh+Y-NpnaND=bBPp+sGJnWVy93kcEJCPBYRvEXOxpBk7EA@mail.gmail.com> (raw)

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

When delete-frame is called, emacs eventually runs the function
server-delete-client, defined in server.el. In server.el, there is an unless
clause stating in the comments "Delete the client's tty, except on
Windows". This assumes that if the user is using emacs with multiple frames,
those separate frames are running in separate ttys. However, when I
typically
use emacs in multiple frames, those multiple frames are simply in separate
virtual terminals within an X session. As a result, this behavior (deleting
the
tty) is vexing for me, since it makes closing a frame also crash emacs,
which is
running in the same tty (the tty is suspended and when unsuspended with fg,
emacs displays text entered literally (^X and the like are displayed, for
example), but does not respond to M-x or other keybindings).

Obviously, this does not occur (I've checked) if:
1) Emacs is running graphically.
2) Emacs is running in gdb.

To make this occur:
1) Run emacs -nw in a virtual terminal window and start server.
2) Run emacsclient -nw in another virtual terminal.
3) Run delete-frame on the client and observe the behavior in the original
emacs
terminal window.

When I commented out that unless clause and rebuilt emacs the behavior
disappears, so I'm confident I've correctly diagnosed the issue. I've
created a
defcustom in my local version of the development bzr branch of server.el to
allow the user to specify whether this behavior should occur, defaulting to
nil
which enables the current behavior. Would sending a patch of this be
acceptable,
or does the project wish to simply continue the current behavior of
server-delete-client?

[-- Attachment #2: Type: text/html, Size: 1776 bytes --]

             reply	other threads:[~2014-11-03  7:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03  7:07 Daniel McClanahan [this message]
2020-12-04 10:40 ` bug#18931: 24.4; delete-frame suspends tty when running emacs on virtual terminal Lars Ingebrigtsen
2021-05-28  2:23   ` Lars Ingebrigtsen

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='CALuGEh+Y-NpnaND=bBPp+sGJnWVy93kcEJCPBYRvEXOxpBk7EA@mail.gmail.com' \
    --to=danieldmcclanahan@gmail.com \
    --cc=18931@debbugs.gnu.org \
    /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).