From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: highlight failed part of isearch input Date: Sat, 23 Feb 2008 13:27:57 -0800 Message-ID: <003001c87662$f62a0280$0600a8c0@us.oracle.com> References: <008101c86d06$31c2f1f0$9eb22382@us.oracle.com><87fxvzxc0j.fsf@jurta.org><000901c86d0f$5beec1d0$405a908d@us.oracle.com><87lk5r3sf7.fsf@bzg.ath.cx> <87skzsvhvc.fsf@jurta.org> <8763wfpi9w.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1203802127 16147 80.91.229.12 (23 Feb 2008 21:28:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Feb 2008 21:28:47 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: "'Juri Linkov'" , "'Bastien'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 23 22:29:11 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 1JT1vW-0003lj-78 for ged-emacs-devel@m.gmane.org; Sat, 23 Feb 2008 22:28:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JT1v0-0002fi-KX for ged-emacs-devel@m.gmane.org; Sat, 23 Feb 2008 16:28:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JT1uw-0002fL-Dx for emacs-devel@gnu.org; Sat, 23 Feb 2008 16:28:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JT1uu-0002ex-OC for emacs-devel@gnu.org; Sat, 23 Feb 2008 16:28:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JT1uu-0002em-K3 for emacs-devel@gnu.org; Sat, 23 Feb 2008 16:28:20 -0500 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JT1uq-0005rP-G4; Sat, 23 Feb 2008 16:28:16 -0500 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m1NLS8KP007964; Sat, 23 Feb 2008 15:28:08 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m1NEZePO019175; Sat, 23 Feb 2008 14:28:08 -0700 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3587745491203802085; Sat, 23 Feb 2008 13:28:05 -0800 Original-Received: from dradamslap1 (/141.144.64.130) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 23 Feb 2008 13:28:05 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <8763wfpi9w.fsf@jurta.org> Thread-Index: Ach2VqbuaEL7xeYPQvq6xhKVfoLnTwAB/yTA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:90160 Archived-At: > The patch below fixes this problem. When the first message from the > isearch-cmds stack is not the same as isearch-message (this > happens when isearch-edit-string sets a different value) then it > uses this value for succ-msg. Thanks; good catch. > Also this patch uses a better background color for the > `isearch-fail' face - the same color as used by Firefox > for the background of the failed search text. UI designers > of Firefox made a good job and this color looks nice. How about separating that face-change suggestion, which is independent of the bug fix? Personally, I disagree about the color, at least for a light background with unlimited colors available - it is too vivid (bright, saturated, loud). For that, Plum or some other pastel is a better default, IMO. It's important to not only notice the failure but also easily read the text that is highlighted. For a dark background, the color should presumably be quite dark, not bright. Also, I think it should specify a foreground color by default, for the case where someone uses a different foreground color for a standalone minibuffer. How about something like this? The default color here for a dark background is the complement of Plum (a light violet): a dark green. You certainly don't want something like IndianRed1 or Plum on a dark background, I expect. (defface isearch-fail '((((class color) (min-colors 88) (background dark)) (:foreground "white" :background "#22225F5F2222")) (((class color) (min-colors 88) (background light)) (:foreground "Black" :background "Plum")) (((class color) (min-colors 8)) (:background "red")) (((type tty) (class mono)) :inverse-video t) (t :background "gray")) "Face for highlighting failed part in Isearch echo-area message." :version "23.1" :group 'isearch) I also added the mono case and the catch-all case. Copied them from the definition for `region'. I can't speak much to what should be the default for a dark background or for when there are limited colors available. Perhaps people who use those contexts could suggest an improvement. BTW - I'm no expert on face specs, but isn't your duplication of the red spec for (min-colors 8) and (min-colors 16) redundant? Doesn't (min-colors 8), as shown above, take care of both? > ! (defface isearch-fail '((t (:foreground "Black" :background > "Plum"))) > "Face for highlighting failed part in Isearch echo-area message." > :group 'isearch) > > (defcustom isearch-lazy-highlight t > --- 231,245 ---- > :group 'basic-faces) > (defvar isearch 'isearch) > > ! (defface isearch-fail > ! '((((class color) (min-colors 88)) > ! (:background "IndianRed1")) > ! (((class color) (min-colors 16)) > ! (:background "red")) > ! (((class color) (min-colors 8)) > ! (:background "red"))) > "Face for highlighting failed part in Isearch echo-area message." > + :version "23.1" > :group 'isearch)