unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24158: Problem in set-face-attribute for whitespace mode in terminal
@ 2016-08-05  9:41 Kip Coul
  2016-08-05 10:21 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Kip Coul @ 2016-08-05  9:41 UTC (permalink / raw)
  To: 24158

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

Hello,

I have the following problem with Emacs *in a terminal* (emacs -nw)

This configuration *does* works (red over transparent background)

(global-whitespace-mode t)
(set-face-background 'whitespace-space nil)
(set-face-foreground 'whitespace-space "red")


This one *does not* work (the background is grey):
(global-whitespace-mode t)
(set-face-attribute 'whitespace-space nil :background nil :foreground "red")

However, it should be the same, right?

Interestingly, it works with eval-region though.
Thanks for your help!

Regards,
Kip

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

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

* bug#24158: Problem in set-face-attribute for whitespace mode in terminal
  2016-08-05  9:41 bug#24158: Problem in set-face-attribute for whitespace mode in terminal Kip Coul
@ 2016-08-05 10:21 ` Eli Zaretskii
       [not found]   ` <CADwgZA+gnxn7PzYPD+WW-5rucekP4+r-jJEkaur30HrpJLYzFw@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2016-08-05 10:21 UTC (permalink / raw)
  To: Kip Coul; +Cc: 24158

> From: Kip Coul <kipcoul@gmail.com>
> Date: Fri, 5 Aug 2016 11:41:20 +0200
> 
> This one does not work (the background is grey):
> (global-whitespace-mode t)
> (set-face-attribute 'whitespace-space nil :background nil :foreground "red")
> 
> However, it should be the same, right?
> 
> Interestingly, it works with eval-region though.

If it does work with eval-region, then how to reproduce the situation
where it doesn't work?

Thanks.





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

* bug#24158: Problem in set-face-attribute for whitespace mode in terminal
       [not found]   ` <CADwgZA+gnxn7PzYPD+WW-5rucekP4+r-jJEkaur30HrpJLYzFw@mail.gmail.com>
@ 2016-09-13 14:19     ` Eli Zaretskii
  2016-09-13 17:01       ` Kip Coul
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2016-09-13 14:19 UTC (permalink / raw)
  To: Kip Coul; +Cc: 24158

> From: Kip Coul <kipcoul@gmail.com>
> Date: Fri, 5 Aug 2016 13:34:47 +0200
> 
> You have to put it into your .emacs file
> 
> On Fri, Aug 5, 2016 at 12:21 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>  > From: Kip Coul <kipcoul@gmail.com>
>  > Date: Fri, 5 Aug 2016 11:41:20 +0200
>  >
>  > This one does not work (the background is grey):
>  > (global-whitespace-mode t)
>  > (set-face-attribute 'whitespace-space nil :background nil :foreground "red")
>  >
>  > However, it should be the same, right?
>  >
>  > Interestingly, it works with eval-region though.
> 
>  If it does work with eval-region, then how to reproduce the situation
>  where it doesn't work?

Sorry for the long delay.

I tried your recipe, and I couldn't reproduce the problem: both
variants worked for me the same when I put them in my ~/.emacs.

What is your Emacs version?  (I tried in the latest development
sources.)

Also, if you put in your .emacs only those settings, does it still not
work?  If it works then, you probably have something else in your
.emacs or the site-wide init files that interferes with these face
settings.





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

* bug#24158: Problem in set-face-attribute for whitespace mode in terminal
  2016-09-13 14:19     ` Eli Zaretskii
@ 2016-09-13 17:01       ` Kip Coul
  2016-09-13 19:15         ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Kip Coul @ 2016-09-13 17:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 24158

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

Hello Eli,

Here's the .emacs file:

*(custom-set-variables*
* ;; custom-set-variables was added by Custom.*
* ;; If you edit it by hand, you could mess it up, so be careful.*
* ;; Your init file should contain only one such instance.*
* ;; If there is more than one, they won't work right.*
* '(ansi-color-faces-vector*
*   [default default default italic underline success warning error])*
* '(custom-enabled-themes (quote (tango-dark)))*
* '(safe-local-variable-values (quote ((chef-mode . t)))))*
*(custom-set-faces*
* ;; custom-set-faces was added by Custom.*
* ;; If you edit it by hand, you could mess it up, so be careful.*
* ;; Your init file should contain only one such instance.*
* ;; If there is more than one, they won't work right.*
* )*
*(setq inhibit-splash-screen t)*
*(setq inhibit-startup-message t)*

*(setq backup-directory-alist*
*      `((".*" . ,temporary-file-directory)))*
*(setq auto-save-file-name-transforms*
*      `((".*" ,temporary-file-directory t)))*

*; disable bell sounds*
*(setq visible-bell t)*

*; do not insert tabs*
*(setq-default indent-tabs-mode nil)*

*;; set minibuffer font color*
*(set-face-foreground 'minibuffer-prompt "cyan")*

*; show whitespace*
*(global-whitespace-mode t)*
*(set-face-attribute 'whitespace-space nil :background nil :foreground
"red")*

*; enable line numbers*
*(global-linum-mode 1)*

*; no scratch message*
*(setq initial-scratch-message "")*


I'm on debian. Here's my Emacs version:
GNU Emacs 24.4.1
Copyright (C) 2014 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.



If you use the config file as is *in a terminal*, it will display a grey
background for white spaces
But if you eval region the set-face-attribute line, the grey background
will disappear

Regards,
Kip

On Tue, Sep 13, 2016 at 4:19 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Kip Coul <kipcoul@gmail.com>
> > Date: Fri, 5 Aug 2016 13:34:47 +0200
> >
> > You have to put it into your .emacs file
> >
> > On Fri, Aug 5, 2016 at 12:21 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> >  > From: Kip Coul <kipcoul@gmail.com>
> >  > Date: Fri, 5 Aug 2016 11:41:20 +0200
> >  >
> >  > This one does not work (the background is grey):
> >  > (global-whitespace-mode t)
> >  > (set-face-attribute 'whitespace-space nil :background nil :foreground
> "red")
> >  >
> >  > However, it should be the same, right?
> >  >
> >  > Interestingly, it works with eval-region though.
> >
> >  If it does work with eval-region, then how to reproduce the situation
> >  where it doesn't work?
>
> Sorry for the long delay.
>
> I tried your recipe, and I couldn't reproduce the problem: both
> variants worked for me the same when I put them in my ~/.emacs.
>
> What is your Emacs version?  (I tried in the latest development
> sources.)
>
> Also, if you put in your .emacs only those settings, does it still not
> work?  If it works then, you probably have something else in your
> .emacs or the site-wide init files that interferes with these face
> settings.
>

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

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

* bug#24158: Problem in set-face-attribute for whitespace mode in terminal
  2016-09-13 17:01       ` Kip Coul
@ 2016-09-13 19:15         ` Eli Zaretskii
  2016-09-14  8:04           ` Kip Coul
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2016-09-13 19:15 UTC (permalink / raw)
  To: Kip Coul; +Cc: 24158

> From: Kip Coul <kipcoul@gmail.com>
> Date: Tue, 13 Sep 2016 19:01:43 +0200
> Cc: 24158@debbugs.gnu.org
> 
> Here's the .emacs file:

Thanks.  But please try just these two lines:

 (global-whitespace-mode t)
 (set-face-attribute 'whitespace-space nil :background nil :foreground "red")

and nothing else.  If this works for you in Emacs 24.4 that you have,
then we can investigate which of the other customizations gets in the
way.  If just those two lines don't work, I'd ask you to try a newer
version of Emacs, maybe this was a problem that was since solved.





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

* bug#24158: Problem in set-face-attribute for whitespace mode in terminal
  2016-09-13 19:15         ` Eli Zaretskii
@ 2016-09-14  8:04           ` Kip Coul
  2016-09-14 17:11             ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Kip Coul @ 2016-09-14  8:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 24158


[-- Attachment #1.1: Type: text/plain, Size: 909 bytes --]

Just tried, it does not work. Here's a print screen of editing the .emacs
file:

1. this works:
[image: Inline image 1]

2. This does not work, at first load
[image: Inline image 2]

3. After eval region:
[image: Inline image 3]

Regards,
Kip


On Tue, Sep 13, 2016 at 9:15 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Kip Coul <kipcoul@gmail.com>
> > Date: Tue, 13 Sep 2016 19:01:43 +0200
> > Cc: 24158@debbugs.gnu.org
> >
> > Here's the .emacs file:
>
> Thanks.  But please try just these two lines:
>
>  (global-whitespace-mode t)
>  (set-face-attribute 'whitespace-space nil :background nil :foreground
> "red")
>
> and nothing else.  If this works for you in Emacs 24.4 that you have,
> then we can investigate which of the other customizations gets in the
> way.  If just those two lines don't work, I'd ask you to try a newer
> version of Emacs, maybe this was a problem that was since solved.
>

[-- Attachment #1.2: Type: text/html, Size: 1756 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 18803 bytes --]

[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 19030 bytes --]

[-- Attachment #4: image.png --]
[-- Type: image/png, Size: 19410 bytes --]

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

* bug#24158: Problem in set-face-attribute for whitespace mode in terminal
  2016-09-14  8:04           ` Kip Coul
@ 2016-09-14 17:11             ` Eli Zaretskii
  2016-09-15 14:51               ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2016-09-14 17:11 UTC (permalink / raw)
  To: Kip Coul; +Cc: 24158

> From: Kip Coul <kipcoul@gmail.com>
> Date: Wed, 14 Sep 2016 10:04:53 +0200
> Cc: 24158@debbugs.gnu.org
> 
> Just tried, it does not work. Here's a print screen of editing the .emacs file:
> 
> 1. this works:
> Inline image 1
> 
> 2. This does not work, at first load
> Inline image 2
> 
> 3. After eval region:
> Inline image 3

Strange, it works for me even in Emacs 24.4.

However, I see that your default face background is dark (black or
similar), which is not the Emacs default.  How is that background get
set?  Do you have a site-lisp file or do you do it in .Xresources or
something?  It could be that the reason is in whatever makes the
background dark.





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

* bug#24158: Problem in set-face-attribute for whitespace mode in terminal
  2016-09-14 17:11             ` Eli Zaretskii
@ 2016-09-15 14:51               ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2016-09-15 14:51 UTC (permalink / raw)
  To: kipcoul; +Cc: 24158-done

> Date: Wed, 14 Sep 2016 20:11:26 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 24158@debbugs.gnu.org
> 
> > From: Kip Coul <kipcoul@gmail.com>
> > Date: Wed, 14 Sep 2016 10:04:53 +0200
> > Cc: 24158@debbugs.gnu.org
> > 
> > Just tried, it does not work. Here's a print screen of editing the .emacs file:
> > 
> > 1. this works:
> > Inline image 1
> > 
> > 2. This does not work, at first load
> > Inline image 2
> > 
> > 3. After eval region:
> > Inline image 3
> 
> Strange, it works for me even in Emacs 24.4.
> 
> However, I see that your default face background is dark (black or
> similar), which is not the Emacs default.  How is that background get
> set?  Do you have a site-lisp file or do you do it in .Xresources or
> something?  It could be that the reason is in whatever makes the
> background dark.

Closed as this doesn't look like an Emacs problem.





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

end of thread, other threads:[~2016-09-15 14:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-05  9:41 bug#24158: Problem in set-face-attribute for whitespace mode in terminal Kip Coul
2016-08-05 10:21 ` Eli Zaretskii
     [not found]   ` <CADwgZA+gnxn7PzYPD+WW-5rucekP4+r-jJEkaur30HrpJLYzFw@mail.gmail.com>
2016-09-13 14:19     ` Eli Zaretskii
2016-09-13 17:01       ` Kip Coul
2016-09-13 19:15         ` Eli Zaretskii
2016-09-14  8:04           ` Kip Coul
2016-09-14 17:11             ` Eli Zaretskii
2016-09-15 14:51               ` Eli Zaretskii

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