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: Re: 23.0.50; Middle w in of permissions in dired-mode is red and bold: dired-warning Date: Thu, 13 Mar 2008 04:19:37 +0200 Organization: JURTA Message-ID: <878x0n1g86.fsf@jurta.org> References: <87hckt9z1u.fsf_-_@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205379060 7195 80.91.229.12 (13 Mar 2008 03:31:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Mar 2008 03:31:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 13 04:31:28 2008 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 1JZeAA-0006Wc-UJ for ged-emacs-devel@m.gmane.org; Thu, 13 Mar 2008 04:31:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZe9c-0000yY-19 for ged-emacs-devel@m.gmane.org; Wed, 12 Mar 2008 23:30:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JZe7j-0008O0-CQ for emacs-devel@gnu.org; Wed, 12 Mar 2008 23:28:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JZe7f-0008M3-Se for emacs-devel@gnu.org; Wed, 12 Mar 2008 23:28:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JZe7f-0008Lx-NW for emacs-devel@gnu.org; Wed, 12 Mar 2008 23:28:51 -0400 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JZe7b-0000ab-RH; Wed, 12 Mar 2008 23:28:48 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JZe7Z-000M6T-Go; Thu, 13 Mar 2008 05:28:46 +0200 In-Reply-To: (Eli Zaretskii's message of "Mon, 15 Oct 2007 00:20:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu) X-Scanner-Signature: a89dff86c47152c77ba722073511b1ec 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 2396 [Mar 12 2008] 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: 11 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 4.8-5.1 (or MacOS X 10.2-10.3) 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:92362 Archived-At: >> Cc: emacs-devel@gnu.org >> From: Juri Linkov >> Date: Mon, 15 Oct 2007 00:21:01 +0300 >> >> I don't understand the need of adding a new face `dired-warn-writable'? > > To get me off the hook with people who use dired-warning-face. > > I don't mind removing dired-warning-face, but its doc string is quite > general: > > "Face used to highlight a part of a buffer that needs user attention." > > which to me means it could be used for something other than mode > bits. "Perhaps someone customized dired-font-lock-keywords," says I, > in which case leaving that face alone won't do any particular harm. > >> It adds another unnecessary face, and still doesn't fix a problem >> of the annoying bold red indication of group and world writable permissions. > > It does fix that on platforms where group- and world-writable files > are the default. On other platforms, you can customize it, or we can > make it inherit from `default' on _all_ platforms. I didn't do it > because I was unsure how many users of Unix and GNU systems actually > want to pay attention to such files. > >> Otherwise, we could revert the `dired-warning' face to less annoying >> colors > > As long as the face's name is *-warning, I think making it inherit > from font-lock-warning-face is TRT: if we want to warn about > something, let that something stand out like any other warning. > > That is why I renamed the face to something less general. And if the > "warn" part isn't consistent enough with what I say above, it (the > "warn" part of the face's name) can go away. When testing Emacs 22 with `emacs -Q', I see that dired buffers are almost unusable by default. The red bold face for write permissions is very distracting that prevents focusing on other parts of the dired buffer. I'm afraid Emacs users will hate us for this if we release Emacs 22.2 with this annoyance. I propose a patch below for the 22 branch that renames the face `dired-warn-writable' to more appropriate name `dired-perm-write' that doesn't associate it with a warning, and changes its parent face from `font-lock-warning-face' to `font-lock-comment-delimiter-face' on non-Windows platforms. The face `dired-warning' that inherits from `font-lock-warning-face' still remains in dired.el, but it is not used anywhere. Index: lisp/dired.el =================================================================== RCS file: /sources/emacs/emacs/lisp/dired.el,v retrieving revision 1.359.2.10 diff -c -r1.359.2.10 dired.el *** lisp/dired.el 22 Feb 2008 18:47:26 -0000 1.359.2.10 --- lisp/dired.el 13 Mar 2008 02:19:00 -0000 *************** *** 344,356 **** (defvar dired-warning-face 'dired-warning "Face name used for a part of a buffer that needs user attention.") ! (defface dired-warn-writable '((((type w32 pc)) :inherit default) ;; These default to rw-rw-rw. ! (t (:inherit font-lock-warning-face))) "Face used to highlight permissions of group- and world-writable files." :group 'dired-faces :version "22.2") ! (defvar dired-warn-writable-face 'dired-warn-writable "Face name used for permissions of group- and world-writable files.") (defface dired-directory --- 344,356 ---- (defvar dired-warning-face 'dired-warning "Face name used for a part of a buffer that needs user attention.") ! (defface dired-perm-write '((((type w32 pc)) :inherit default) ;; These default to rw-rw-rw. ! (t (:inherit font-lock-comment-delimiter-face))) "Face used to highlight permissions of group- and world-writable files." :group 'dired-faces :version "22.2") ! (defvar dired-perm-write-face 'dired-perm-write "Face name used for permissions of group- and world-writable files.") (defface dired-directory *************** *** 414,423 **** ;; fields with keymaps to frob the permissions, somewhat a la XEmacs. (list (concat dired-re-maybe-mark dired-re-inode-size "[-d]....\\(w\\)....") ; group writable ! '(1 dired-warn-writable-face)) (list (concat dired-re-maybe-mark dired-re-inode-size "[-d].......\\(w\\).") ; world writable ! '(1 dired-warn-writable-face)) ;; ;; Subdirectories. (list dired-re-dir --- 414,423 ---- ;; fields with keymaps to frob the permissions, somewhat a la XEmacs. (list (concat dired-re-maybe-mark dired-re-inode-size "[-d]....\\(w\\)....") ; group writable ! '(1 dired-perm-write-face)) (list (concat dired-re-maybe-mark dired-re-inode-size "[-d].......\\(w\\).") ; world writable ! '(1 dired-perm-write-face)) ;; ;; Subdirectories. (list dired-re-dir -- Juri Linkov http://www.jurta.org/emacs/