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: RFC: [PATCH] isearch enhancements: symbol mode; syntactic filtering Date: Thu, 7 Jul 2011 20:23:58 -0700 Message-ID: <2A75A6DFE4AB403993132914C05D07F6@us.oracle.com> References: <4E15C0BA.10400@gmail.com> <87liw9mxrh.fsf@mail.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: dough.gmane.org 1310095480 25120 80.91.229.12 (8 Jul 2011 03:24:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2011 03:24:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Juri Linkov'" , "'Daniel Colascione'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 08 05:24:36 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qf1gC-0005uT-2V for ged-emacs-devel@m.gmane.org; Fri, 08 Jul 2011 05:24:36 +0200 Original-Received: from localhost ([::1]:59028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf1gA-0005E9-6p for ged-emacs-devel@m.gmane.org; Thu, 07 Jul 2011 23:24:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf1fp-0005Df-1A for emacs-devel@gnu.org; Thu, 07 Jul 2011 23:24:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qf1fn-0002Nx-H3 for emacs-devel@gnu.org; Thu, 07 Jul 2011 23:24:12 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:31020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf1fn-0002Nq-2j for emacs-devel@gnu.org; Thu, 07 Jul 2011 23:24:11 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p683O5ge032637 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Jul 2011 03:24:07 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p683O5vK008191 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jul 2011 03:24:05 GMT Original-Received: from abhmt109.oracle.com (abhmt109.oracle.com [141.146.116.61]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p683NxC2004139; Thu, 7 Jul 2011 22:23:59 -0500 Original-Received: from dradamslap1 (/10.159.32.31) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 Jul 2011 20:23:59 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87liw9mxrh.fsf@mail.jurta.org> Thread-Index: Acw9BRHRdQt40ve/Raaks6l5L+zvXwAD/PJw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4E167858.0001:SCFMA922111,ss=1,re=-4.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141775 Archived-At: > > - Case sensitivity is now displayed alongside other isearch > > settings in the isearch prompt. > > This is a good change as well, but one possible problem is that > its message string "case-insensitive " (17 characters) is too long > for the isearch prompt. In Isearch+, I just change the case of the minor-mode lighter in the mode line to indicate case-sensitivity: `Isearch' (case-sensitive) vs `ISEARCH' (insensitive). (I do the same thing in Icicles, for completion.) That adds no chars to either the prompt or the minor-mode lighter, and I find it is sufficiently noticeable (and always present during Isearch). This is all that's needed: 1. Add this call to `isearch-toggle-case-fold': (isearch-highlight-lighter) 2. Add this definition (or equivalent): (defun isearch-highlight-lighter () "Update minor-mode mode-line lighter to reflect case sensitivity." (let ((case-fold-search isearch-case-fold-search)) (when (and (eq case-fold-search t) search-upper-case) (setq case-fold-search (isearch-no-upper-case-p isearch-string isearch-regexp))) (setq minor-mode-alist (delete '(isearch-mode " ISEARCH") minor-mode-alist) minor-mode-alist (delete '(isearch-mode " Isearch") minor-mode-alist)) (add-to-list 'minor-mode-alist `(isearch-mode ,(if case-fold-search " ISEARCH" " Isearch")))) (condition-case nil (redisplay t) (error nil))) 3. (add-hook 'isearch-update-post-hook 'isearch-highlight-lighter) For the Emacs source code you would not need to use the hook (#3). You would just add the lighter change to function `isearch-update'.