From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eliza Velasquez via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#25547: 25.1.91; emacsclient -c creates frames on the wrong display Date: Fri, 6 Nov 2020 11:14:42 -0800 Message-ID: References: <834km39h7t.fsf@gnu.org> Reply-To: Eliza Velasquez Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35120"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 25547@debbugs.gnu.org, Alex Hutcheson , Stefan Monnier To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 06 20:15:14 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 1kb7Ca-0008vF-3U for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 20:15:12 +0100 Original-Received: from localhost ([::1]:37066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kb7CY-0003tC-NL for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 14:15:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kb7CR-0003t2-2r for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 14:15:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kb7CQ-0002rk-Pt for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 14:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kb7CQ-0006BU-LK for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 14:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eliza Velasquez Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Nov 2020 19:15:02 +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.160469010123746 (code B ref 25547); Fri, 06 Nov 2020 19:15:02 +0000 Original-Received: (at 25547) by debbugs.gnu.org; 6 Nov 2020 19:15:01 +0000 Original-Received: from localhost ([127.0.0.1]:57315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kb7CP-0006Av-BH for submit@debbugs.gnu.org; Fri, 06 Nov 2020 14:15:01 -0500 Original-Received: from mail-il1-f176.google.com ([209.85.166.176]:38914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kb7CN-0006AW-ON for 25547@debbugs.gnu.org; Fri, 06 Nov 2020 14:15:00 -0500 Original-Received: by mail-il1-f176.google.com with SMTP id q1so1998999ilt.6 for <25547@debbugs.gnu.org>; Fri, 06 Nov 2020 11:14:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sgBYtAx5RADk8Sw/7Pbrdvr4PkhmQt29u2SArwcdeaI=; b=YNCl6H4kq4iqNuvRMWTw2mZlhyYoOWfgNaVfEsJgu/tgVn6eyt8BB6mrI0NFrmsq6k OOz5i5BLycNXyIUR4K/AT5ahHT/Ig6MBE6BFwwRxQa2j3ziSPWuNfQ+dcf/BPxyvch4F 1+LH7b1TXHnNL5RezkK9xe7RKIHEFUyakHOCSY+aaYMzSOiCGrucdy9sCn58RzpMc+Zb ZxFCSiz1FVZUHoZnVj5pS7sYX1baPACDsLB0ZSpn8a73lz8KVo01KCXcG5dECbOqixQR DXEpDm03s+5hqbb7qFgL8r0mM2ekcXeon3i4QbZ8iUpU6C5fy9NUL98bGd9f6hJLsU3D R7eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sgBYtAx5RADk8Sw/7Pbrdvr4PkhmQt29u2SArwcdeaI=; b=VrLXGvUs/8yB++huRxf7wBCGJd8ngEa4lP7bMp0Agn6jTWsML/B5Qgo1yZLt4ljuhy 2bV+dpEU57K1140rNPro4RIfmiHQWPM9Gy6ZEQZqYe1XwXHH2Z56bBV41cJxl8y9q0P5 e9RWIb5Adc4aYtsnfb+yzoNPk//67TZDYbXbBYu/RTOfOrWPh4rhWuPWMpVH1N+vLmrj VmPIFgSArhm2YNCNceaLaNiDdOf/MzrHAMsLwm9wtL4UNXjFmLpHAXRhPf+iQ6KN3bWe TtNxxmG4zQMSjOj3luAR5EUGMGL2OPxAy3Ng7OrIHdz7AZ92FhQtQqunb0zJEzgdEsNe O15w== X-Gm-Message-State: AOAM5320R0VTq0bv597mYOm/jOk7bTu9tZ4IgwF7fMVK6rP32VV3Y0dc XGnizs1M2JIJVgIBx13Yqy+JXhYapza1AdbxOa2k5Q== X-Google-Smtp-Source: ABdhPJxoTaAb2xyaFMIDNSSBwJz9NcWXKYh8ySqG3cUHMKVOJHil3kGrMB1OZptprqZR2+TRQAyYz7sQ/oJVhgvQxiQ= X-Received: by 2002:a92:ddc6:: with SMTP id d6mr2163466ilr.99.1604690093744; Fri, 06 Nov 2020 11:14:53 -0800 (PST) In-Reply-To: <834km39h7t.fsf@gnu.org> 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:192795 Archived-At: 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. 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. On Thu, Nov 5, 2020 at 9:39 PM Eli Zaretskii wrote: > > > Cc: 25547@debbugs.gnu.org, Alex Hutcheson > > Date: Thu, 5 Nov 2020 15:41:08 -0800 > > From: Eliza Velasquez via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > > > > +(defun server-create-frame (nowait proc &optional parameters) > > This function's name is too general, and therefore will confuse > someone who tries to learn how server.el works. Please name it > according to the convention used by 2 other functions in server.el > that create GUI and TTY frames. > > Btw, why can't you use server-create-tty-frame here? IOW, I don't > think I understand this comment: > > > + ((equal tty-type "dumb") > > + ;; Dumb terminals should create frames without > > + ;; preference for tty or window system (bug#25547) > > + (server-create-frame nowait proc frame-parameters)) > > Thanks.