From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#29713: 26.0; Provide completion for `make-frame-on-display' Date: Thu, 18 Mar 2021 15:09:51 +0000 Message-ID: <874kh8mrb4.fsf@tcd.ie> References: <87y310wkzb.fsf@mouse.gnus.org> <875zo4v1t1.fsf@mail.linkov.net> <87eegcwofb.fsf@tcd.ie> <835z1oh6l3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9859"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 29713@debbugs.gnu.org, larsi@gnus.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 18 16:11:01 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 1lMuIf-0002Rp-46 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Mar 2021 16:11:01 +0100 Original-Received: from localhost ([::1]:41028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMuIe-00050n-34 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Mar 2021 11:11:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMuHi-0004z5-Jo for bug-gnu-emacs@gnu.org; Thu, 18 Mar 2021 11:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36165) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMuHi-0002tm-BI for bug-gnu-emacs@gnu.org; Thu, 18 Mar 2021 11:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lMuHi-0000VH-06 for bug-gnu-emacs@gnu.org; Thu, 18 Mar 2021 11:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Mar 2021 15:10:01 +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.16160802001924 (code B ref 29713); Thu, 18 Mar 2021 15:10:01 +0000 Original-Received: (at 29713) by debbugs.gnu.org; 18 Mar 2021 15:10:00 +0000 Original-Received: from localhost ([127.0.0.1]:47711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMuHg-0000Ux-I1 for submit@debbugs.gnu.org; Thu, 18 Mar 2021 11:10:00 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:39508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lMuHf-0000Ui-00 for 29713@debbugs.gnu.org; Thu, 18 Mar 2021 11:09:59 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id e18so5916086wrt.6 for <29713@debbugs.gnu.org>; Thu, 18 Mar 2021 08:09:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=rhyR1uaUGyIrIwbUpYgHz56uq3cjdWKlG5srb6mr87s=; b=NnArFEuO0/ijmKdDE2Be4jerzFFOlUGgAG5PwuwPuJfNGCvBldvNYcqi1YTYrCs8Oc IzvP73zUhO/xmFoZEIqsjpwGuUFDa948ytEF6LX5DA4PNht1/5gtKHQg3tUpvVTN7yip kp1B3xcMh46PkL+g5Ip+IxavFmTjGiO20kJRlLrONx2Bg21tXxd2fLcvYUPDvOMp1PHP 8ZpxJO4fRtg8mLphfAtYPZMwZX/uznRTH71IVUWvl/1qNznVRa9ABhFaN49XtV7sELzP uWLZ47bjRgwfmT0tVZ3IK7nyiZAD3WYrREDfQsgzLiTmAWME0FB9AzTVCJtV/Sq3dpny UAfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=rhyR1uaUGyIrIwbUpYgHz56uq3cjdWKlG5srb6mr87s=; b=nHdgACqcY0LiwQnyamIeWQG864GRjzELnCNYlOci/IkkRiR3PXjCRATXPiuAaRePKL XFNsrSQ8UgbqVw8O9NhfmuPaZc6joLxn294NmKXXdtZ6dSc4EjmUHIfxoPIOibXKl1e8 tJ7dj3/ITkHa4uCUX8oKRihUW8G9pFLq+IKxhAlmxNRf0zw/TIKpgG5Je8WZXiHceSC1 VeFY6ie5LLi7HaojHagE8PeeGmwp/gfsnr4y76RH8OytW9IAp3q282SoFbmbVOQdV7NG Go2piJ+74ef/9ym5AexoCBhzc3L9jFcc3IBn1gdPAJAZqTmEtj1f8XbyKJzyPd2FDNH1 bwJw== X-Gm-Message-State: AOAM532eld3wNnEhn9iqLVTopryBBmJTsJuu+jlQHk5VgCowRHli3WEz curDLVyEAPUHv07Hy7QaJPn4QA== X-Google-Smtp-Source: ABdhPJx6JTtrj253f1GrTooYz7j9sRk/w9ttOnkRFLA9xf0IW0MG+9ISgWJpbTct7cNtXC9PyFvF3Q== X-Received: by 2002:a05:6000:10c3:: with SMTP id b3mr10066210wrx.96.1616080193255; Thu, 18 Mar 2021 08:09:53 -0700 (PDT) Original-Received: from localhost ([51.37.106.140]) by smtp.gmail.com with ESMTPSA id i3sm3426838wra.66.2021.03.18.08.09.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Mar 2021 08:09:52 -0700 (PDT) In-Reply-To: <835z1oh6l3.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Mar 2021 16:36:24 +0200") 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:202603 Archived-At: Eli Zaretskii writes: >> From: "Basil L. Contovounesios" >> Date: Thu, 18 Mar 2021 14:02:00 +0000 >> Cc: 29713@debbugs.gnu.org, Lars Ingebrigtsen >>=20 >> It's not available on --without-x builds: >>=20 >> 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) >>=20 >> What's TRT here? > > For which use case? That wherein a user unwittingly invokes M-x make-frame-on-display in a non-GUI build. It's a very minor issue, but I think it's better if the error message alludes to this operation being unsupported, rather than complaining that x-display-list is void. > In a build --without-x asking about available displays makes no sense, > because such a build cannot possibly access any displays. Right? Right (AFAIK). > In a GUI session, the function is always available, although the list > it returns might disappoint w32 users... Is there a better option on w32? >> (interactive (list (completing-read >> (format "Make frame on display: ") >> (if (fboundp 'x-display-list) >> (x-display-list) >> (user-error "No connected displays found"))))) >>=20 >> This will barf before make-frame is called, and pacifies the >> byte-compiler warning about x-display-list not being known. >>=20 >> (interactive (list (completing-read >> (format "Make frame on display: ") >> (and (fboundp 'x-display-list) >> (x-display-list))))) >>=20 >> This will barf when make-frame is called, with e.g.: >>=20 >> make-frame: Don=E2=80=99t know how to interpret display "" >> make-frame: Don=E2=80=99t know how to interpret display ":0" >>=20 >> And also pacifies the warning. >>=20 >> Any preferences or alternative suggestions? > > make-frame-on-display should signal an error in non-GUI builds. Agreed, but are you sanctioning the first option above, or either option, so long as some error is signalled? Thanks, --=20 Basil