all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 427@emacsbugs.donarmstrong.com, emacs-devel@gnu.org
Subject: Re: 23.0.60; emacsclient -t not working within "less"
Date: Thu, 18 Sep 2008 23:28:17 -0700 (PDT)	[thread overview]
Message-ID: <200809190628.m8J6SHQX000229@mothra.ics.uci.edu> (raw)
In-Reply-To: <87skrxz4h0.fsf@cyd.mit.edu> (Chong Yidong's message of "Thu, 18 Sep 2008 14:36:11 -0400")

Chong Yidong <cyd@stupidchicken.com> writes:

  > From bug 427:
  > 
  > > 1) start emacs with "emacs -q -f server-start &"
  > > 2) export VISUAL="emacsclient -t"
  > > 2) less .bashrc
  > > 3) within less type "v" to edit file with $VISUAL 
  > >
  > > the result is that less writes a line "!emacsclient -t +18 .bashrc" on
  > > the terminal, but other than that the terminal is still showing the
  > > output of less. emacsclient is not taking over the terminal, and no
  > > editing is possible.
  > 
  > This looks like a serious bug that needs to be addressed.  Does anyone
  > have a clue about how to fix/debug this?

You can edebug `server-process-filter'.  Doing that shows quickly the
problem: emacsclient passes the tty as: -tty /dev/tty.
/dev/tty means one thing for emacsclient and another one for emacs...

emacsclient.c computes the tty like this:

      tty_name = ttyname (fileno (stdin));

changing it to:

      tty_name = ttyname (fileno (stdout));

gets the right terminal and this problem seems to be fixed.





  parent reply	other threads:[~2008-09-19  6:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 18:36 23.0.60; emacsclient -t not working within "less" Chong Yidong
2008-09-19  6:28 ` bug#427: " Dan Nicolaescu
2008-09-19  6:28 ` Dan Nicolaescu [this message]
2008-09-19 15:51   ` Chong Yidong
2008-06-16 10:32     ` bug#427: " Andreas Amann
2008-09-19 16:00       ` bug#427: marked as done (23.0.60; emacsclient -t not working within "less") Emacs bug Tracking System
2008-09-19 16:30     ` 23.0.60; emacsclient -t not working within "less" Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=200809190628.m8J6SHQX000229@mothra.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=427@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.