unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Juri Linkov <juri@linkov.net>
Cc: 29713@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#29713: 26.0; Provide completion for `make-frame-on-display'
Date: Thu, 18 Mar 2021 14:02:00 +0000	[thread overview]
Message-ID: <87eegcwofb.fsf@tcd.ie> (raw)
In-Reply-To: <875zo4v1t1.fsf@mail.linkov.net> (Juri Linkov's message of "Sun,  14 Jul 2019 22:46:28 +0300")

Juri Linkov <juri@linkov.net> 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?

  (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?

Thanks,

-- 
Basil





  parent reply	other threads:[~2021-03-18 14:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 20:40 bug#29713: 26.0; Provide completion for `make-frame-on-display' Drew Adams
2019-07-14 18:04 ` Lars Ingebrigtsen
2019-07-14 19:46   ` Juri Linkov
2019-07-14 22:17     ` Drew Adams
2019-07-15 10:14     ` Robert Pluim
2019-07-15 22:09     ` Juri Linkov
2021-03-18 14:02     ` Basil L. Contovounesios [this message]
2021-03-18 14:36       ` Eli Zaretskii
2021-03-18 15:09         ` Basil L. Contovounesios
2021-03-18 15:50           ` Eli Zaretskii
2021-03-18 17:04       ` Juri Linkov
2021-03-18 17:32         ` Juri Linkov
2021-03-24 21:59           ` Basil L. Contovounesios
2021-03-25  6:16             ` Eli Zaretskii
2021-03-25  9:38               ` Juri Linkov
2021-03-26 17:42                 ` Basil L. Contovounesios
2021-03-24 21:57         ` Basil L. Contovounesios

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eegcwofb.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=29713@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).