unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Peter Mao <peter.mao@gmail.com>
Cc: 65191@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#65191: 29.1; -ms and -cr CL options don't work
Date: Fri, 11 Aug 2023 14:22:25 +0800	[thread overview]
Message-ID: <87edkaqese.fsf@yahoo.com> (raw)
In-Reply-To: <CAEK3s1OWBRiivB9y7L==y1ue0cQxVujjoWps5Pinbm2NYSTmew@mail.gmail.com> (Peter Mao's message of "Thu, 10 Aug 2023 22:43:23 -0700")

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.





  parent reply	other threads:[~2023-08-11  6:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87edkaqese.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=65191@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=peter.mao@gmail.com \
    /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 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).