From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25547: 25.1.91; emacsclient -c creates frames on the wrong display Date: Sat, 07 Nov 2020 10:04:09 +0200 Message-ID: <83v9eh7fuu.fsf@gnu.org> References: <834km39h7t.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2596"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 25547@debbugs.gnu.org, alexhutcheson@google.com, monnier@iro.umontreal.ca To: Eliza Velasquez Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 07 09:05:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbJDi-0000Wm-KJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 09:05:10 +0100 Original-Received: from localhost ([::1]:45966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbJDh-0005cn-8M for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 03:05:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbJDb-0005cf-9f for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 03:05:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46336) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbJDZ-0003jL-Vz for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 03:05:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kbJDZ-0004BO-RC for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 03:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Nov 2020 08:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25547 X-GNU-PR-Package: emacs Original-Received: via spool by 25547-submit@debbugs.gnu.org id=B25547.160473625616023 (code B ref 25547); Sat, 07 Nov 2020 08:05:01 +0000 Original-Received: (at 25547) by debbugs.gnu.org; 7 Nov 2020 08:04:16 +0000 Original-Received: from localhost ([127.0.0.1]:57882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbJCp-0004AN-Nq for submit@debbugs.gnu.org; Sat, 07 Nov 2020 03:04:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbJCo-0004AA-Ua for 25547@debbugs.gnu.org; Sat, 07 Nov 2020 03:04:15 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55060) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbJCj-0003UE-5I; Sat, 07 Nov 2020 03:04:09 -0500 Original-Received: from [176.228.60.248] (port=4276 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kbJCi-0000a7-Ip; Sat, 07 Nov 2020 03:04:08 -0500 In-Reply-To: (message from Eliza Velasquez on Fri, 6 Nov 2020 11:14:42 -0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192815 Archived-At: > From: Eliza Velasquez > Date: Fri, 6 Nov 2020 11:14:42 -0800 > Cc: Stefan Monnier , 25547@debbugs.gnu.org, > Alex Hutcheson > > To answer your second question first, if we try to use > server-create-tty-frame, Emacs will try to run display the frame in > the terminal of the calling client, which it can't do in the case of a > dumb terminal. The next best thing would be to allocate a new frame on > an existing frame's terminal, whether that is on the tty or window > system. Currently a dumb terminal running `emacsclient -c` can only > create new frames on the window system, and this patch should allow it > to create new frames on an existing tty terminal as well (once it's > working correctly). As the initial report suggests, most of the time a > dumb terminal is running `emacsclient -c`, its because it was called > as part of a script in an Emacs subprocess. Thanks for the explanation. > Also, I'll rename the function to something like > (server-create-frame-on-selected-terminal) since I agree its purpose > is not clear from the name. How about server-create-dumb-terminal-frame instead, since that's what it really is?