From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Emphasize the character to be typed next in *Completions* Date: Thu, 25 Mar 2004 23:31:19 +0200 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87zna4tsfs.fsf@mail.jurta.org> References: <20040322053942.03A2467DC4@imf.math.ku.dk> <405EB27E.6020904@math.ku.dk> <20040322.185510.266153697.jet@gyve.org> <87isgva1wc.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1080259521 9657 80.91.224.253 (26 Mar 2004 00:05:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 26 Mar 2004 00:05:21 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Mar 26 01:05:14 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B6eqY-0001DR-00 for ; Fri, 26 Mar 2004 01:05:14 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B6eqT-0001gy-00 for ; Fri, 26 Mar 2004 01:05:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B6emj-0004ZK-Mk for emacs-devel@quimby.gnus.org; Thu, 25 Mar 2004 19:01:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B6ekS-0003sv-HH for emacs-devel@gnu.org; Thu, 25 Mar 2004 18:58:56 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B6ejt-0003br-Ia for emacs-devel@gnu.org; Thu, 25 Mar 2004 18:58:54 -0500 Original-Received: from [66.33.219.4] (helo=spork.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B6ejM-0003Ow-UT; Thu, 25 Mar 2004 18:57:49 -0500 Original-Received: from mail.jurta.org (80-235-37-18-dsl.mus.estpak.ee [80.235.37.18]) by spork.dreamhost.com (Postfix) with ESMTP id E71AA11DC31; Thu, 25 Mar 2004 15:57:37 -0800 (PST) Original-To: David Kastrup In-Reply-To: (David Kastrup's message of "23 Mar 2004 23:44:26 +0100") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20946 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20946 David Kastrup writes: > Juri Linkov writes: >> > I also implemented a version which highlights the common perfix string >> > in completions. And I felt that the visual feedback is too strong. >> > >> > I agree. To emphasize the part that is not informative is not a >> > useful feature. >> >> To emphasize the non-informative part is not useful, but a different >> face could be used to *de-emphasize* it. (Even if emphasizing the >> word "de-emphasize" looks paradoxical, it's appropriate here :-) >> For example, if the default foreground color is black, displaying >> the common prefix string in gray will make it more unnoticeable. > > file-name-shadow-mode does something like this, so one could take the > faces from there. It makes sense to use `file-name-shadow' face to de-emphasize files with ignored extensions in dired buffers. Index: emacs/lisp/dired.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/dired.el,v retrieving revision 1.276 diff -c -r1.276 dired.el *** emacs/lisp/dired.el 25 Mar 2004 10:40:59 -0000 1.276 --- emacs/lisp/dired.el 25 Mar 2004 21:10:00 -0000 *************** *** 334,340 **** ;; It is quicker to first find just an extension, then go back to the ;; start of that file name. So we do this complex MATCH-ANCHORED form. (list (concat "\\(" (regexp-opt completion-ignored-extensions) "\\|#\\)$") ! '(".+" (dired-move-to-filename) nil (0 font-lock-string-face))))) "Additional expressions to highlight in Dired mode.") ;;; Macros must be defined before they are used, for the byte compiler. --- 345,351 ---- ;; It is quicker to first find just an extension, then go back to the ;; start of that file name. So we do this complex MATCH-ANCHORED form. (list (concat "\\(" (regexp-opt completion-ignored-extensions) "\\|#\\)$") ! '(".+" (dired-move-to-filename) nil (0 'file-name-shadow))))) "Additional expressions to highlight in Dired mode.") ;;; Macros must be defined before they are used, for the byte compiler. -- Juri Linkov http://www.jurta.org/emacs/