all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* turning colors off
@ 2008-02-11 21:25 Rich Pixley
  2008-02-12  6:31 ` Drew Adams
  2008-02-13  0:08 ` Karl Berry
  0 siblings, 2 replies; 9+ messages in thread
From: Rich Pixley @ 2008-02-11 21:25 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

I'm having a lot of trouble with recent versions of emacs which try to 
use color as a means of syntax highlighting.  I'm sure many people must 
like this, but I find them illegible mostly due to contrast issues.

Is there some way I can shut this off globally?

--rich




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

* RE: turning colors off
  2008-02-11 21:25 turning colors off Rich Pixley
@ 2008-02-12  6:31 ` Drew Adams
  2008-02-13  0:08 ` Karl Berry
  1 sibling, 0 replies; 9+ messages in thread
From: Drew Adams @ 2008-02-12  6:31 UTC (permalink / raw)
  To: 'Rich Pixley', help-gnu-emacs

> I'm having a lot of trouble with recent versions of emacs 
> which try to use color as a means of syntax highlighting.
> I'm sure many people must like this,

Yes, most people prefer it, not because it is pretty or cool, but because
the highlighting conveys useful information.

> but I find them illegible mostly due to contrast issues.
> 
> Is there some way I can shut this off globally?

Sure. Options menu > Customize Emacs > Specific Option >
global-font-lock-mode. That is, turn off `global-font-lock-mode'.

However, if your problem is the particular colors used, rather than the fact
that color is used at all, know that you can customize those colors
(individually). Colored, bold, etc. text is controlled by Emacs "faces".

Put the cursor on some colored text and do `M-x customize-face'. The name of
the face used for that colored text will appear as the face to customize -
just hit `RET' to accept it. In the Customize buffer that opens, specify the
face properties, including foreground and background colors that you want.

You might need to do that for several, or even for many, faces, depending on
your sensitivity and preferences, but you only need to do it once - you can
save your changes in the same Customize buffer.

HTH. Remember that the Emacs manual is your friend - look for "face" and
"customize" in the index.





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

* Re: turning colors off
       [not found] <mailman.7313.1202795603.18990.help-gnu-emacs@gnu.org>
@ 2008-02-12 16:02 ` Joel J. Adamson
  2008-02-12 16:47   ` Bastien Guerry
  2008-02-14 19:52 ` Stefan Monnier
  1 sibling, 1 reply; 9+ messages in thread
From: Joel J. Adamson @ 2008-02-12 16:02 UTC (permalink / raw)
  To: help-gnu-emacs

Rich Pixley <rich.pixley@palm.com> writes:

> I'm having a lot of trouble with recent versions of emacs which try to
> use color as a means of syntax highlighting.  I'm sure many people
> must like this, but I find them illegible mostly due to contrast
> issues.
>
> Is there some way I can shut this off globally?

Yes, as Drew already mentioned.  However, if you'd like different colors
you can customize the faces, or you can use the color-theme.el package
(see http://www.emacswiki.org/cgi-bin/wiki/ColorTheme ).

Joel

-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109


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

* Re: turning colors off
  2008-02-12 16:02 ` Joel J. Adamson
@ 2008-02-12 16:47   ` Bastien Guerry
  0 siblings, 0 replies; 9+ messages in thread
From: Bastien Guerry @ 2008-02-12 16:47 UTC (permalink / raw)
  To: Joel J. Adamson; +Cc: help-gnu-emacs

jadamson@partners.org (Joel J. Adamson) writes:

> Rich Pixley <rich.pixley@palm.com> writes:
>
>> I'm having a lot of trouble with recent versions of emacs which try to
>> use color as a means of syntax highlighting.  I'm sure many people
>> must like this, but I find them illegible mostly due to contrast
>> issues.
>>
>> Is there some way I can shut this off globally?
>
> Yes, as Drew already mentioned.  However, if you'd like different colors
> you can customize the faces, 

Yes.  Put the cursor on the fontified text which face you would like to
change and M-x customize-face RET.  The prompt will offer you the face
at point as the default face to edit.  Very handy.

-- 
Bastien




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

* Re: turning colors off
  2008-02-11 21:25 turning colors off Rich Pixley
  2008-02-12  6:31 ` Drew Adams
@ 2008-02-13  0:08 ` Karl Berry
  1 sibling, 0 replies; 9+ messages in thread
From: Karl Berry @ 2008-02-13  0:08 UTC (permalink / raw)
  To: rich.pixley; +Cc: help-gnu-emacs

    I'm having a lot of trouble with recent versions of emacs which try to 
    use color as a means of syntax highlighting.  

Me too.  I also wanted to turn off faces (bold, etc.), which look
especially bad in a tty emacs.

    I'm sure many people must like this, but I find them illegible
    mostly due to contrast issues.

Me too.  

    Is there some way I can shut this off globally?

My experience was that (global-font-lock 0) is insufficient to do what I
want.  (There is a long thread on emacs-devel about it when I reported
this in August 2007.)

The best approach for me was suggested by Juri Linkov (jurta.org), which
is to explicitly reset all faces, except for the mode line.  Here is the
code, mostly written by him.  Hope this helps.

karl


;; Kill all faces except mode lines
(defun my-faces-fix (&optional frame)
  "Fix defined faces."
  (interactive)
  ;; Check if this function is called by `custom-define-hook' from
  ;; `custom-declare-face' where the variable `face' is bound locally.
  (when (boundp 'face)
    (dolist (face (face-list))
      (unless (string-match "^mode-line" (symbol-name face))
        ;; Reset all face attributes
        (modify-face face)))))
;;
;; 1. Fix existing faces
(let ((face t)) (my-faces-fix))
;;
;; 2. Call `my-faces-fix' every time some new face gets defined
(add-to-list 'custom-define-hook 'my-faces-fix)

;; for mode line background under X.
(set-face-attribute 'mode-line nil :background "white")

;; Juri needed this for tty, but I don't seem to:
;(set-face-attribute 'mode-line nil :inverse-video t)




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

* Re: turning colors off
       [not found] <mailman.7360.1202878396.18990.help-gnu-emacs@gnu.org>
@ 2008-02-13  7:46 ` Tim X
  2008-02-13 15:19   ` Drew Adams
       [not found]   ` <mailman.7371.1202915992.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Tim X @ 2008-02-13  7:46 UTC (permalink / raw)
  To: help-gnu-emacs

karl@freefriends.org (Karl Berry) writes:

>     I'm having a lot of trouble with recent versions of emacs which try to 
>     use color as a means of syntax highlighting.  
>
> Me too.  I also wanted to turn off faces (bold, etc.), which look
> especially bad in a tty emacs.
>
>     I'm sure many people must like this, but I find them illegible
>     mostly due to contrast issues.
>
> Me too.  
>
>     Is there some way I can shut this off globally?
>
> My experience was that (global-font-lock 0) is insufficient to do what I
> want.  (There is a long thread on emacs-devel about it when I reported
> this in August 2007.)
>
> The best approach for me was suggested by Juri Linkov (jurta.org), which
> is to explicitly reset all faces, except for the mode line.  Here is the
> code, mostly written by him.  Hope this helps.
>
> karl
>
>
> ;; Kill all faces except mode lines
> (defun my-faces-fix (&optional frame)
>   "Fix defined faces."
>   (interactive)
>   ;; Check if this function is called by `custom-define-hook' from
>   ;; `custom-declare-face' where the variable `face' is bound locally.
>   (when (boundp 'face)
>     (dolist (face (face-list))
>       (unless (string-match "^mode-line" (symbol-name face))
>         ;; Reset all face attributes
>         (modify-face face)))))
> ;;
> ;; 1. Fix existing faces
> (let ((face t)) (my-faces-fix))
> ;;
> ;; 2. Call `my-faces-fix' every time some new face gets defined
> (add-to-list 'custom-define-hook 'my-faces-fix)
>
> ;; for mode line background under X.
> (set-face-attribute 'mode-line nil :background "white")
>
> ;; Juri needed this for tty, but I don't seem to:
> ;(set-face-attribute 'mode-line nil :inverse-video t)
>
>

What I've found useful is to use lM-x list-colors-display, which will
give you a window showing all the currently defined faces (remembering
that some faces don't get defined until the mode they belong to has been
loaded). 

While in the buffer, you can see the name of the face and a sample of
what it looks like. You can then click on a face with colors you don't
like (e.g. one with bad contrast) and a customize buffer opens for that
face. Set the attributes you want (i.e. weight, slant, foreground,
background etc), save it and now that face will hve the new definition
each time you run emacs. 

Another alternative already mentioned is the color-themes package. It
works quite well. I don't use it becuase there is no theme I like as
much as what I get defining the faces myself. I've thought about
defining a new theme and submitting it to be included, but its low on
the ever growing todo list!

HTH

Tim

-- 
tcross (at) rapttech dot com dot au


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

* RE: turning colors off
  2008-02-13  7:46 ` Tim X
@ 2008-02-13 15:19   ` Drew Adams
       [not found]   ` <mailman.7371.1202915992.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Drew Adams @ 2008-02-13 15:19 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: 'Tim X'

> What I've found useful is to use lM-x list-colors-display, which will
> give you a window showing all the currently defined faces (remembering
> that some faces don't get defined until the mode they belong 
> to has been
> loaded). 

I think Tim means `M-x list-faces-display'.

list-colors-display shows colors defined for your platform.





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

* Re: turning colors off
       [not found]   ` <mailman.7371.1202915992.18990.help-gnu-emacs@gnu.org>
@ 2008-02-14  9:18     ` Tim X
  0 siblings, 0 replies; 9+ messages in thread
From: Tim X @ 2008-02-14  9:18 UTC (permalink / raw)
  To: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:

>> What I've found useful is to use lM-x list-colors-display, which will
>> give you a window showing all the currently defined faces (remembering
>> that some faces don't get defined until the mode they belong 
>> to has been
>> loaded). 
>
> I think Tim means `M-x list-faces-display'.
>
> list-colors-display shows colors defined for your platform.
>
Your quite right. I always get those mixed up!

thanks for the correction.

Tim


-- 
tcross (at) rapttech dot com dot au


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

* Re: turning colors off
       [not found] <mailman.7313.1202795603.18990.help-gnu-emacs@gnu.org>
  2008-02-12 16:02 ` Joel J. Adamson
@ 2008-02-14 19:52 ` Stefan Monnier
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2008-02-14 19:52 UTC (permalink / raw)
  To: help-gnu-emacs

> I'm having a lot of trouble with recent versions of emacs which try to use
> color as a means of syntax highlighting.  I'm sure many people must like
> this, but I find them illegible mostly due to contrast issues.

> Is there some way I can shut this off globally?

I also dislike those colors, but rather than turning it off, I like to
change it so it doesn't rely nearly as much on color.  E.g. I make
comments grey, I make strings use italics, and make important elements
(such as names of function at the definition site) bold.
Everything else (e.g. keywords like `if') is set to use the
default font.


        Stefan


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

end of thread, other threads:[~2008-02-14 19:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 21:25 turning colors off Rich Pixley
2008-02-12  6:31 ` Drew Adams
2008-02-13  0:08 ` Karl Berry
     [not found] <mailman.7360.1202878396.18990.help-gnu-emacs@gnu.org>
2008-02-13  7:46 ` Tim X
2008-02-13 15:19   ` Drew Adams
     [not found]   ` <mailman.7371.1202915992.18990.help-gnu-emacs@gnu.org>
2008-02-14  9:18     ` Tim X
     [not found] <mailman.7313.1202795603.18990.help-gnu-emacs@gnu.org>
2008-02-12 16:02 ` Joel J. Adamson
2008-02-12 16:47   ` Bastien Guerry
2008-02-14 19:52 ` Stefan Monnier

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.