* how to fix too-dark blue keywords with black background
@ 2016-06-03 19:26 barrchris
2016-06-03 21:44 ` Emanuel Berg
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: barrchris @ 2016-06-03 19:26 UTC (permalink / raw)
To: help-gnu-emacs
Certain keywords display with an unreadable dark blue, on a black background.
Like: getopts or echo or source, with emacs mode Shell-script[bash].
Other things are too dark in sql-mode: SQL[ansi]
Is it best to change the dark blue in PuTTY settings or in emacs?
It looks like I have a default theme - I see nothing display-related in ~/.emacs.d/init.el or ~/.emacs
I like the dark background, I like the syntax colorizing, it's just these dark-blue colors.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to fix too-dark blue keywords with black background
2016-06-03 19:26 how to fix too-dark blue keywords with black background barrchris
@ 2016-06-03 21:44 ` Emanuel Berg
2016-06-10 13:41 ` barrchris
2016-06-10 14:52 ` barrchris
2 siblings, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2016-06-03 21:44 UTC (permalink / raw)
To: help-gnu-emacs
barrchris@gmail.com writes:
> Certain keywords display with an unreadable
> dark blue, on a black background. Like:
> getopts or echo or source, with emacs mode
> Shell-script[bash]. Other things are too dark
> in sql-mode: SQL[ansi]
>
> Is it best to change the dark blue in PuTTY
> settings or in emacs?
Both!
Start by setting up the terminal colors.
It is a good help to have a test function to
output all colors.
For example the below zsh. Here is a dump what
it shows for me:
http://user.it.uu.se/~embe8573/figures/shell/test-colors.png
Then get the colors right. I don't know how to
do that for PuTTY - for the Linux VTs and
X (e.g., xterm) tho there are some material
here:
http://user.it.uu.se/~embe8573/cols/www/index.html
http://user.it.uu.se/~embe8573/cols/www/COLORS
http://user.it.uu.se/~embe8573/scripts/cols
After you have done this, nine out of ten
colors in Emacs should look good. If you see
one that doesn't, place point at it and use
this function to find out what face it is:
(defun what-face (pos)
(interactive "d")
(let((face (or (get-char-property pos 'face)
(get-char-property pos 'read-cf-name) )))
(message " Face: %s" (or face "(no face!)")) ))
Then re-assign the face some other color which
is better in that context.
Oh, the zsh - change into bash if needed:
set-fg-color () { tput setaf $1 } # color ($1) is 0-7
set-bg-color () { tput setab $1 }
set-bold () { tput bold }
reset-color () { tput sgr0 }
test-colors () {
local color_number
local color
local -a color_names
color_names=(black red green yellow blue magenta cyan white)
echo
for color_number in {0..7}; do
echo -n " $color_number "
set-fg-color $color_number
color=$color_names[(( $color_number + 1 ))]
echo -n $color "\t"; tput bold; echo $color
reset-color
done
echo
}
From the file: http://user.it.uu.se/~embe8573/conf/.zsh/vt
Good luck!
--
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
- so far: 45 Blogomatic articles -
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to fix too-dark blue keywords with black background
2016-06-03 19:26 how to fix too-dark blue keywords with black background barrchris
2016-06-03 21:44 ` Emanuel Berg
@ 2016-06-10 13:41 ` barrchris
2016-06-10 14:04 ` Emanuel Berg
2016-06-10 14:52 ` barrchris
2 siblings, 1 reply; 6+ messages in thread
From: barrchris @ 2016-06-10 13:41 UTC (permalink / raw)
To: help-gnu-emacs
On Friday, June 3, 2016 at 3:26:48 PM UTC-4, barr...@gmail.com wrote:
> Certain keywords display with an unreadable dark blue, on a black background.
> Like: getopts or echo or source, with emacs mode Shell-script[bash].
> Other things are too dark in sql-mode: SQL[ansi]
>
> Is it best to change the dark blue in PuTTY settings or in emacs?
>
> It looks like I have a default theme - I see nothing display-related in ~/.emacs.d/init.el or ~/.emacs
>
> I like the dark background, I like the syntax colorizing, it's just these dark-blue colors.
I only need to change one color - is there a simple way to do this in Putty or in emacs?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to fix too-dark blue keywords with black background
2016-06-10 13:41 ` barrchris
@ 2016-06-10 14:04 ` Emanuel Berg
0 siblings, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2016-06-10 14:04 UTC (permalink / raw)
To: help-gnu-emacs
barrchris@gmail.com writes:
> I only need to change one color - is there
> a simple way to do this in Putty or in emacs?
Place point at the text which has the color,
then use this function
(defun what-face (pos)
(interactive "d")
(let((face (or (get-char-property pos 'face)
(get-char-property pos 'read-cf-name) )))
(message " Face: %s" (or face "(no face!)")) ))
to find out what face it is.
If it is, say, `w3m-image-anchor', use this to
set it to white foreground, green background,
using the bold (or bright) version of white
(the fifth argument being t).
(modify-face 'w3m-image-anchor "white" "green" nil t)
Eval these for cool effects with the Mode line:
(modify-face 'mode-line "white" "blue" nil t)
(modify-face 'mode-line-inactive "white" "red" nil nil)
Most often you don't want a background, so set it to nil:
(modify-face 'gnus-group-news-6 "blue" nil nil t)
And so on. Dig deep...
If you want to change the color itself, i.e.
what RGB composition it means to be "white"
(and green, blue, red, etc.) I do this in the
Linux VTs and in xterm [1] - in PuTTY,
a Windows ssh/telnet client, I suspect it is
still possible.
[1] http://user.it.uu.se/~embe8573/blogomatic/emacs/colors.html
--
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
- so far: 48 Blogomatic articles -
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to fix too-dark blue keywords with black background
2016-06-03 19:26 how to fix too-dark blue keywords with black background barrchris
2016-06-03 21:44 ` Emanuel Berg
2016-06-10 13:41 ` barrchris
@ 2016-06-10 14:52 ` barrchris
2016-06-10 16:21 ` tomas
2 siblings, 1 reply; 6+ messages in thread
From: barrchris @ 2016-06-10 14:52 UTC (permalink / raw)
To: help-gnu-emacs
On Friday, June 3, 2016 at 3:26:48 PM UTC-4, barr...@gmail.com wrote:
> Certain keywords display with an unreadable dark blue, on a black background.
> Like: getopts or echo or source, with emacs mode Shell-script[bash].
> Other things are too dark in sql-mode: SQL[ansi]
>
> Is it best to change the dark blue in PuTTY settings or in emacs?
>
> It looks like I have a default theme - I see nothing display-related in ~/.emacs.d/init.el or ~/.emacs
>
> I like the dark background, I like the syntax colorizing, it's just these dark-blue colors.
Thanks, but how can I "use this function" ?
paste it in my .emacs?
(defun what-face (pos)
(interactive "d")
(let((face (or (get-char-property pos 'face)
(get-char-property pos 'read-cf-name) )))
(message " Face: %s" (or face "(no face!)")) ))
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: how to fix too-dark blue keywords with black background
2016-06-10 14:52 ` barrchris
@ 2016-06-10 16:21 ` tomas
0 siblings, 0 replies; 6+ messages in thread
From: tomas @ 2016-06-10 16:21 UTC (permalink / raw)
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, Jun 10, 2016 at 07:52:39AM -0700, barrchris@gmail.com wrote:
> On Friday, June 3, 2016 at 3:26:48 PM UTC-4, barr...@gmail.com wrote:
> > Certain keywords display with an unreadable dark blue, on a black background.
> > Like: getopts or echo or source, with emacs mode Shell-script[bash].
> > Other things are too dark in sql-mode: SQL[ansi]
> >
> > Is it best to change the dark blue in PuTTY settings or in emacs?
> >
> > It looks like I have a default theme - I see nothing display-related in ~/.emacs.d/init.el or ~/.emacs
> >
> > I like the dark background, I like the syntax colorizing, it's just these dark-blue colors.
>
> Thanks, but how can I "use this function" ?
> paste it in my .emacs?
>
> (defun what-face (pos)
> (interactive "d")
> (let((face (or (get-char-property pos 'face)
> (get-char-property pos 'read-cf-name) )))
> (message " Face: %s" (or face "(no face!)")) ))
That depends. If you just want to use it "once" (i.e. in the current
session), just paste it in some throwaway buffer (e.g. *scratch*) and
execute the code by placing point at its end and typing C-x C-e (aka
CTRL-x CTRL-e). If you want to have it permanently available, you can
put it in your .emacs, yes.
Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlda6PQACgkQBcgs9XrR2kafjwCeLyt4j5FsUU7dOh8OUQK2WvGQ
sWIAni/iad2+EX3ajTzpkDYZ7A9R9IyI
=/Nin
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-10 16:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-03 19:26 how to fix too-dark blue keywords with black background barrchris
2016-06-03 21:44 ` Emanuel Berg
2016-06-10 13:41 ` barrchris
2016-06-10 14:04 ` Emanuel Berg
2016-06-10 14:52 ` barrchris
2016-06-10 16:21 ` tomas
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.