GNU bug report logs - #76691
`display-monitor-attributes-list` not working properly on macOS

Previous Next

Package: emacs;

Reported by: Ruiyang Wu <ywwry66 <at> gmail.com>

Date: Sun, 2 Mar 2025 21:00:03 UTC

Severity: normal

Tags: confirmed, patch

Merged with 76051

Found in versions 29.4, 30.1, 31.0.50

Done: Alan Third <alan <at> idiocy.org>

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Ruiyang Wu <ywwry66 <at> gmail.com>, 76691 <at> debbugs.gnu.org
Subject: bug#76691: `display-monitor-attributes-list` not working properly on macOS
Date: Tue, 04 Mar 2025 09:10:19 +0200
> I can reproduce this on current master, in other words,
>
>     M-x make-frame-on-monitor RET
>
> doesn't provide any completion candidates.
>
> In `make-frame-on-monitor`, I see that this
>
>     (mapcar (lambda (a)
>               (cdr (assq 'name a)))
>             (display-monitor-attributes-list))
>
> produces this on both macOS and GNU/Linux:
>
>     (nil nil)
>
> So I guess this is not specific to the NS port?
>
> Juri, since you added this command, WDYT?

The command just uses the output of `display-monitor-attributes-list`.
I don't know why `display-monitor-attributes-list` doesn't recognize
monitors on macOS and doesn't return their 'name'.  I tried

(mapcar (lambda (a)
          (cdr (assq 'name a)))
        (display-monitor-attributes-list))

and on GNU/Linux it correctly returns

("HDMI-1" "eDP-1")




This bug report was last modified 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.