all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: 29713@debbugs.gnu.org, larsi@gnus.org, juri@linkov.net
Subject: bug#29713: 26.0; Provide completion for `make-frame-on-display'
Date: Thu, 18 Mar 2021 16:36:24 +0200	[thread overview]
Message-ID: <835z1oh6l3.fsf@gnu.org> (raw)
In-Reply-To: <87eegcwofb.fsf@tcd.ie> (contovob@tcd.ie)

> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Date: Thu, 18 Mar 2021 14:02:00 +0000
> Cc: 29713@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
> 
> 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?

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.





  reply	other threads:[~2021-03-18 14:36 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
2021-03-18 14:36       ` Eli Zaretskii [this message]
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

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

  git send-email \
    --in-reply-to=835z1oh6l3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=29713@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.