From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#427: 23.0.60; emacsclient -t not working within "less" Date: Thu, 18 Sep 2008 23:28:17 -0700 (PDT) Message-ID: <200809190628.m8J6SHQX000229__23930.239005904$1221806955$gmane$org@mothra.ics.uci.edu> References: <87skrxz4h0.fsf@cyd.mit.edu> Reply-To: Dan Nicolaescu , 427@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1221806892 14906 80.91.229.12 (19 Sep 2008 06:48:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2008 06:48:12 +0000 (UTC) Cc: 427@emacsbugs.donarmstrong.com, emacs-devel@gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 19 08:49:08 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KgZng-0005xM-2Y for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2008 08:49:08 +0200 Original-Received: from localhost ([127.0.0.1]:45582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgZme-0005mK-Un for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Sep 2008 02:48:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgZmI-0005XL-NY for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 02:47:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgZmG-0005WV-J8 for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 02:47:41 -0400 Original-Received: from [199.232.76.173] (port=53823 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgZmG-0005WS-DZ for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 02:47:40 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:33203) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KgZmF-0007NJ-Rz for bug-gnu-emacs@gnu.org; Fri, 19 Sep 2008 02:47:40 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8J6lZA2024182; Thu, 18 Sep 2008 23:47:37 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m8J6Z4QM019440; Thu, 18 Sep 2008 23:35:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 19 Sep 2008 06:35:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 427 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 427-submit@emacsbugs.donarmstrong.com id=B427.122180571117459 (code B ref 427); Fri, 19 Sep 2008 06:35:04 +0000 Original-Received: (at 427) by emacsbugs.donarmstrong.com; 19 Sep 2008 06:28:31 +0000 Original-Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8J6SSiC017450 for <427@emacsbugs.donarmstrong.com>; Thu, 18 Sep 2008 23:28:29 -0700 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by barrelv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m8J6SIjW021498; Thu, 18 Sep 2008 23:28:18 -0700 (PDT) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id m8J6SHQX000229; Thu, 18 Sep 2008 23:28:17 -0700 (PDT) In-Reply-To: <87skrxz4h0.fsf@cyd.mit.edu> (Chong Yidong's message of "Thu, 18 Sep 2008 14:36:11 -0400") Original-Lines: 31 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: m8J6SIjW021498 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 19 Sep 2008 02:47:41 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:20639 Archived-At: Chong Yidong 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.