unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65191: 29.1; -ms and -cr CL options don't work
@ 2023-08-10  3:00 Peter Mao
  2023-08-10  7:01 ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: Peter Mao @ 2023-08-10  3:00 UTC (permalink / raw)
  To: 65191

[-- Attachment #1: Type: text/plain, Size: 11456 bytes --]

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))

[-- Attachment #2: Type: text/html, Size: 12514 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-10  3:00 bug#65191: 29.1; -ms and -cr CL options don't work Peter Mao
@ 2023-08-10  7:01 ` Eli Zaretskii
  2023-08-10  7:04   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-10  7:21   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 17+ messages in thread
From: Eli Zaretskii @ 2023-08-10  7:01 UTC (permalink / raw)
  To: Peter Mao, Po Lu; +Cc: 65191

> From: Peter Mao <peter.mao@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?





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-10  7:01 ` Eli Zaretskii
@ 2023-08-10  7:04   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-10  7:19     ` Eli Zaretskii
  2023-08-10  7:21   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 17+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-10  7:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Peter Mao, 65191

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Peter Mao <peter.mao@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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-10  7:04   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-10  7:19     ` Eli Zaretskii
  2023-08-10  7:31       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2023-08-10  7:19 UTC (permalink / raw)
  To: Po Lu; +Cc: peter.mao, 65191

> From: Po Lu <luangruo@yahoo.com>
> Cc: Peter Mao <peter.mao@gmail.com>,  65191@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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-10  7:01 ` Eli Zaretskii
  2023-08-10  7:04   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-10  7:21   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
       [not found]     ` <CAEK3s1NrTSTtvQKkhOYaUPafZoSn=Gm=QaYwPO8UUmTC66bUgw@mail.gmail.com>
  1 sibling, 1 reply; 17+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-10  7:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Peter Mao, 65191

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Peter Mao <peter.mao@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?





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-10  7:19     ` Eli Zaretskii
@ 2023-08-10  7:31       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-10  7:47         ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-10  7:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: peter.mao, 65191

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Po Lu <luangruo@yahoo.com>
>> Cc: Peter Mao <peter.mao@gmail.com>,  65191@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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-10  7:31       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-10  7:47         ` Eli Zaretskii
  0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2023-08-10  7:47 UTC (permalink / raw)
  To: Po Lu; +Cc: peter.mao, 65191

> From: Po Lu <luangruo@yahoo.com>
> Cc: peter.mao@gmail.com,  65191@debbugs.gnu.org
> Date: Thu, 10 Aug 2023 15:31:32 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Po Lu <luangruo@yahoo.com>
> >> Cc: Peter Mao <peter.mao@gmail.com>,  65191@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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
       [not found]         ` <87il9mqhj1.fsf@yahoo.com>
@ 2023-08-11  5:43           ` Peter Mao
  2023-08-11  6:06             ` Peter Mao
  2023-08-11  6:22             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 17+ messages in thread
From: Peter Mao @ 2023-08-11  5:43 UTC (permalink / raw)
  To: Po Lu; +Cc: 65191, Eli Zaretskii

[-- Attachment #1: Type: text/plain, Size: 2068 bytes --]

On Thu, Aug 10, 2023 at 10:23 PM Po Lu <luangruo@yahoo.com> wrote:

> Peter Mao <peter.mao@gmail.com> writes:
>
> > On Thu, Aug 10, 2023 at 7:54 AM Peter Mao <peter.mao@gmail.com> wrote:
> >
> >  On Thu, Aug 10, 2023 at 12:21 AM Po Lu <luangruo@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:

[-- Attachment #2: Type: text/html, Size: 2873 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-11  5:43           ` Peter Mao
@ 2023-08-11  6:06             ` Peter Mao
  2023-08-11  6:23               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-11  6:22             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 17+ messages in thread
From: Peter Mao @ 2023-08-11  6:06 UTC (permalink / raw)
  To: Po Lu; +Cc: 65191, Eli Zaretskii

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

On Thu, Aug 10, 2023 at 10:43 PM Peter Mao <peter.mao@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?

[-- Attachment #2: Type: text/html, Size: 779 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-11  5:43           ` Peter Mao
  2023-08-11  6:06             ` Peter Mao
@ 2023-08-11  6:22             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-11  7:24               ` Eli Zaretskii
  1 sibling, 1 reply; 17+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-11  6:22 UTC (permalink / raw)
  To: Peter Mao; +Cc: 65191, Eli Zaretskii

Peter Mao <peter.mao@gmail.com> writes:

> On Thu, Aug 10, 2023 at 10:23 PM Po Lu <luangruo@yahoo.com> wrote:
>
>  Peter Mao <peter.mao@gmail.com> writes:
>
>  > On Thu, Aug 10, 2023 at 7:54 AM Peter Mao <peter.mao@gmail.com> wrote:
>  >
>  >  On Thu, Aug 10, 2023 at 12:21 AM Po Lu <luangruo@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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-11  6:06             ` Peter Mao
@ 2023-08-11  6:23               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-12  4:36                 ` Peter Mao
  0 siblings, 1 reply; 17+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-11  6:23 UTC (permalink / raw)
  To: Peter Mao; +Cc: 65191, Eli Zaretskii

Peter Mao <peter.mao@gmail.com> writes:

> On Thu, Aug 10, 2023 at 10:43 PM Peter Mao <peter.mao@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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-11  6:22             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-11  7:24               ` Eli Zaretskii
  2023-08-11  7:36                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2023-08-11  7:24 UTC (permalink / raw)
  To: Po Lu; +Cc: peter.mao, 65191

> From: Po Lu <luangruo@yahoo.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  65191@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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-11  7:24               ` Eli Zaretskii
@ 2023-08-11  7:36                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-11 11:05                   ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-11  7:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: peter.mao, 65191

Eli Zaretskii <eliz@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.)





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-11  7:36                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-11 11:05                   ` Eli Zaretskii
  2023-08-12  0:05                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2023-08-11 11:05 UTC (permalink / raw)
  To: Po Lu; +Cc: peter.mao, 65191

> From: Po Lu <luangruo@yahoo.com>
> Cc: peter.mao@gmail.com,  65191@debbugs.gnu.org
> Date: Fri, 11 Aug 2023 15:36:17 +0800
> 
> Eli Zaretskii <eliz@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?





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-11 11:05                   ` Eli Zaretskii
@ 2023-08-12  0:05                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 17+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-12  0:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: peter.mao, 65191

Eli Zaretskii <eliz@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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-11  6:23               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-12  4:36                 ` Peter Mao
  2023-08-12  4:44                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 17+ messages in thread
From: Peter Mao @ 2023-08-12  4:36 UTC (permalink / raw)
  To: Po Lu; +Cc: 65191, Eli Zaretskii

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

On Thu, Aug 10, 2023 at 11:23 PM Po Lu <luangruo@yahoo.com> wrote:

> Peter Mao <peter.mao@gmail.com> writes:
>
> > On Thu, Aug 10, 2023 at 10:43 PM Peter Mao <peter.mao@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.

[-- Attachment #2: Type: text/html, Size: 946 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#65191: 29.1; -ms and -cr CL options don't work
  2023-08-12  4:36                 ` Peter Mao
@ 2023-08-12  4:44                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 17+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-12  4:44 UTC (permalink / raw)
  To: Peter Mao; +Cc: 65191, Eli Zaretskii

Peter Mao <peter.mao@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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-08-12  4:44 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10  3:00 bug#65191: 29.1; -ms and -cr CL options don't work Peter Mao
2023-08-10  7:01 ` Eli Zaretskii
2023-08-10  7:04   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-10  7:19     ` Eli Zaretskii
2023-08-10  7:31       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-10  7:47         ` Eli Zaretskii
2023-08-10  7:21   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]     ` <CAEK3s1NrTSTtvQKkhOYaUPafZoSn=Gm=QaYwPO8UUmTC66bUgw@mail.gmail.com>
     [not found]       ` <CAEK3s1Mtt5jckJzptYdhK4jU5tS0k1SJHXy6DgTGY94CjoYSFQ@mail.gmail.com>
     [not found]         ` <87il9mqhj1.fsf@yahoo.com>
2023-08-11  5:43           ` Peter Mao
2023-08-11  6:06             ` Peter Mao
2023-08-11  6:23               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-12  4:36                 ` Peter Mao
2023-08-12  4:44                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-11  6:22             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-11  7:24               ` Eli Zaretskii
2023-08-11  7:36                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-11 11:05                   ` Eli Zaretskii
2023-08-12  0:05                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

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).