all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* writing your own theme and tabbar
@ 2014-08-22 15:46 Sharon Kimble
  2014-08-29  4:39 ` Alex Kost
  0 siblings, 1 reply; 4+ messages in thread
From: Sharon Kimble @ 2014-08-22 15:46 UTC (permalink / raw
  To: help-gnu-emacs

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

I'm trying to develop/write my own theme which is doing more or less
what I want, except for 'tabbar'. This is what I have -
--8<---------------cut here---------------start------------->8---
 '(tabbar-selected-highlight ((t (:background "black" :foreground "red" :height 85))))
 '(tabbar-selected-modified ((t (:background "black" :foreground "red" :weight bold :height 85))))
 '(tabbar-default ((t (:inherit variable-pitch :background "gray" :foreground "black" :weight bold :height 85)))) 
 '(tabbar-selected ((t (:inherit tabbar-default :background "black" :foreground "red" :weight bold :height 85))))
 '(tabbar-modified ((t (:background "black" :foreground "red" :weight bold :height 85)))))
--8<---------------cut here---------------end--------------->8---

And what I'm looking for in the tab of the buffer that I'm in is a black
background with red text. But its not happening, instead what I'm
getting is red text on a light green background.

But, in buffers like *org-agenda-mode* or *org-agenda* it is showing
_exactly_ what I'm looking for. Red text on a black background.

Tabbar default is black text on a light-green background, and this seems
to be the code-source for it as its the only place where 'green' is
mentioned, from "tabbar.el" - 
--8<---------------cut here---------------start------------->8---
(defface tabbar-modified
  '((t
     :inherit tabbar-default
     :box (:line-width 1 :color "white" :style released-button)
     :foreground "green"
     ))
  "Face used for unsaved tabs."
  :group 'tabbar)
--8<---------------cut here---------------end--------------->8---

and tabbar-default is -
--8<---------------cut here---------------start------------->8---
(defface tabbar-default
  '(
    ;;(((class color grayscale) (background light))
    ;; :inherit variable-pitch
    ;; :height 0.8
    ;; :foreground "gray50"
    ;; :background "grey75"
    ;; )
    (((class color grayscale) (background dark))
     :inherit variable-pitch
     :height 0.8
     :foreground "grey75"
     :background "gray50"
     )
    (((class mono) (background light))
     :inherit variable-pitch
     :height 0.8
     :foreground "black"
     :background "white"
     )
    (((class mono) (background dark))
     :inherit variable-pitch
     :height 0.8
     :foreground "white"
     :background "black"
     )
    (t
     :inherit variable-pitch
     :height 0.8
     :foreground "gray50"
     :background "gray75"
     ))
  "Default face used in the tab bar."
  :group 'tabbar)
--8<---------------cut here---------------end--------------->8---

How can I achieve my goal please of red foreground on a black background
for every tab/buffer that is currently in use, i.e. I'm writing in that
buffer.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.5, emacs 24.3.93.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: writing your own theme and tabbar
       [not found] <mailman.7393.1408722425.1147.help-gnu-emacs@gnu.org>
@ 2014-08-22 18:56 ` Emanuel Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Emanuel Berg @ 2014-08-22 18:56 UTC (permalink / raw
  To: help-gnu-emacs

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> I'm trying to develop/write my own theme ...

Before you do that, be sure you got the right face.

1. What is the name of the face you would like to
   change?

2. Change that face, either with custom-set-faces or
   `set-face-attribute'.

Did that work?

Here, you can find a method to do step one, and an example
how custom-set-faces can be used:

http://user.it.uu.se/~embe8573/conf/emacs-init/faces.el

> And what I'm looking for in the tab of the buffer
> that I'm in is a black background with red text. But
> its not happening, instead what I'm getting is red
> text on a light green background.

Have you confirmed you are setting the correct face?

If so, can you confirm that you can set the face at
all? Set it to some arbitrary color - did it change?

> But, in buffers like *org-agenda-mode* or
> *org-agenda* it is showing _exactly_ what I'm looking
> for. Red text on a black background.

If you have confirmed you are setting the correct face,
and that it responds to a change, you can use
describe-face in those modes that you mention to check
out the faces that you like (first, find out what those
faces are). Now set the face that you don't like to the
same values.

> Tabbar default is black text on a light-green
> background, and this seems to be the code-source for
> it as its the only place where 'green' is mentioned,
> from "tabbar.el"

That's too reverse a way of doing it. I prefer the
method I describe (surprise). But If you do it your way,
sure, change tabbar-modified and see if it changes what
you want to change. But even if it does, it doesn't
mean that's the face - the sought-after face can be
inheriting from tabbar-modified and not setting that
property itself.

> How can I achieve my goal please of red foreground on
> a black background for every tab/buffer that is
> currently in use

Find out what that face is, see if you can change it,
find out what you want to change it to, change it.

Good luck!

-- 
underground experts united


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

* Re: writing your own theme and tabbar
  2014-08-22 15:46 writing your own theme and tabbar Sharon Kimble
@ 2014-08-29  4:39 ` Alex Kost
  2014-08-29 17:07   ` Sharon Kimble
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Kost @ 2014-08-29  4:39 UTC (permalink / raw
  To: Sharon Kimble; +Cc: help-gnu-emacs

Sharon Kimble (2014-08-22 19:46 +0400) wrote:

> I'm trying to develop/write my own theme which is doing more or less
> what I want, except for 'tabbar'. This is what I have -
>  '(tabbar-selected-highlight ((t (:background "black" :foreground "red" :height 85))))
>  '(tabbar-selected-modified ((t (:background "black" :foreground "red" :weight bold :height 85))))
>  '(tabbar-default ((t (:inherit variable-pitch :background "gray" :foreground "black" :weight bold :height 85)))) 
>  '(tabbar-selected ((t (:inherit tabbar-default :background "black" :foreground "red" :weight bold :height 85))))
>  '(tabbar-modified ((t (:background "black" :foreground "red" :weight bold :height 85)))))
>
> And what I'm looking for in the tab of the buffer that I'm in is a black
> background with red text. But its not happening, instead what I'm
> getting is red text on a light green background.
>
> [...]
>
> How can I achieve my goal please of red foreground on a black background
> for every tab/buffer that is currently in use, i.e. I'm writing in that
> buffer.

Hello,

Do you use tabbar from <https://github.com/dholm/tabbar>?  I see there:

  tabbar-default
  tabbar-unselected
  tabbar-selected
  tabbar-modified
  tabbar-highlight
  tabbar-separator
  tabbar-button
  tabbar-button-highlight

but not `tabbar-selected-highlight' and `tabbar-selected-modified'.

But you seem to ask only about `tabbar-selected'.  I don't see problems
with that part.  I tried analagous code in my themes and it works.  The
only thought I have about that is: perhaps you have another line with
"tabbar-selected" somewhere in your theme which overrides that one.
If not, try your theme with "emacs -Q".

--
Alex



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

* Re: writing your own theme and tabbar
  2014-08-29  4:39 ` Alex Kost
@ 2014-08-29 17:07   ` Sharon Kimble
  0 siblings, 0 replies; 4+ messages in thread
From: Sharon Kimble @ 2014-08-29 17:07 UTC (permalink / raw
  To: Alex Kost; +Cc: help-gnu-emacs

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

>> Sharon Kimble (2014-08-22 19:46 +0400) wrote:

>> I'm trying to develop/write my own theme which is doing more or less
>> what I want, except for 'tabbar'. This is what I have -
>>  '(tabbar-selected-highlight ((t (:background "black" :foreground "red" :height 85))))
>>  '(tabbar-selected-modified ((t (:background "black" :foreground "red" :weight bold :height 85))))
>>  '(tabbar-default ((t (:inherit variable-pitch :background "gray" :foreground "black" :weight bold :height 85)))) 
>>  '(tabbar-selected ((t (:inherit tabbar-default :background "black" :foreground "red" :weight bold :height 85))))
>>  '(tabbar-modified ((t (:background "black" :foreground "red" :weight bold :height 85)))))
>>
>> And what I'm looking for in the tab of the buffer that I'm in is a black
>> background with red text. But its not happening, instead what I'm
>> getting is red text on a light green background.
>>
>> [...]
>>
>> How can I achieve my goal please of red foreground on a black background
>> for every tab/buffer that is currently in use, i.e. I'm writing in that
>> buffer.

> Hello,
>
> Do you use tabbar from <https://github.com/dholm/tabbar>?  I see there:
>
>  tabbar-default
>  tabbar-unselected
>  tabbar-selected
>  tabbar-modified
>  tabbar-highlight
>  tabbar-separator
>  tabbar-button
>  tabbar-button-highlight
>
> but not `tabbar-selected-highlight' and `tabbar-selected-modified'.
>
> But you seem to ask only about `tabbar-selected'.  I don't see problems
> with that part.  I tried analagous code in my themes and it works.  The
> only thought I have about that is: perhaps you have another line with
> "tabbar-selected" somewhere in your theme which overrides that one.
> If not, try your theme with "emacs -Q".

Thanks for this Alex.

I'm using "tabbar-20140316.600" from the elpa stable. I currently have
*every* tab with a black background and red foreground/text, and the
buffer that I'm working in is showing a green background and red
foreground! But I'm happy with that as the difference is easy to see. But
thanks anyway.

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.5, emacs 24.3.93.1

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

end of thread, other threads:[~2014-08-29 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-22 15:46 writing your own theme and tabbar Sharon Kimble
2014-08-29  4:39 ` Alex Kost
2014-08-29 17:07   ` Sharon Kimble
     [not found] <mailman.7393.1408722425.1147.help-gnu-emacs@gnu.org>
2014-08-22 18:56 ` Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.