From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: 23.0.60; emacsclient -t not working within "less" Date: Fri, 19 Sep 2008 19:30:49 +0300 Message-ID: References: <87skrxz4h0.fsf@cyd.mit.edu> <200809190628.m8J6SHQX000229@mothra.ics.uci.edu> <87bpykkuc2.fsf@cyd.mit.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1221841924 13022 80.91.229.12 (19 Sep 2008 16:32:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2008 16:32:04 +0000 (UTC) Cc: dann@ics.uci.edu, andreas.amann@web.de, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 19 18:33:00 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KgiuP-0000Iq-UQ for ged-emacs-devel@m.gmane.org; Fri, 19 Sep 2008 18:32:42 +0200 Original-Received: from localhost ([127.0.0.1]:51422 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgitO-0001jn-AS for ged-emacs-devel@m.gmane.org; Fri, 19 Sep 2008 12:31:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KgitJ-0001jW-Nx for emacs-devel@gnu.org; Fri, 19 Sep 2008 12:31:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KgitH-0001jI-SI for emacs-devel@gnu.org; Fri, 19 Sep 2008 12:31:32 -0400 Original-Received: from [199.232.76.173] (port=55478 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KgitH-0001jF-OE for emacs-devel@gnu.org; Fri, 19 Sep 2008 12:31:31 -0400 Original-Received: from mtaout4.012.net.il ([84.95.2.10]:61690) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KgitH-00084x-Gy for emacs-devel@gnu.org; Fri, 19 Sep 2008 12:31:31 -0400 Original-Received: from HOME-C4E4A596F7 ([77.127.116.246]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K7G00CJNB909K92@i_mtaout4.012.net.il> for emacs-devel@gnu.org; Fri, 19 Sep 2008 19:32:18 +0300 (IDT) In-reply-to: <87bpykkuc2.fsf@cyd.mit.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:103974 Archived-At: > From: Chong Yidong > Date: Fri, 19 Sep 2008 11:51:09 -0400 > Cc: 427-done@emacsbugs.donarmstrong.com, Andreas Amann , > emacs-devel@gnu.org > > Dan Nicolaescu writes: > > > 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. > > That seems to work fine for me too. I checked in the fix. Thanks. Yes, but is this the right fix? The `tty' command prints "/dev/tty" as well in the situation described by the original bug report. Why doesn't Emacs DTRT with that name? Can it fail in a similar way with the name of the device connected to stdout?