From: Dan Nicolaescu <dann@ics.uci.edu>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 427@emacsbugs.donarmstrong.com, emacs-devel@gnu.org
Subject: bug#427: 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__23930.239005904$1221806955$gmane$org@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.
next parent reply other threads:[~2008-09-19 6:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87skrxz4h0.fsf@cyd.mit.edu>
2008-09-19 6:28 ` Dan Nicolaescu [this message]
2008-09-18 18:36 bug#427: 23.0.60; emacsclient -t not working within "less" Chong Yidong
-- strict thread matches above, loose matches on Subject: below --
2008-06-16 10:32 Andreas Amann
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='200809190628.m8J6SHQX000229__23930.239005904$1221806955$gmane$org@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 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).