GNU bug report logs - #65191
29.1; -ms and -cr CL options don't work

Previous Next

Package: emacs;

Reported by: Peter Mao <peter.mao <at> gmail.com>

Date: Thu, 10 Aug 2023 03:02:02 UTC

Severity: normal

Found in version 29.1

To reply to this bug, email your comments to 65191 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Thu, 10 Aug 2023 03:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Mao <peter.mao <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 10 Aug 2023 03:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Mao <peter.mao <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.1; -ms and -cr CL options don't work
Date: Wed, 9 Aug 2023 20:00:43 -0700
[Message part 1 (text/plain, inline)]
Recipe:
emacs-29.1 -Q -ms red -cr green &

- Cursor is not green; mouse pointer is not red.  "-cr" definitely worked in
v28.2, but "-ms" did not.
- This problem does not occur on MacOS -- both "-cr" and "-ms" work
properly (config follows Ubuntu config below)
- On Ubuntu, "-cr" worked in earlier versions of Emacs, but "-ms" did not.
- `set-cursor-color` works properly in all cases
- `set-mouse-color` does not work on Ubuntu, but it does work on OSX.
- Emacs did not crash.

In GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33,
 cairo version 1.16.0) of 2023-07-31 built on chupa
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Ubuntu 22.04.3 LTS

Configured using:
 'configure --with-native-compilation --with-imagemagick
 --with-tree-sitter'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG JSON LCMS2 LIBSELINUX LIBSYSTEMD LIBXML2 MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XINPUT2 XPM
GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date cl-loaddefs
comp comp-cstr warnings icons subr-x rx cl-seq cl-macs gv cl-extra
help-mode bytecomp byte-compile cl-lib rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 76138 9338)
 (symbols 48 7146 0)
 (strings 32 19271 1716)
 (string-bytes 1 582122)
 (vectors 16 15263)
 (vector-slots 8 322465 15703)
 (floats 8 27 48)
 (intervals 56 217 0)
 (buffers 984 11))

------------- OSX config below ------------
In GNU Emacs 29.1 (build 2, x86_64-apple-darwin22.5.0, GTK+ Version
 3.24.38, cairo version 1.17.6) of 2023-08-07 built on MT-307830
Windowing system distributor 'The X.Org Foundation', version 11.0.12101006
System Description:  macOS 13.4.1

Configured using:
 'configure --prefix=/opt/local --disable-silent-rules --without-ns
 --without-libotf --without-m17n-flt --with-libgmp --with-gnutls
 --with-json --with-xml2 --with-modules --with-sqlite3 --with-webp
 --infodir /opt/local/share/info/emacs --without-xaw3d
 --without-imagemagick --with-xpm --with-jpeg --with-tiff --with-gif
 --with-png --with-lcms2 --with-xft --with-x-toolkit=gtk3 --with-gconf
 --with-rsvg --with-dbus --with-native-compilation=aot
 --with-tree-sitter 'CFLAGS=-pipe -Os -Wno-attributes
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch
 x86_64' 'CPPFLAGS=-I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk'
 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -lfreetype
 -lfontconfig -Wl,-rpath /opt/local/lib/gcc12 -Wl,-no_pie
 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
 -arch x86_64''

Configured features:
ACL CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ
JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE PDUMPER PNG
RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE
XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LC_COLLATE: C
  locale-coding-system: nil

Major mode: Shell

Minor modes in effect:
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  server-mode: t
  pdf-occur-global-minor-mode: t
  pulsar-global-mode: t
  pulsar-mode: t
  shell-dirtrack-mode: t
  comint-fontify-input-mode: t
  display-time-mode: t
  desktop-save-mode: t
  electric-pair-mode: t
  icomplete-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
~/emacs/org-noter/org-noter-core hides
/Users/petermao/.emacs.d/elpa/org-noter-20230605.323/org-noter-core
~/emacs/org-noter/org-noter hides
/Users/petermao/.emacs.d/elpa/org-noter-20230605.323/org-noter
/Users/petermao/.emacs.d/elpa/transient-20230602.2121/transient hides
/opt/local/share/emacs/29.1/lisp/transient

Features:
(shadow sort emacsbug timezone wdired mail-extr man descr-text textsec
uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check
network-stream url-cache goto-addr ssh-agency vc-hg vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs log-view vc bug-reference whitespace
sh-script smie executable files-x conf-mode magit-extras face-remap
magit-bookmark magit-submodule magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log which-func magit-diff
git-commit log-edit pcvs-util add-log magit-core magit-autorevert
magit-margin magit-transient magit-process with-editor server magit-mode
transient edmacro kmacro magit-git magit-base magit-section
cursor-sensor crm dash mule-util etags fileloop xref
yaml-mode-expansions yaml-mode look-mode cl-print help-fns radix-tree
dabbrev misearch multi-isearch ediff ediff-merg ediff-mult ediff-wind
ediff-diff ediff-help ediff-init ediff-util lpr yasnippet-snippets
yasnippet org-indent pdf-sync pdf-annot facemenu pdf-outline pdf-links
pdf-history num3-mode dired-aux linum smerge-mode diff
display-line-numbers autorevert vc-git diff-mode vc-dispatcher
image-file image-converter oc-basic disp-table ol-eww eww url-queue
mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu
mml2015 mm-view mml-smime smime gnutls dig gnus-sum gnus-group gnus-undo
gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo
parse-time gnus-spec gnus-int gnus-range message sendmail yank-media
rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies
mm-encode mailabbrev gmm-utils mailheader gnus-win gnus nnheader
gnus-util mail-utils range ol-docview doc-view filenotify ol-bibtex
bibtex iso8601 ol-bbdb ol-w3m ol-doi org-link-doi matlab derived
matlab-scan matlab-syntax matlab-compat org-noter org-noter-nov nov
recentf tree-widget shr pixel-fill kinsoku url-file svg xml esxml-query
dom org-noter-pdf comp comp-cstr warnings cl-extra help-mode
org-noter-core pdf-occur ibuf-ext tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet pdf-isearch let-alist pdf-misc imenu
pdf-tools cus-edit cus-load wid-edit pdf-view bookmark pp jka-compr
pdf-cache pdf-info tq pdf-util pdf-macs image-mode exif ibuffer
ibuffer-loaddefs dired-x dired dired-loaddefs wgrep grep compile
text-property-search expand-region text-mode-expansions
the-org-mode-expansions python-el-fgallina-expansions
er-basic-expansions expand-region-core advice expand-region-custom
pulsar pulse color ffap- ffap thingatpt gse-number-rect rect ob-matlab
ob-shell shell ob-octave ob-python python project compat compat-29
treesit ob-perl ob-ditaa org-download org-element org-persist xdg
avl-tree generator org-attach org-id org-refile url-http url-auth
mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw
nsm puny async org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src ob-comint org-pcomplete pcomplete comint ansi-osc ansi-color
ring org-list org-footnote org-faces org-entities time-date noutline
outline icons ob-emacs-lisp ob-core ob-eval org-cycle org-table ol rx
org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu
calendar cal-loaddefs org-version org-compat org-macs format-spec
utilities pdftools arxiv-reader easy-mmode time desktop frameset
elec-pair icomplete tex-site pcase info package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind kqueue lcms2 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 1234725 140783)
 (symbols 48 53149 12)
 (strings 32 273010 10609)
 (string-bytes 1 18023115)
 (vectors 16 133574)
 (vector-slots 8 3354117 149286)
 (floats 8 2552 1277)
 (intervals 56 86068 6706)
 (buffers 984 67))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Thu, 10 Aug 2023 07:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Peter Mao <peter.mao <at> gmail.com>, Po Lu <luangruo <at> yahoo.com>
Cc: 65191 <at> debbugs.gnu.org
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Thu, 10 Aug 2023 10:01:33 +0300
> From: Peter Mao <peter.mao <at> gmail.com>
> Date: Wed, 9 Aug 2023 20:00:43 -0700
> 
> Recipe:
> emacs-29.1 -Q -ms red -cr green &
> 
> - Cursor is not green; mouse pointer is not red.  "-cr" definitely worked in
> v28.2, but "-ms" did not.
> - This problem does not occur on MacOS -- both "-cr" and "-ms" work properly (config follows Ubuntu
> config below)
> - On Ubuntu, "-cr" worked in earlier versions of Emacs, but "-ms" did not.
> - `set-cursor-color` works properly in all cases
> - `set-mouse-color` does not work on Ubuntu, but it does work on OSX.
> - Emacs did not crash.

This works for me on MS-Windows (although the Windows build currently
doesn't support -ms).

Po Lu, can you please see why this doesn't work on X with GTK?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Thu, 10 Aug 2023 07:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Peter Mao <peter.mao <at> gmail.com>, 65191 <at> debbugs.gnu.org
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Thu, 10 Aug 2023 15:04:39 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Peter Mao <peter.mao <at> gmail.com>
>> Date: Wed, 9 Aug 2023 20:00:43 -0700
>> 
>> Recipe:
>> emacs-29.1 -Q -ms red -cr green &
>> 
>> - Cursor is not green; mouse pointer is not red.  "-cr" definitely worked in
>> v28.2, but "-ms" did not.
>> - This problem does not occur on MacOS -- both "-cr" and "-ms" work properly (config follows Ubuntu
>> config below)
>> - On Ubuntu, "-cr" worked in earlier versions of Emacs, but "-ms" did not.
>> - `set-cursor-color` works properly in all cases
>> - `set-mouse-color` does not work on Ubuntu, but it does work on OSX.
>> - Emacs did not crash.
>
> This works for me on MS-Windows (although the Windows build currently
> doesn't support -ms).
>
> Po Lu, can you please see why this doesn't work on X with GTK?

-ms doesn't work on GNOME systems, as a consequence of XRender cursors
being configured by default.  Those cursors aren't simple bitmaps, and
thus cannot be recolored.

I will look into -cr.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Thu, 10 Aug 2023 07:20:01 GMT) Full text and rfc822 format available.

Message #14 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: peter.mao <at> gmail.com, 65191 <at> debbugs.gnu.org
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Thu, 10 Aug 2023 10:19:46 +0300
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: Peter Mao <peter.mao <at> gmail.com>,  65191 <at> debbugs.gnu.org
> Date: Thu, 10 Aug 2023 15:04:39 +0800
> 
> -ms doesn't work on GNOME systems, as a consequence of XRender cursors
> being configured by default.  Those cursors aren't simple bitmaps, and
> thus cannot be recolored.

Perhaps we should document this, at least in PROBLEMS, if not in the
doc string of set-mouse-color.  Like, say that this doesn't work on
GNOME systems and on MS-Windows?

> I will look into -cr.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Thu, 10 Aug 2023 07:22:01 GMT) Full text and rfc822 format available.

Message #17 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Peter Mao <peter.mao <at> gmail.com>, 65191 <at> debbugs.gnu.org
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Thu, 10 Aug 2023 15:21:18 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Peter Mao <peter.mao <at> gmail.com>
>> Date: Wed, 9 Aug 2023 20:00:43 -0700
>> 
>> Recipe:
>> emacs-29.1 -Q -ms red -cr green &
>> 
>> - Cursor is not green; mouse pointer is not red.  "-cr" definitely worked in
>> v28.2, but "-ms" did not.
>> - This problem does not occur on MacOS -- both "-cr" and "-ms" work properly (config follows Ubuntu
>> config below)
>> - On Ubuntu, "-cr" worked in earlier versions of Emacs, but "-ms" did not.
>> - `set-cursor-color` works properly in all cases
>> - `set-mouse-color` does not work on Ubuntu, but it does work on OSX.
>> - Emacs did not crash.
>
> This works for me on MS-Windows (although the Windows build currently
> doesn't support -ms).
>
> Po Lu, can you please see why this doesn't work on X with GTK?

Peter,

  emacs -Q -ms red -cr green

works for me on both Emacs 29.1 and master, with both a GTK 3 and a
Motif build.  (Though bear in mind that mouse pointer colors are outside
Emacs's control under GNOME.)

If you type:

  M-x list-colors-display RET

does `green' appear in the resulting list?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Thu, 10 Aug 2023 07:32:02 GMT) Full text and rfc822 format available.

Message #20 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: peter.mao <at> gmail.com, 65191 <at> debbugs.gnu.org
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Thu, 10 Aug 2023 15:31:32 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Po Lu <luangruo <at> yahoo.com>
>> Cc: Peter Mao <peter.mao <at> gmail.com>,  65191 <at> debbugs.gnu.org
>> Date: Thu, 10 Aug 2023 15:04:39 +0800
>> 
>> -ms doesn't work on GNOME systems, as a consequence of XRender cursors
>> being configured by default.  Those cursors aren't simple bitmaps, and
>> thus cannot be recolored.
>
> Perhaps we should document this, at least in PROBLEMS, if not in the
> doc string of set-mouse-color.  Like, say that this doesn't work on
> GNOME systems and on MS-Windows?

Now done.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Thu, 10 Aug 2023 07:48:02 GMT) Full text and rfc822 format available.

Message #23 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: peter.mao <at> gmail.com, 65191 <at> debbugs.gnu.org
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Thu, 10 Aug 2023 10:47:25 +0300
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: peter.mao <at> gmail.com,  65191 <at> debbugs.gnu.org
> Date: Thu, 10 Aug 2023 15:31:32 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Po Lu <luangruo <at> yahoo.com>
> >> Cc: Peter Mao <peter.mao <at> gmail.com>,  65191 <at> debbugs.gnu.org
> >> Date: Thu, 10 Aug 2023 15:04:39 +0800
> >> 
> >> -ms doesn't work on GNOME systems, as a consequence of XRender cursors
> >> being configured by default.  Those cursors aren't simple bitmaps, and
> >> thus cannot be recolored.
> >
> > Perhaps we should document this, at least in PROBLEMS, if not in the
> > doc string of set-mouse-color.  Like, say that this doesn't work on
> > GNOME systems and on MS-Windows?
> 
> Now done.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Fri, 11 Aug 2023 05:44:02 GMT) Full text and rfc822 format available.

Message #26 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Peter Mao <peter.mao <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 65191 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Thu, 10 Aug 2023 22:43:23 -0700
[Message part 1 (text/plain, inline)]
On Thu, Aug 10, 2023 at 10:23 PM Po Lu <luangruo <at> yahoo.com> wrote:

> Peter Mao <peter.mao <at> gmail.com> writes:
>
> > On Thu, Aug 10, 2023 at 7:54 AM Peter Mao <peter.mao <at> gmail.com> wrote:
> >
> >  On Thu, Aug 10, 2023 at 12:21 AM Po Lu <luangruo <at> yahoo.com> wrote:
> >
> >  If you type:
> >
> >    M-x list-colors-display RET
> >
> >  does `green' appear in the resulting list?
> >
> >  I'll check when I get home tonight, but given that (set-cursor-color
> >  "green") works, doesn't that indicate that the color is available?
> >
> > green, red, cyan and 545 others...
>
> What if you build Emacs without Cairo?  Does the problem subside then?
>

Yes, that fixes the -cr issue!


> Also, what is printed when you run:
>
>   xrdb -query
>
> $ xrdb -query
*customization: -color
xscreensaver.Dialog.Button.background: #444
xscreensaver.Dialog.Button.foreground: #EDEDFF
xscreensaver.Dialog.background: #202020
xscreensaver.Dialog.bodyFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.Dialog.borderWidth: 0
xscreensaver.Dialog.bottomShadowColor: #202024
xscreensaver.Dialog.buttonFont: -*-dina-bold-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.Dialog.dateFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.Dialog.foreground: #EDEDED
xscreensaver.Dialog.headingFont: -*-dina-bold-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.Dialog.internalBorderWidth: 24
xscreensaver.Dialog.labelFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.Dialog.shadowThickness: 2
xscreensaver.Dialog.text.background: #444
xscreensaver.Dialog.text.foreground: #EDEDFF
xscreensaver.Dialog.topShadowColor: #202024
xscreensaver.Dialog.unameFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.dateFormat: %I:%M%P %a %b %d, %Y
xscreensaver.passwd.passwdFont: -*-dina-bold-r-*-*-10-*-*-*-*-*-*-*
xscreensaver.passwd.thermometer.background: #202020
xscreensaver.passwd.thermometer.foreground: #A9B7C4
xscreensaver.passwd.thermometer.width: 8
Xft.hintstyle: hintnone
Xft.rgba: none
Xcursor.theme:
Xcursor.size: 0
Xcursor.theme_core:
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Fri, 11 Aug 2023 06:07:01 GMT) Full text and rfc822 format available.

Message #29 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Peter Mao <peter.mao <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 65191 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Thu, 10 Aug 2023 23:06:32 -0700
[Message part 1 (text/plain, inline)]
On Thu, Aug 10, 2023 at 10:43 PM Peter Mao <peter.mao <at> gmail.com> wrote:

>
> What if you build Emacs without Cairo?  Does the problem subside then?
>>
>
> Yes, that fixes the -cr issue!
>
>
But what do I give up by ditching Cairo?
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Fri, 11 Aug 2023 06:23:02 GMT) Full text and rfc822 format available.

Message #32 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Peter Mao <peter.mao <at> gmail.com>
Cc: 65191 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Fri, 11 Aug 2023 14:22:25 +0800
Peter Mao <peter.mao <at> gmail.com> writes:

> On Thu, Aug 10, 2023 at 10:23 PM Po Lu <luangruo <at> yahoo.com> wrote:
>
>  Peter Mao <peter.mao <at> gmail.com> writes:
>
>  > On Thu, Aug 10, 2023 at 7:54 AM Peter Mao <peter.mao <at> gmail.com> wrote:
>  >
>  >  On Thu, Aug 10, 2023 at 12:21 AM Po Lu <luangruo <at> yahoo.com> wrote:
>  >
>  >  If you type:
>  >
>  >    M-x list-colors-display RET
>  >
>  >  does `green' appear in the resulting list?
>  >
>  >  I'll check when I get home tonight, but given that (set-cursor-color
>  >  "green") works, doesn't that indicate that the color is available?
>  >
>  > green, red, cyan and 545 others... 
>
>  What if you build Emacs without Cairo?  Does the problem subside then?
>
> Yes, that fixes the -cr issue!
>  
>  Also, what is printed when you run:
>
>    xrdb -query
>
> $ xrdb -query
> *customization: -color
> xscreensaver.Dialog.Button.background: #444
> xscreensaver.Dialog.Button.foreground: #EDEDFF
> xscreensaver.Dialog.background: #202020
> xscreensaver.Dialog.bodyFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
> xscreensaver.Dialog.borderWidth: 0
> xscreensaver.Dialog.bottomShadowColor: #202024
> xscreensaver.Dialog.buttonFont: -*-dina-bold-r-*-*-10-*-*-*-*-*-*-*
> xscreensaver.Dialog.dateFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
> xscreensaver.Dialog.foreground: #EDEDED
> xscreensaver.Dialog.headingFont: -*-dina-bold-r-*-*-10-*-*-*-*-*-*-*
> xscreensaver.Dialog.internalBorderWidth: 24
> xscreensaver.Dialog.labelFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
> xscreensaver.Dialog.shadowThickness: 2
> xscreensaver.Dialog.text.background: #444
> xscreensaver.Dialog.text.foreground: #EDEDFF
> xscreensaver.Dialog.topShadowColor: #202024
> xscreensaver.Dialog.unameFont: -*-dina-medium-r-*-*-10-*-*-*-*-*-*-*
> xscreensaver.dateFormat: %I:%M%P %a %b %d, %Y
> xscreensaver.passwd.passwdFont: -*-dina-bold-r-*-*-10-*-*-*-*-*-*-*
> xscreensaver.passwd.thermometer.background: #202020
> xscreensaver.passwd.thermometer.foreground: #A9B7C4
> xscreensaver.passwd.thermometer.width: 8
> Xft.hintstyle: hintnone
> Xft.rgba: none
> Xcursor.theme: 
> Xcursor.size: 0
> Xcursor.theme_core: 

I tracked this down to the Cairo xsettings stuff, and uncovered a
fundamental problem with it in the process.  

Our settings code operates on FreeType font patterns, but the conversion
from Cairo is a one-way process: Emacs cannot impart the new settings it
reads to Cairo, so every time it registers a settings event, it compares
the new settings with whatever Cairo used as its defaults from the very
outset.  Consequentially, the dynamic-setting stuff is always run every
time a settings change event arrives, even if the changes are congruent
with what Emacs last saw of them.  dynamic-setting subsequently resets
the cursor color, because face-set-after-frame-default calls
face-spec-recalc prior to reapplying frame parameters, which sets the
cursor face's background to black, culminating in
face-set-after-frame-default calling:

  (set-face-attribute 'cursor frame :background "black")

This issue is also the cause of bug#64809 and another bug.  So I would
like to revert the entirety of the Cairo dynamic-setting support, since
it's relatively pointless for Emacs to respond to settings change events
when it cannot save those settings.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Fri, 11 Aug 2023 06:24:01 GMT) Full text and rfc822 format available.

Message #35 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Peter Mao <peter.mao <at> gmail.com>
Cc: 65191 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Fri, 11 Aug 2023 14:23:16 +0800
Peter Mao <peter.mao <at> gmail.com> writes:

> On Thu, Aug 10, 2023 at 10:43 PM Peter Mao <peter.mao <at> gmail.com> wrote:
>
>  What if you build Emacs without Cairo?  Does the problem subside then?
>
>  Yes, that fixes the -cr issue!
>   
> But what do I give up by ditching Cairo?

Color fonts.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Fri, 11 Aug 2023 07:25:01 GMT) Full text and rfc822 format available.

Message #38 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: peter.mao <at> gmail.com, 65191 <at> debbugs.gnu.org
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Fri, 11 Aug 2023 10:24:19 +0300
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  65191 <at> debbugs.gnu.org
> Date: Fri, 11 Aug 2023 14:22:25 +0800
> 
> I tracked this down to the Cairo xsettings stuff, and uncovered a
> fundamental problem with it in the process.  
> 
> Our settings code operates on FreeType font patterns, but the conversion
> from Cairo is a one-way process: Emacs cannot impart the new settings it
> reads to Cairo, so every time it registers a settings event, it compares
> the new settings with whatever Cairo used as its defaults from the very
> outset.  Consequentially, the dynamic-setting stuff is always run every
> time a settings change event arrives, even if the changes are congruent
> with what Emacs last saw of them.  dynamic-setting subsequently resets
> the cursor color, because face-set-after-frame-default calls
> face-spec-recalc prior to reapplying frame parameters, which sets the
> cursor face's background to black, culminating in
> face-set-after-frame-default calling:
> 
>   (set-face-attribute 'cursor frame :background "black")
> 
> This issue is also the cause of bug#64809 and another bug.  So I would
> like to revert the entirety of the Cairo dynamic-setting support, since
> it's relatively pointless for Emacs to respond to settings change events
> when it cannot save those settings.

I don't think I understand this well enough to discuss this
intelligently, so please elaborate on what happens, and include
pointers to more of the code so I and others could complement the
descriptions with what's actually in the code, and maybe suggest
alternative ways of dealing with this.

Not responding to Cairo setting changes sounds like a loss: what
features are currently based on that, and would be lost if we revert
this support?  Also, can't you think about an alternative way of
handling dynamic settings that will let us eat the cake, but also have
it?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Fri, 11 Aug 2023 07:37:01 GMT) Full text and rfc822 format available.

Message #41 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: peter.mao <at> gmail.com, 65191 <at> debbugs.gnu.org
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Fri, 11 Aug 2023 15:36:17 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> I don't think I understand this well enough to discuss this
> intelligently, so please elaborate on what happens, and include
> pointers to more of the code so I and others could complement the
> descriptions with what's actually in the code, and maybe suggest
> alternative ways of dealing with this.
>
> Not responding to Cairo setting changes sounds like a loss: what
> features are currently based on that, and would be lost if we revert
> this support?  Also, can't you think about an alternative way of
> handling dynamic settings that will let us eat the cake, but also have
> it?

The problem boils down to apply_xft_settings, within xsettings.c.  Under
Cairo, that function calls:

  FcConfigSubstitute (NULL, pat, FcMatchPattern);
  options = cairo_font_options_create ();
  ftcrfont_get_default_font_options (dpyinfo, options); <------
  cairo_ft_font_options_substitute (options, pat);
  cairo_font_options_destroy (options);
  FcDefaultSubstitute (pat);

to retrieve the settings currently in effect, and compare them against
the updated settings within the XSettings event.  If a divergence is
located, a config-changed event is sent.  Under Xft, the following code
is ultimately run:

      XftDefaultSet (dpyinfo->display, pat);

but Cairo provides no analog, so these settings are never saved back to
Cairo (nor can I find any means by which to do so.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Fri, 11 Aug 2023 11:06:02 GMT) Full text and rfc822 format available.

Message #44 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: peter.mao <at> gmail.com, 65191 <at> debbugs.gnu.org
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Fri, 11 Aug 2023 14:05:32 +0300
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: peter.mao <at> gmail.com,  65191 <at> debbugs.gnu.org
> Date: Fri, 11 Aug 2023 15:36:17 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > I don't think I understand this well enough to discuss this
> > intelligently, so please elaborate on what happens, and include
> > pointers to more of the code so I and others could complement the
> > descriptions with what's actually in the code, and maybe suggest
> > alternative ways of dealing with this.
> >
> > Not responding to Cairo setting changes sounds like a loss: what
> > features are currently based on that, and would be lost if we revert
> > this support?  Also, can't you think about an alternative way of
> > handling dynamic settings that will let us eat the cake, but also have
> > it?
> 
> The problem boils down to apply_xft_settings, within xsettings.c.  Under
> Cairo, that function calls:
> 
>   FcConfigSubstitute (NULL, pat, FcMatchPattern);
>   options = cairo_font_options_create ();
>   ftcrfont_get_default_font_options (dpyinfo, options); <------
>   cairo_ft_font_options_substitute (options, pat);
>   cairo_font_options_destroy (options);
>   FcDefaultSubstitute (pat);
> 
> to retrieve the settings currently in effect, and compare them against
> the updated settings within the XSettings event.  If a divergence is
> located, a config-changed event is sent.  Under Xft, the following code
> is ultimately run:
> 
>       XftDefaultSet (dpyinfo->display, pat);
> 
> but Cairo provides no analog, so these settings are never saved back to
> Cairo (nor can I find any means by which to do so.)

Why do we need to "save these settings back to Cairo"?

Also, in your original message you mentioned face-spec-recalc and
face-set-after-frame-default; how do those fit into this picture?

IOW, it sounds like the above is another fragment of the whole
picture, and the whole picture is still missing and unclear to me.
Can you please fill in the blanks?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Sat, 12 Aug 2023 00:06:02 GMT) Full text and rfc822 format available.

Message #47 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: peter.mao <at> gmail.com, 65191 <at> debbugs.gnu.org
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Sat, 12 Aug 2023 08:05:13 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> Why do we need to "save these settings back to Cairo"?

Since Cairo is responsible for applying these settings to opened fonts.
IOW, we're sending config-changed events in response to changes that are
never applied.

> Also, in your original message you mentioned face-spec-recalc and
> face-set-after-frame-default; how do those fit into this picture?

When face-set-after-frame-default is called from the dynamic setting
machinery, cursor colors set through frame parameters are overwritten in
favor of the default font spec definition.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Sat, 12 Aug 2023 04:37:02 GMT) Full text and rfc822 format available.

Message #50 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Peter Mao <peter.mao <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 65191 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Fri, 11 Aug 2023 21:36:18 -0700
[Message part 1 (text/plain, inline)]
On Thu, Aug 10, 2023 at 11:23 PM Po Lu <luangruo <at> yahoo.com> wrote:

> Peter Mao <peter.mao <at> gmail.com> writes:
>
> > On Thu, Aug 10, 2023 at 10:43 PM Peter Mao <peter.mao <at> gmail.com> wrote:
> >
> >  What if you build Emacs without Cairo?  Does the problem subside then?
> >
> >  Yes, that fixes the -cr issue!
> >
> > But what do I give up by ditching Cairo?
>
> Color fonts.
>

mode dependent font-lock?  I still see syntax highlighting colors in the
--without-cairo build.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#65191; Package emacs. (Sat, 12 Aug 2023 04:45:02 GMT) Full text and rfc822 format available.

Message #53 received at 65191 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Peter Mao <peter.mao <at> gmail.com>
Cc: 65191 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Sat, 12 Aug 2023 12:44:32 +0800
Peter Mao <peter.mao <at> gmail.com> writes:

> mode dependent font-lock?  I still see syntax highlighting colors in
> the --without-cairo build.

Oh, no.  Color fonts refer to fonts containing color bitmaps or
outlines, such as color Emoji.




This bug report was last modified 266 days ago.

Previous Next


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