unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10748: colours in client on xterm (if an X frame is open at same time)
       [not found] ` <CAHZoxq-8CMT7tNADZE1+s5yU2-FM3Y+YgCVzMBNRF_uq6zWDhg@mail.gmail.com>
@ 2012-02-07  4:48   ` sam
  2012-02-27 22:10     ` bug#10748: Oleksandr Manzyuk
                       ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sam @ 2012-02-07  4:48 UTC (permalink / raw)
  To: 10748

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

http://lists.gnu.org/archive/html/emacs-devel/2010-01/msg00454.html

I've not been able to find record of this bug anywhere, and no one in
#emacs seemed to have any sense of this bug. My research. I (first)
experienced this bug had this bug in a build from the bzr trunk with the
Lucid toolkit.

(See the following blog post to describe why I'm using lucid rather than
GTK: http://tychoish.com/rhizome/persistent-emacs-daemons/)

I'm willing to provide a copy of my package or whatever you require.

Cheers,
sam

> On Mon, Feb 6, 2012 at 3:29 PM, Sam Kleinman <sam@tychoish.com> wrote:
> >
> >> I could not reproduce this behavior, and yet I've seen something
> >> vaguely similar: I generally have running an emacs that I've started
> >> via "emacs -nw"; I connect to it with "emacsclient --tty" (and then
> >> disconnect) a few times a day.  That works fine, with no strange
> >> colors.  But occasionally I connect to it via "emacsclient -c", which
> >> itself works fine -- but thenceforth, console frames that I create
> >> with "emacsclient --tty" have a light-colored background -- and
> >> killing the X frame doesn't fix that problem.  Only restarting emacs
> >> fixes it.
> >
> >
> > Hello,
> >
> > I just ran across this exact problem for the first time in a new
> > emacs-lucid-bzr build, and I have no clue what happened to cause it or
> > what my configuration is causing this.
> >
> > Are you still having this problem? What have you done to work around
> > this? Is this something that I should reopen a thread on some mailing
> > list?

On Mon, Feb 06, 2012 at 06:15:58PM -0800, Eric Hanchrow wrote:
> I no longer use "emacsclient --tty", so I haven't had the opportunity
> to see this.

> >
> > Cheers,
> > sam

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* bug#10748:
  2012-02-07  4:48   ` bug#10748: colours in client on xterm (if an X frame is open at same time) sam
@ 2012-02-27 22:10     ` Oleksandr Manzyuk
  2012-02-28 14:30     ` bug#10748: Ping Oleksandr Manzyuk
  2012-03-04 15:06     ` bug#10748: colours in client on xterm (if an X frame is open at same time) Chong Yidong
  2 siblings, 0 replies; 4+ messages in thread
From: Oleksandr Manzyuk @ 2012-02-27 22:10 UTC (permalink / raw)
  To: 10748

I'd like to confirm this problem.  I've chased it down to the function
`face-spec-reset-face' from lisp/faces.el.  The version from Emacs
23.2:

(defun face-spec-reset-face (face &optional frame)
  "Reset all attributes of FACE on FRAME to unspecified."
  (let ((attrs face-attribute-name-alist))
    (while attrs
      (let ((attr-and-name (car attrs)))
	(set-face-attribute face frame (car attr-and-name) 'unspecified))
      (setq attrs (cdr attrs)))))

The same function from trunk:

(defun face-spec-reset-face (face &optional frame)
  "Reset all attributes of FACE on FRAME to unspecified."
  (unless (eq face 'default)
    (let (reset-args)
      (dolist (attr-and-name face-attribute-name-alist)
	(push 'unspecified reset-args)
	(push (car attr-and-name) reset-args))
      (apply 'set-face-attribute face frame reset-args))))

Why does the latter not reset the default face?  If I start Emacs with
"emacs -Q", start the server with M-x server-start, and evaluate the
former definition in the *scratch* buffer, then doing "emacsclient -t"
from the terminal gives me a frame that respects my terminal
background color.

Best,
Sasha
-- 
Oleksandr Manzyuk
http://oleksandrmanzyuk.wordpress.com





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

* bug#10748: Ping
  2012-02-07  4:48   ` bug#10748: colours in client on xterm (if an X frame is open at same time) sam
  2012-02-27 22:10     ` bug#10748: Oleksandr Manzyuk
@ 2012-02-28 14:30     ` Oleksandr Manzyuk
  2012-03-04 15:06     ` bug#10748: colours in client on xterm (if an X frame is open at same time) Chong Yidong
  2 siblings, 0 replies; 4+ messages in thread
From: Oleksandr Manzyuk @ 2012-02-28 14:30 UTC (permalink / raw)
  To: 10748

To save you reading the thread linked in the original bug report, here
is how to reproduce the bug:

1. emacs -Q
2. M-x server-start
3. Open a terminal with nonstandard foreground and/or background colors.
   For the sake of example, I assume that you've run "xterm -bg yellow".
4. Run "emacsclient -t" in the terminal.

The observed behavior: the background becomes grey, whereas the expected
behavior is that Emacs honors the terminal background color (yellow).

I normally set the background to white in .Xresources.  I've used yellow
color only to make my point.

This behavior is a regression in Emacs 24.  I've chased it down to this
commit:

commit 27528399fd429b2f510e13f361affb1e2211ceb3
Author: Chong Yidong <cyd@gnu.org>
Date:   Tue Jan 31 16:38:58 2012 +0800

   Fix menu-set-font interaction with Custom themes.

   In particular, prevent it from setting non-font-related attributes
   like the foreground and background color.  This requires a bugfix to
   face-spec-reset-face to make "resetting" the default face work.

   * lisp/faces.el (face-spec-reset-face): Don't apply unspecified
   attribute values to the default face.

   * lisp/frame.el (set-frame-font): New arg ALL-FRAMES.

   * lisp/menu-bar.el (menu-set-font): Use set-frame-font.

`face-spec-reset-face' has been changed to reset only non-default faces.
While I understand the rationale of this change, it seems to break
handling of fore- and background colors in terminal.  If I evaluate the
old definition of `face-spec-reset-face' in the *scratch* buffer,
connecting to Emacs with "emacsclient -t" works the way I am used to.
-- 
Oleksandr Manzyuk
http://oleksandrmanzyuk.wordpress.com





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

* bug#10748: colours in client on xterm (if an X frame is open at same time)
  2012-02-07  4:48   ` bug#10748: colours in client on xterm (if an X frame is open at same time) sam
  2012-02-27 22:10     ` bug#10748: Oleksandr Manzyuk
  2012-02-28 14:30     ` bug#10748: Ping Oleksandr Manzyuk
@ 2012-03-04 15:06     ` Chong Yidong
  2 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2012-03-04 15:06 UTC (permalink / raw)
  To: sam; +Cc: 10748

> I generally have running an emacs that I've started via "emacs -nw"; I
> connect to it with "emacsclient --tty" (and then disconnect) a few
> times a day.  That works fine, with no strange colors.  But
> occasionally I connect to it via "emacsclient -c", which itself works
> fine -- but thenceforth, console frames that I create with
> "emacsclient --tty" have a light-colored background -- and killing the
> X frame doesn't fix that problem.  Only restarting emacs fixes it.

I've committed a fix for this bug to the trunk.  Thanks.





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

end of thread, other threads:[~2012-03-04 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20120206232927.GA23487@arendt.tychoish.net>
     [not found] ` <CAHZoxq-8CMT7tNADZE1+s5yU2-FM3Y+YgCVzMBNRF_uq6zWDhg@mail.gmail.com>
2012-02-07  4:48   ` bug#10748: colours in client on xterm (if an X frame is open at same time) sam
2012-02-27 22:10     ` bug#10748: Oleksandr Manzyuk
2012-02-28 14:30     ` bug#10748: Ping Oleksandr Manzyuk
2012-03-04 15:06     ` bug#10748: colours in client on xterm (if an X frame is open at same time) Chong Yidong

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