From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#15839: 24.3.50; `isearch-allow-scroll': be able to scroll point off screen temporarily Date: Sat, 09 Nov 2013 02:57:23 +0200 Organization: JURTA Message-ID: <878uwyo0i4.fsf@mail.jurta.org> References: <51df60b6-e152-4989-a27e-70dadb9b7474@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1383958875 13631 80.91.229.3 (9 Nov 2013 01:01:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Nov 2013 01:01:15 +0000 (UTC) Cc: 15839@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 09 02:01:19 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VewvO-0000Vi-CJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Nov 2013 02:01:18 +0100 Original-Received: from localhost ([::1]:52641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VewvN-0006AO-SR for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Nov 2013 20:01:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VewvE-0006AF-L9 for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2013 20:01:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vewv8-0004g6-La for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2013 20:01:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vewv8-0004g2-IT for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2013 20:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vewv8-0005BQ-D1 for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2013 20:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2013 01:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15839-submit@debbugs.gnu.org id=B15839.138395881419862 (code B ref 15839); Sat, 09 Nov 2013 01:01:02 +0000 Original-Received: (at 15839) by debbugs.gnu.org; 9 Nov 2013 01:00:14 +0000 Original-Received: from localhost ([127.0.0.1]:42955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VewuK-0005AH-Md for submit@debbugs.gnu.org; Fri, 08 Nov 2013 20:00:13 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:46861 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VewuG-0005A7-To for 15839@debbugs.gnu.org; Fri, 08 Nov 2013 20:00:10 -0500 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 3ED22258B9E935; Fri, 8 Nov 2013 17:00:06 -0800 (PST) In-Reply-To: <51df60b6-e152-4989-a27e-70dadb9b7474@default> (Drew Adams's message of "Fri, 8 Nov 2013 15:02:42 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:80167 Archived-At: > 1. Non-nil `isearch-allow-scroll' lets you use a scroll command > (e.g. `C-v') without exiting Isearch. Unfortunately, this is coupled > with the hard-coded behavior that you cannot scroll far enough in either > direction that point would be moved off screen. You can do what you want with just: (advice-add 'isearch-post-command-hook :override (lambda ())) And if you want more commands to escape this restriction: (mapc (lambda (c) (put c 'isearch-scroll t)) '(forward-char backward-char right-char left-char forward-word backward-word right-word left-word forward-sexp backward-sexp forward-paragraph backward-paragraph move-end-of-line end-of-visual-line move-beginning-of-line beginning-of-visual-line next-line previous-line)) > That restriction is general for Emacs, and it generally makes sense. > It does not necessarily make sense during Isearch, however. Why? Because it is too confusing for users. This is like leaving point in one place, and scrolling without changing the position of point (with inactive Isearch). Isearch should not be different from the default Emacs behavior. > It's a bit like using `C-SPC' in a buffer, scrolling up a couple of > screenfuls to look at something, and then using `C-u C-SPC' to return. > But in Isearch there is no need for `C-SPC' or `C-u C-SPC': the search > position is recorded. Search resumes from that same position, no > matter how far away one might have scrolled. It makes sense to resume search from a new position like you can see using code above. > The enhancement request is to let users choose whether non-nil > `isearch-allow-scroll' should limit you to scrolling only enough to keep > point in the window or should not limit you. This could be done by > recognizing different non-nil values. Maybe a new option of `isearch-allow-scroll' could allow this. > 2. What's more, the lazy highlighting of search hits is even more > limited currently. When you scroll to the current limit, there can be > lots of search hits that are not highlighted. When scrolling outside the window boundaries will be allowed then lazy highlighting should highlight the whole buffer so you could see all matches when you quickly scroll the buffer. But in this case lazy highlighting will become more like hi-lock mode.