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: Eli Zaretskii <eliz@gnu.org>
Cc: 32921@debbugs.gnu.org, larsi@gnus.org, jimis@gmx.net
Subject: bug#32921: emacsclient obeys Xresources even when launched with -nw
Date: Fri, 20 May 2022 09:04:00 +0800	[thread overview]
Message-ID: <87wnehypz3.fsf@yahoo.com> (raw)
In-Reply-To: <83pmk9d3th.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 May 2022 16:55:54 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> No, there is a difference: when we change default-frame-alist at
> startup time, that change is thereafter propagated to all future
> frames, independently of what frame-creation-function will do when
> each new frame is created.

But it seems that the `reverse' frame parameter is also only handled
inside `x-handle-reverse-video', so it only takes effect if the
frame-creation-function is eventually called:

    (defun x-handle-reverse-video (frame parameters)
      "Handle the reverse-video frame parameter and X resource.
    `x-create-frame' does not handle this one."
      (when (cdr (or (assq 'reverse parameters)
                     (let ((resource (x-get-resource "reverseVideo"
                                                     "ReverseVideo")))
                       (if resource
                           (cons nil (member (downcase resource)
                                             '("on" "true")))))))
          (let* ((params (frame-parameters frame))
                 (bg (cdr (assq 'foreground-color params)))
                 (fg (cdr (assq 'background-color params))))
            (modify-frame-parameters frame
                                     (list (cons 'foreground-color fg)
                                           (cons 'background-color bg)))
            (if (equal bg (cdr (assq 'border-color params)))
                (modify-frame-parameters frame
                                         (list (cons 'border-color fg))))
            (if (equal bg (cdr (assq 'mouse-color params)))
                (modify-frame-parameters frame
                                         (list (cons 'mouse-color fg))))
            (if (equal bg (cdr (assq 'cursor-color params)))
                (modify-frame-parameters frame
                                         (list (cons 'cursor-color fg)))))))

> The reverseVideo resource, like the -rv command-line argument, is
> supposed to invert the colors that the user's customizations set.
> Maybe this is why it is handled specially.

Hmm...





  reply	other threads:[~2022-05-20  1:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 17:49 bug#32921: emacsclient obeys Xresources even when launched with -nw Dimitrios Apostolou
2022-05-18 12:38 ` Lars Ingebrigtsen
2022-05-18 13:02   ` Eli Zaretskii
2022-05-18 13:13     ` Lars Ingebrigtsen
2022-05-18 13:27       ` Eli Zaretskii
2022-05-18 13:52         ` Lars Ingebrigtsen
2022-05-18 14:00           ` Eli Zaretskii
2022-05-19 22:58             ` Lars Ingebrigtsen
2022-05-19  1:37           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19  7:02             ` Eli Zaretskii
2022-05-19  7:47               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19  8:26                 ` Eli Zaretskii
2022-05-19  8:59                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19  9:44                     ` Eli Zaretskii
2022-05-19 10:19                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19 12:40                         ` Eli Zaretskii
2022-05-19 13:09                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19 13:23                             ` Eli Zaretskii
2022-05-19 13:40                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19 13:55                                 ` Eli Zaretskii
2022-05-20  1:04                                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-05-20  7:03                                     ` Eli Zaretskii
2022-05-20  8:15                                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-19 23:04                   ` Lars Ingebrigtsen
2022-05-20  6:54                     ` Eli Zaretskii
2022-05-20  8:19                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 10:50                         ` Eli Zaretskii
2022-05-20  8:28                       ` Lars Ingebrigtsen
2022-05-20 11:00                         ` Eli Zaretskii
2022-05-20 11:30                           ` Lars Ingebrigtsen
2022-06-19 13:28   ` Lars Ingebrigtsen

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=87wnehypz3.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=32921@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=jimis@gmx.net \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.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).