bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#29713: 26.0; Provide completion for `make-frame-on-display'


From: Eli Zaretskii
Subject: bug#29713: 26.0; Provide completion for `make-frame-on-display'
Date: Thu, 18 Mar 2021 17:50:01 +0200

> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Cc: juri@linkov.net,  29713@debbugs.gnu.org,  larsi@gnus.org
> Date: Thu, 18 Mar 2021 15:09:51 +0000
> 
> > 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?

The w32 build supports only one display.

> >>   (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.
> 
> Agreed, but are you sanctioning the first option above, or either
> option, so long as some error is signalled?

I'm not sure.  The wording of the messages sounds not the best to me.
It should ideally say something like "This Emacs build doesn't support
X displays".





reply via email to

[Prev in Thread] Current Thread [Next in Thread]