From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: dired-warning (was: bug of display-table & make-glyph-code) Date: Fri, 12 Oct 2007 02:57:29 +0300 Organization: JURTA Message-ID: <87ve9dut5o.fsf_-_@jurta.org> References: <200708271732.22306.zslevin@gmail.com> <46DD9F41.8090700@gmx.at> <46DE63EE.3070509@gmx.at> <46DE7DBA.90408@gmx.at> <46DEE8AB.9050203@gmx.at> <46DFBF17.4010702@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1192148541 4198 80.91.229.12 (12 Oct 2007 00:22:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Oct 2007 00:22:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 12 02:22:09 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ig8I4-00017G-1L for ged-emacs-devel@m.gmane.org; Fri, 12 Oct 2007 02:22:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ig8Hx-0004Kn-K7 for ged-emacs-devel@m.gmane.org; Thu, 11 Oct 2007 20:22:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ig8Ht-0004IQ-SW for emacs-devel@gnu.org; Thu, 11 Oct 2007 20:21:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ig8Hs-0004Gt-Ly for emacs-devel@gnu.org; Thu, 11 Oct 2007 20:21:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ig8Hs-0004GX-FQ for emacs-devel@gnu.org; Thu, 11 Oct 2007 20:21:56 -0400 Original-Received: from gnome.kiev.sovam.com ([212.109.32.24]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ig8Hs-0005f3-34 for emacs-devel@gnu.org; Thu, 11 Oct 2007 20:21:56 -0400 Original-Received: from relay02.kiev.sovam.com ([62.64.120.197]) by gnome.kiev.sovam.com with esmtp (Exim 4.67 (FreeBSD)) (envelope-from ) id 1Ig8Hq-000Bgd-B4; Fri, 12 Oct 2007 03:21:54 +0300 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay02.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1Ig8Hp-0005V0-Hh; Fri, 12 Oct 2007 03:21:54 +0300 In-Reply-To: <46DFBF17.4010702@gmx.at> (martin rudalics's message of "Thu\, 06 Sep 2007 10\:49\:27 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Scanner-Signature: d3dfc5a0b247ea81d48b6a940fe6235f X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 1587 [Oct 11 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 25 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80666 Archived-At: > Mapping dired-warning to font-lock-warning-face was a bad idea: The > latter is already used for marking and flagging. It seems better to use > `font-lock-comment-delimiter-face' just for the min-colors 8 case as in > the patch below. Since this change was synced to the trunk and I see it in action now, I agree it was a bad idea. The primary intention of introducing the dired-warning face was to warn users about possible security holes. But red is too strong color. There are many files and directories where permission to write is correct (especially for groups), but displaying their permissions in red in dired is distracting. This color usually requires an immediate action to fix the problem, but in most cases there are no problems. An analogy for this situation are warnings and errors issued by the compiler: when there is an error, it needs to be fixed, but most warnings are useless. compile.el uses two separate faces for errors and warnings: compilation-error and compilation-warning. compilation-error inherits from font-lock-warning-face, and compilation-warning has its own definition. I propose to add a new face font-lock-error-face, to copy its definition from font-lock-warning-face, and to copy the definition of compilation-warning to font-lock-warning-face. So dired-warning inheriting now from font-lock-warning-face will use the new definition. Making this distinction between two faces font-lock-error-face and font-lock-warning-face will be useful for other packages where error text should be displayed in the strong color, and warnings in more subdued color. PS: This proposal is for the trunk. For Emacs-22 I think we should restore the old color by copying definitions of font-lock-comment-face and font-lock-comment-delimiter-face to dired-warning like: (defface dired-warning '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) (((class color) (min-colors 8) (background light)) :foreground "red") (((class color) (min-colors 8) (background dark)) :foreground "red1")) "Face used to highlight a part of a buffer that needs user attention." :group 'dired-faces :version "22.1") -- Juri Linkov http://www.jurta.org/emacs/