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#29713: 26.0; Provide completion for `make-frame-on-display' Date: Thu, 18 Mar 2021 16:36:24 +0200 Message-ID: <835z1oh6l3.fsf@gnu.org> References: <87y310wkzb.fsf@mouse.gnus.org> <875zo4v1t1.fsf@mail.linkov.net> <87eegcwofb.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13524"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 29713@debbugs.gnu.org, larsi@gnus.org, juri@linkov.net To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 18 15:37:19 2021 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 1lMtm3-0003QH-Al for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Mar 2021 15:37:19 +0100 Original-Received: from localhost ([::1]:39682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMtm2-00072g-D4 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Mar 2021 10:37:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMtlr-00072F-IA for bug-gnu-emacs@gnu.org; Thu, 18 Mar 2021 10:37:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMtlm-0000VD-PT for bug-gnu-emacs@gnu.org; Thu, 18 Mar 2021 10:37:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMtlm-00086y-Gf for bug-gnu-emacs@gnu.org; Thu, 18 Mar 2021 10:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Mar 2021 14:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29713 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 29713-submit@debbugs.gnu.org id=B29713.161607820031146 (code B ref 29713); Thu, 18 Mar 2021 14:37:02 +0000 Original-Received: (at 29713) by debbugs.gnu.org; 18 Mar 2021 14:36:40 +0000 Original-Received: from localhost ([127.0.0.1]:47673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMtlQ-00086I-Ho for submit@debbugs.gnu.org; Thu, 18 Mar 2021 10:36:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMtlP-000865-NN for 29713@debbugs.gnu.org; Thu, 18 Mar 2021 10:36:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56203) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMtlJ-0000O2-VH; Thu, 18 Mar 2021 10:36:33 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3509 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lMtlI-0000x5-Ps; Thu, 18 Mar 2021 10:36:33 -0400 In-Reply-To: <87eegcwofb.fsf@tcd.ie> (contovob@tcd.ie) 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:202601 Archived-At: > From: "Basil L. Contovounesios" > Date: Thu, 18 Mar 2021 14:02:00 +0000 > Cc: 29713@debbugs.gnu.org, Lars Ingebrigtsen > > Juri Linkov writes: > > >>> Subject line says it all. Gather the displays using, say, > >>> `x-display-list' and use them as completion candidates. > >>> (I don't use X Window, so I won't have more to say about this.) > > Maybe it could use `x-display-list'. But I don't know how portable it is. > > Is `x-display-list' available on OSX and Windows? > > It's not available on --without-x builds: > > 0. ./src/emacs -Q > 1. M-x toggle-debug-on-error RET > 2. M-x make-frame-on-display RET > Debugger entered--Lisp error: (void-function x-display-list) > > What's TRT here? For which use case? In a build --without-x asking about available displays makes no sense, because such a build cannot possibly access any displays. Right? In a GUI session, the function is always available, although the list it returns might disappoint w32 users... > (interactive (list (completing-read > (format "Make frame on display: ") > (if (fboundp 'x-display-list) > (x-display-list) > (user-error "No connected displays found"))))) > > This will barf before make-frame is called, and pacifies the > byte-compiler warning about x-display-list not being known. > > (interactive (list (completing-read > (format "Make frame on display: ") > (and (fboundp 'x-display-list) > (x-display-list))))) > > This will barf when make-frame is called, with e.g.: > > make-frame: Don’t know how to interpret display "" > make-frame: Don’t know how to interpret display ":0" > > And also pacifies the warning. > > Any preferences or alternative suggestions? make-frame-on-display should signal an error in non-GUI builds.