emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.50; Middle w in of permissions in dired-mode is red and bold: d


From: Juri Linkov
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu)

>> Cc: address@hidden
>> From: Juri Linkov <address@hidden>
>> 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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]