From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: how to fix too-dark blue keywords with black background Date: Fri, 03 Jun 2016 23:44:10 +0200 Organization: Aioe.org NNTP Server Message-ID: <868tymne1h.fsf@student.uu.se> References: <02f2cd61-f8a0-4ecd-b8ed-b4a31124f2bf@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1464990349 10571 80.91.229.3 (3 Jun 2016 21:45:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jun 2016 21:45:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 03 23:45:48 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b8wuF-0000Jx-5E for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jun 2016 23:45:27 +0200 Original-Received: from localhost ([::1]:57895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8wuE-0001nv-9h for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jun 2016 17:45:26 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 79 Original-NNTP-Posting-Host: EoOtCC1fCYcttx6jjhWUlA.user.gioia.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:a30i5kPFzPr7sCrzyTJBAPLQ0t0= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:217978 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110286 Archived-At: 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 -