diff options
| author | Karoly Lorentey | 2004-02-27 14:10:47 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-02-27 14:10:47 +0000 |
| commit | 2fc0cf2aefa777e5fe48596e2d43774b28051931 (patch) | |
| tree | c5826974f491e92ac7e388f65e2a1c09959cc2c3 | |
| parent | f70dd00951e9a5d0bf301398a991ea2d212ed376 (diff) | |
| download | emacs-2fc0cf2aefa777e5fe48596e2d43774b28051931.tar.gz emacs-2fc0cf2aefa777e5fe48596e2d43774b28051931.zip | |
Make emacsclient refuse to create a frame inside an Emacs term buffer.
lib-src/emacsclient.c (main): Exit with failure if the terminal type
is `eterm' (Emacs term buffer).
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-104
| -rw-r--r-- | README.multi-tty | 18 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 24 |
2 files changed, 33 insertions, 9 deletions
diff --git a/README.multi-tty b/README.multi-tty index dc5211cc2b1..68cae7a2060 100644 --- a/README.multi-tty +++ b/README.multi-tty | |||
| @@ -246,13 +246,6 @@ THINGS TO DO | |||
| 246 | why raw terminal support is broken again. I really do need to | 246 | why raw terminal support is broken again. I really do need to |
| 247 | understand input.) | 247 | understand input.) |
| 248 | 248 | ||
| 249 | ** emacsclient -t from an Emacs term buffer does not work, complains | ||
| 250 | about face problems. This can even lock up Emacs (if the recursive | ||
| 251 | frame sets single_kboard). Update: the face problems are caused by | ||
| 252 | bugs in term.el, not in multi-tty. The lockup is caused by | ||
| 253 | single_kboard mode, and is not easily solvable. The best thing to | ||
| 254 | do is to simply refuse to create a tty frame of type `eterm'. | ||
| 255 | |||
| 256 | ** Maybe standard-display-table should be display-local. | 249 | ** Maybe standard-display-table should be display-local. |
| 257 | 250 | ||
| 258 | DIARY OF CHANGES | 251 | DIARY OF CHANGES |
| @@ -663,4 +656,15 @@ DIARY OF CHANGES | |||
| 663 | narrow_foreground_group. tcsetpgrp blocks if it is called from a | 656 | narrow_foreground_group. tcsetpgrp blocks if it is called from a |
| 664 | process that is not in the same process group as the tty.) | 657 | process that is not in the same process group as the tty.) |
| 665 | 658 | ||
| 659 | -- emacsclient -t from an Emacs term buffer does not work, complains | ||
| 660 | about face problems. This can even lock up Emacs (if the recursive | ||
| 661 | frame sets single_kboard). Update: the face problems are caused by | ||
| 662 | bugs in term.el, not in multi-tty. The lockup is caused by | ||
| 663 | single_kboard mode, and is not easily solvable. The best thing to | ||
| 664 | do is to simply refuse to create a tty frame of type `eterm'. | ||
| 665 | |||
| 666 | (Fixed, changed emacsclient to check for TERM=eterm. The face | ||
| 667 | complaints seem to be caused by bugs in term.el; they are not | ||
| 668 | related to multi-tty.) | ||
| 669 | |||
| 666 | ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d | 670 | ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index f41315b1248..c1c8ee8f160 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -588,15 +588,35 @@ To start the server in Emacs, type \"M-x server-start\".\n", | |||
| 588 | if (tty) | 588 | if (tty) |
| 589 | { | 589 | { |
| 590 | char *tty_name = ttyname (fileno (stdin)); | 590 | char *tty_name = ttyname (fileno (stdin)); |
| 591 | char *type = getenv ("TERM"); | ||
| 592 | |||
| 591 | if (! tty_name) | 593 | if (! tty_name) |
| 592 | fail (); | 594 | { |
| 595 | fprintf (stderr, "%s: could not get terminal name\n", progname); | ||
| 596 | fail (); | ||
| 597 | } | ||
| 598 | |||
| 599 | if (! type) | ||
| 600 | { | ||
| 601 | fprintf (stderr, "%s: please set the TERM variable to your terminal type\n", | ||
| 602 | progname); | ||
| 603 | fail (); | ||
| 604 | } | ||
| 605 | |||
| 606 | if (! strcmp (type, "eterm")) | ||
| 607 | { | ||
| 608 | /* This causes nasty, MULTI_KBOARD-related input lockouts. */ | ||
| 609 | fprintf (stderr, "%s: opening a frame in an Emacs term buffer" | ||
| 610 | " is not supported\n", progname); | ||
| 611 | fail (); | ||
| 612 | } | ||
| 593 | 613 | ||
| 594 | init_signals (); | 614 | init_signals (); |
| 595 | 615 | ||
| 596 | fprintf (out, "-tty "); | 616 | fprintf (out, "-tty "); |
| 597 | quote_file_name (tty_name, out); | 617 | quote_file_name (tty_name, out); |
| 598 | fprintf (out, " "); | 618 | fprintf (out, " "); |
| 599 | quote_file_name (getenv("TERM"), out); | 619 | quote_file_name (type, out); |
| 600 | fprintf (out, " "); | 620 | fprintf (out, " "); |
| 601 | } | 621 | } |
| 602 | 622 | ||