GNU bug report logs - #32921
emacsclient obeys Xresources even when launched with -nw

Previous Next

Package: emacs;

Reported by: Dimitrios Apostolou <jimis <at> gmx.net>

Date: Wed, 3 Oct 2018 17:50:02 UTC

Severity: normal

Tags: moreinfo

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Po Lu <luangruo <at> yahoo.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32921 <at> debbugs.gnu.org, larsi <at> gnus.org, jimis <at> gmx.net
Subject: Re: bug#32921: emacsclient obeys Xresources even when launched with
 -nw
Date: Fri, 20 May 2022 09:04:00 +0800
Eli Zaretskii <eliz <at> 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...




This bug report was last modified 2 years and 332 days ago.

Previous Next


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