unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* emacs color scheme
@ 2003-10-31 19:11 Han Xu
  2003-11-03  8:21 ` Yongtao Yang
  0 siblings, 1 reply; 3+ messages in thread
From: Han Xu @ 2003-10-31 19:11 UTC (permalink / raw)



Hello,

When I use emacs v20 on Redhat Linux GNOME desktop. Emacs runs in GUI,
and the default setting for colors are: white background, black text, and
corresponding syntax highlights colors.

When I ssh/telnet to a Redhat Linux, and run same version emacs, it runs
in terminal/text mode, and the default settings for colors are: black
background, white text, and corresponding syntax highlights colors
(different colors with GUI mode).

I prefer the colors used in terminal/text mode, but I use GUI desktop more
than I use ssh/telnet. I am wondering if I can let Emacs use the same
colors settings in GUI mode as in default terminal/text mode ?

(I tried to put color scheme setting in .emacs file, but the problem is
that it changes both GUI mode colors and text mode colors, and it takes
sometime to load the scheme. And I didn't find the right scheme matching
the default terminal/text mode colors!)

Thanks,

Han

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

* Re: emacs color scheme
  2003-10-31 19:11 emacs color scheme Han Xu
@ 2003-11-03  8:21 ` Yongtao Yang
  2003-11-03 15:05   ` Thien-Thi Nguyen
  0 siblings, 1 reply; 3+ messages in thread
From: Yongtao Yang @ 2003-11-03  8:21 UTC (permalink / raw)


Han Xu <xuhan@tokyo.cc.gatech.edu> writes:

> Hello,
>
Hi,
 
> 
> When I ssh/telnet to a Redhat Linux, and run same version emacs, it runs
> in terminal/text mode, and the default settings for colors are: black
> background, white text, and corresponding syntax highlights colors
> (different colors with GUI mode).
Since you are using a terminal with black background and white foreground.

> 
> I prefer the colors used in terminal/text mode, but I use GUI desktop more
> than I use ssh/telnet. I am wondering if I can let Emacs use the same
> colors settings in GUI mode as in default terminal/text mode ?
> 

There are several ways, since you are using X window, the easiest way
is to put the following into your ~/.Xdefaults file.

emacs*Foreground: white
emacs*Background: black

Then run 
$ xrdb -load .Xdfaults
If you start emacs after that , you should have your GUI emacs with
the color theme as you textmode emacs.

There are some other GUI options you can tweak, it is a good idea to
check the emacs info, i.e. from emacs, do
"C-h i m Emacs m Resources X"

> (I tried to put color scheme setting in .emacs file, but the problem is
> that it changes both GUI mode colors and text mode colors, and it takes
> sometime to load the scheme. And I didn't find the right scheme matching
> the default terminal/text mode colors!)
> 

Maybe "M-x color-theme-dark-laptop"?
> Thanks,
> 
> Han

-- 
Yongtao Yang

email: yangyongtao@yahoo.com

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

* Re: emacs color scheme
  2003-11-03  8:21 ` Yongtao Yang
@ 2003-11-03 15:05   ` Thien-Thi Nguyen
  0 siblings, 0 replies; 3+ messages in thread
From: Thien-Thi Nguyen @ 2003-11-03 15:05 UTC (permalink / raw)


another way is to write/munge elisp to set colors as you prefer.  see below
for one example.  there are other similar bits of code on the Net.

thi


__________________________________________________________
;;; ID: set-theme.el,v 1.12 2003/09/08 00:08:04 ttn Rel
;;;
;;; Copyright (C) 2000,2002-2003 Thien-Thi Nguyen
;;; This file is part of ttn's personal elisp library, released under GNU
;;; GPL with ABSOLUTELY NO WARRANTY.  See the file COPYING for details.
;;;
;;; Description: Select an appearance configuration.

(defvar themes '(;;name       bg    fg        m-fg
                 (classic-ttn \#a85 black     white)
                 (new-earthy  black sienna    gray30)
                 (zzzzzzzzzz  black darkgreen black)
                 (caffeine    black yellow    white)
                 (polar       white black     white)
                 (dream       black cyan      blue))
  "Alist w/ elements of form:
\(NAME BACKGROUND FOREGROUND MODELINE-FOREGROUND\)")

;;;###autoload
(defun set-theme (name)
  (interactive (list (completing-read "Theme: "
                                      (mapcar #'list
                                              (mapcar #'symbol-name
                                                      (mapcar #'car
                                                              themes)))
                                      nil       ;;; predicate
                                      t)))      ;;; require-match
  (when (symbolp name)
    (setq name (symbol-name name)))
  (if (string= "" name)
      (message "(%d themes, none chosen)"
               (and
                (describe-variable 'themes)
                (length themes)))
    (apply (lambda (fg bg m-fg)
             (set-background-color fg)
             (set-foreground-color bg)
             (set-face-foreground 'modeline m-fg))
           (mapcar #'symbol-name
                   (cdr (assq (intern name) themes))))))

(provide 'set-theme)

;;; set-theme.el,v1.12 ends here

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

end of thread, other threads:[~2003-11-03 15:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-31 19:11 emacs color scheme Han Xu
2003-11-03  8:21 ` Yongtao Yang
2003-11-03 15:05   ` Thien-Thi Nguyen

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