From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Yanking isearch to highlight-regexp Date: Sun, 15 Jun 2008 23:10:25 +0200 Message-ID: <48558541.5000209@gmail.com> References: <4853F884.7000609@gmail.com> <7dbe73ed0806141442h342f8ff0u83863f3980a7e229@mail.gmail.com> <48545D78.8080103@gmail.com> <4854E536.8040407@gmail.com> <87k5gql900.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1213564250 495 80.91.229.12 (15 Jun 2008 21:10:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Jun 2008 21:10:50 +0000 (UTC) Cc: David Koppelman , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 15 23:11:33 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 1K7zVd-0007Zs-5G for ged-emacs-devel@m.gmane.org; Sun, 15 Jun 2008 23:11:33 +0200 Original-Received: from localhost ([127.0.0.1]:35992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7zUo-0000Af-Tj for ged-emacs-devel@m.gmane.org; Sun, 15 Jun 2008 17:10:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K7zUk-00009C-73 for emacs-devel@gnu.org; Sun, 15 Jun 2008 17:10:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K7zUj-00008n-OG for emacs-devel@gnu.org; Sun, 15 Jun 2008 17:10:37 -0400 Original-Received: from [199.232.76.173] (port=54136 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7zUj-00008h-Ih for emacs-devel@gnu.org; Sun, 15 Jun 2008 17:10:37 -0400 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:38678) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K7zUh-0006mK-VL for emacs-devel@gnu.org; Sun, 15 Jun 2008 17:10:37 -0400 Original-Received: from c83-254-145-59.bredband.comhem.se ([83.254.145.59]:65421 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1K7zUd-0001l0-8r; Sun, 15 Jun 2008 23:10:32 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <87k5gql900.fsf@jurta.org> X-Antivirus: avast! (VPS 080615-0, 2008-06-15), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.145.59 X-ACL-Warn: Too high rate of unknown addresses received from you X-Scan-Result: No virus found in message 1K7zUd-0001l0-8r. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1K7zUd-0001l0-8r 015e8d93440f625a0ddc4acb25727728 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:99271 Archived-At: Juri Linkov wrote: >> Why is not C-x w h always bound to higlight-regexp? > > I think the key `C-x w' by its mnemonics would be more suitable for > a command that writes to the file like `C-x C-w'. > > As the comment in hi-lock.el suggests to bind it rather to `C-z h', I just want the key binding to be the same as I use outside of isearch. There were no global binding for `occur' so in that case I thought `M-s o' was good, but in this case I would really prefer the same binding inside isearch. My rather cryptic patch to hi-lock.el provided that - you are very welcome to make it better if you want. > below is a patch for isearch.el with a new command `isearch-highlight-regexp' > bound to `M-s h'. It is equivalent to the previously implemented > `isearch-occur' in regard to calling the command with the last isearch > string/regexp. `isearch-highlight-regexp' is a useful command, and > it is much better than setting `lazy-highlight-cleanup' to nil, because > `lazy-highlight-cleanup' leaves highlighting limited only to the current > window boundaries, whereas `highlight-regexp' highlights the entire buffer. > > As for the separate case of running `highlight-regexp' after isearch is > finished, I suggest using the same default values as already provided by > `occur-read-primary-args' and `keep-lines-read-args' that collect a list > of useful regexps from different places including the last isearch string > and put them to the list of default values. I am not sure I understand this. If highlight-regexp is bound to `C-x w h' and I type that at the isearch prompt would that start that highlight-regexp with the current isearch regexp as the default regexp at the prompt? > This also suggests to get rid of `hi-lock-regexp-history' in favor of > the single regexp history variable `regexp-history' shared among all > regexp-reading commands (perhaps `keep-lines-read-args' should be > renamed to more general name like `read-regexp'). Agree.