From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!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: Wed, 28 Nov 2018 02:35:53 +0200 Organization: LINKOV.NET Message-ID: <875zwidonq.fsf@mail.linkov.net> References: <51df60b6-e152-4989-a27e-70dadb9b7474@default> <8736rqgk6f.fsf@mail.linkov.net> <87y39gexdo.fsf@mail.linkov.net> <877egzmmyk.fsf@mail.linkov.net> <8af20443-841d-4211-99ae-269e042a9a33@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1543365865 16439 195.159.176.226 (28 Nov 2018 00:44:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2018 00:44:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 15839@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 28 01:44:20 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRnxj-0004Bb-TZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2018 01:44:20 +0100 Original-Received: from localhost ([::1]:45254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRnzq-0003li-3i for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Nov 2018 19:46:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRnzT-0003kK-Ne for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 19:46:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRnzO-000271-K6 for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 19:46:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48389) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRnzO-00026r-Gr for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 19:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gRnzO-0002nu-8G for bug-gnu-emacs@gnu.org; Tue, 27 Nov 2018 19:46: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: Wed, 28 Nov 2018 00:46: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.154336594910755 (code B ref 15839); Wed, 28 Nov 2018 00:46:02 +0000 Original-Received: (at 15839) by debbugs.gnu.org; 28 Nov 2018 00:45:49 +0000 Original-Received: from localhost ([127.0.0.1]:52647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRnzB-0002nP-KP for submit@debbugs.gnu.org; Tue, 27 Nov 2018 19:45:49 -0500 Original-Received: from purple.birch.relay.mailchannels.net ([23.83.209.150]:35370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRnzA-0002nA-AA for 15839@debbugs.gnu.org; Tue, 27 Nov 2018 19:45:48 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D8C66502A9A; Wed, 28 Nov 2018 00:45:46 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.20.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 8A4FA502935; Wed, 28 Nov 2018 00:45:46 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a3.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Wed, 28 Nov 2018 00:45:46 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Plucky-Hook: 1f02d0d12573390d_1543365946700_3339434012 X-MC-Loop-Signature: 1543365946700:444537766 X-MC-Ingress-Time: 1543365946699 Original-Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 569B480924; Tue, 27 Nov 2018 16:45:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=Z60tNESlJcsQr/9F4yuqQ1yuFj0=; b= qfVJOOrTr/0CnjP5UV+cKeYUVEurfDONp5awBh1C1Z8va1+ci3X0r4+xwWi/8bVQ +i4AWCXjMLA3dbXLRGNTTyr075K0fnoSYZ7bP8lW3Rf+UC+v0hm7Ogv7IMcF8yzN AdNQ9N7iJC19y3gY0atNEMk7eApriS8YkRcbpRZpjHc= Original-Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTPSA id 299428091F; Tue, 27 Nov 2018 16:45:44 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a3 In-Reply-To: <8af20443-841d-4211-99ae-269e042a9a33@default> (Drew Adams's message of "Mon, 26 Nov 2018 16:49:21 -0800 (PST)") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedruddvtddgvdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegurhgvfidrrggurghmshesohhrrggtlhgvrdgtohhmnecuvehluhhsthgvrhfuihiivgephe X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:152834 Archived-At: > I don't want to customize one variable to be able to > scroll farther, and another variable to have what's > shown by that scrolling have lazy-highlighting > (especially if the latter requires lazy-highlighting > the entire buffer, rather than just what I see when > scrolling). Fine. If you are lazy to customize two variables, after you customize one variable we could automatically change the value of the second variable. > I want to be able to use `isearch-allow-scroll' to > let me scroll as far as I want, and see search hits > lazy-highlighted in what parts of the buffer I > scroll to. Fine, we could allow the same feature to be enabled by two different variables. diff --git a/lisp/isearch.el b/lisp/isearch.el index eb0b25f9b1..ac809e4980 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2747,8 +2747,15 @@ isearch-allow-scroll "Whether scrolling is allowed during incremental search. If non-nil, scrolling commands can be used in Isearch mode. However, the current match will never scroll offscreen. +If `unlimited', the current match can scroll offscreen. +This has the same effect as the value `nil' of `search-exit-option'. If nil, scrolling commands will first cancel Isearch mode." - :type 'boolean + :type '(choice boolean + (const :tag "Can scroll offscreen" unlimited)) + :set (lambda (sym val) + (set sym val) + (when (eq val 'unlimited) + (setq lazy-highlight-buffer t))) :group 'isearch) (defcustom isearch-allow-prefix t @@ -2841,11 +2848,11 @@ isearch-pre-command-hook ((or (and isearch-allow-prefix (memq this-command '(universal-argument universal-argument-more digit-argument negative-argument))) - (and isearch-allow-scroll + (and isearch-allow-scroll (not (eq isearch-allow-scroll 'unlimited)) (symbolp this-command) (or (eq (get this-command 'isearch-scroll) t) (eq (get this-command 'scroll-command) t)))) - (when isearch-allow-scroll + (when (and isearch-allow-scroll (not (eq isearch-allow-scroll 'unlimited))) (setq isearch-pre-scroll-point (point)))) ;; A mouse click on the isearch message starts editing the search string. ((and (eq (car-safe main-event) 'down-mouse-1) @@ -2853,6 +2860,7 @@ isearch-pre-command-hook ;; Swallow the up-event. (read-event) (setq this-command 'isearch-edit-string)) + ((eq isearch-allow-scroll 'unlimited)) ;; Don't terminate the search for motion commands. ((or (and (eq search-exit-option 'move) (symbolp this-command)