unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY
@ 2008-01-26  5:51 Trent W. Buck
  2008-01-26  6:04 ` PEBCAK Trent W. Buck
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Trent W. Buck @ 2008-01-26  5:51 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: Trent W. Buck, rfrancoise


[-- Attachment #1.1: Type: text/plain, Size: 2599 bytes --]

[Please CC me replies, I am not subscribed to the list.]

To summarize: if

  - Emacs is running in a tty
  - $DISPLAY is set, and
  - emacsclient is run in a dumb terminal (M-x shell)

emacsclient will create a new X frame, EVEN WITHOUT the -c switch.

I do not want this.  Within M-x shell, I want emacsclient to open a
buffer in the current frame and window, as it does under Emacs 22.

## Why?  Because I'm connecting remotely to a Screen session that was
## started under X.  New X frames will appear on the original X
## display -- which could be a five hour drive away from the keyboard
## and display I'm actually sitting in front of *now*.  Furthermore, X
## might not even be running anymore -- my Screen sessions persist
## across my X sessions.

Invoking emacsclient as "env -u DISPLAY emacsclient foo" does not
help.  It seems that (setenv "DISPLAY" nil) causes emacsclient to
behave as desired.  However, I do not want to unset $DISPLAY for my
whole Emacs session because then I have to re-enable it to launch X
processes to e.g. view images with display(1).

In GNU Emacs 23.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.12.5)
 of 2008-01-21 on elegiac, modified by Debian
 (emacs-snapshot package, version 1:20080120-1)
configured using `configure  '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.50/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.0.50/leim' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU.utf8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Post

Minor modes in effect:
  xterm-mouse-mode: t
  shell-dirtrack-mode: t
  icomplete-mode: t
  partial-completion-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* PEBCAK
  2008-01-26  5:51 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY Trent W. Buck
@ 2008-01-26  6:04 ` Trent W. Buck
  2008-01-26 19:10 ` 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY Stefan Monnier
  2008-01-27  0:44 ` Richard Stallman
  2 siblings, 0 replies; 5+ messages in thread
From: Trent W. Buck @ 2008-01-26  6:04 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: rfrancoise


[-- Attachment #1.1: Type: text/plain, Size: 866 bytes --]

On Sat, Jan 26, 2008 at 04:51:32PM +1100, Trent W. Buck wrote:
> emacsclient will create a new X frame, EVEN WITHOUT the -c switch.
> 
> I do not want this.  Within M-x shell, I want emacsclient to open a
> buffer in the current frame and window, as it does under Emacs 22.
> 
> ## Why?  Because I'm connecting remotely to a Screen session that was
> ## started under X.  New X frames will appear on the original X
> ## display -- which could be a five hour drive away from the keyboard
> ## and display I'm actually sitting in front of *now*.  Furthermore, X
> ## might not even be running anymore -- my Screen sessions persist
> ## across my X sessions.

Ignore that, PEBCAK.  This does indeed work:

> Invoking emacsclient as "env -u DISPLAY emacsclient foo" does not
> help.

...I had modified the wrong line of my emacsclient wrapper script.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY
  2008-01-26  5:51 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY Trent W. Buck
  2008-01-26  6:04 ` PEBCAK Trent W. Buck
@ 2008-01-26 19:10 ` Stefan Monnier
  2008-01-27  0:44 ` Richard Stallman
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2008-01-26 19:10 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: Trent W. Buck, rfrancoise

> I do not want this.  Within M-x shell, I want emacsclient to open a
> buffer in the current frame and window, as it does under Emacs 22.

I tend to agree with you, and it seems Richard as well, so the default
may change soon.  In the mean time, you can use "emacsclient --display ''".


        Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY
  2008-01-26  5:51 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY Trent W. Buck
  2008-01-26  6:04 ` PEBCAK Trent W. Buck
  2008-01-26 19:10 ` 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY Stefan Monnier
@ 2008-01-27  0:44 ` Richard Stallman
  2008-01-27  1:43   ` Stefan Monnier
  2 siblings, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2008-01-27  0:44 UTC (permalink / raw)
  To: emacs-pretest-bug, rfrancoise, Trent W. Buck
  Cc: trentbuck, emacs-pretest-bug, rfrancoise

      - Emacs is running in a tty
      - $DISPLAY is set, and
      - emacsclient is run in a dumb terminal (M-x shell)

    emacsclient will create a new X frame, EVEN WITHOUT the -c switch.

    I do not want this.  Within M-x shell, I want emacsclient to open a
    buffer in the current frame and window, as it does under Emacs 22.

I agree with you.  The default for emacsclient should always be to use
the terminal Emacs is already using.  It should not be necessary to
use -u to get that behavior; you should get that if you use no
options.

Would someone please fix that, then ack?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY
  2008-01-27  0:44 ` Richard Stallman
@ 2008-01-27  1:43   ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2008-01-27  1:43 UTC (permalink / raw)
  To: rms; +Cc: Trent W. Buck, emacs-pretest-bug, rfrancoise

>       - Emacs is running in a tty
>       - $DISPLAY is set, and
>       - emacsclient is run in a dumb terminal (M-x shell)

>     emacsclient will create a new X frame, EVEN WITHOUT the -c switch.

>     I do not want this.  Within M-x shell, I want emacsclient to open a
>     buffer in the current frame and window, as it does under Emacs 22.

> I agree with you.  The default for emacsclient should always be to use
> the terminal Emacs is already using.  It should not be necessary to
> use -u to get that behavior; you should get that if you use no
> options.

> Would someone please fix that, then ack?

Did it earlier today,


        Stefan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-01-27  1:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-26  5:51 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY Trent W. Buck
2008-01-26  6:04 ` PEBCAK Trent W. Buck
2008-01-26 19:10 ` 23.0.50; mtty emacsclient confused by dumb terminal & DISPLAY Stefan Monnier
2008-01-27  0:44 ` Richard Stallman
2008-01-27  1:43   ` Stefan Monnier

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).