From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#12799: 24.3.50; `scroll-conservatively', I-search and `C-g' Date: Sat, 30 Jan 2016 22:13:47 +0200 Message-ID: <83mvrm4yh0.fsf@gnu.org> References: <8760yaj1ap.fsf@mbork.pl> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1454184932 6318 80.91.229.3 (30 Jan 2016 20:15:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Jan 2016 20:15:32 +0000 (UTC) Cc: 12799-done@debbugs.gnu.org To: Marcin Borkowski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 30 21:15:20 2016 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 1aPbvN-0001KZ-LE for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jan 2016 21:15:13 +0100 Original-Received: from localhost ([::1]:39700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPbvM-00074W-7K for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jan 2016 15:15:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPbvH-00074D-Bh for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2016 15:15:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPbvC-0000R3-6N for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2016 15:15:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPbvC-0000Qs-4G for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2016 15:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aPbvC-000536-0p for bug-gnu-emacs@gnu.org; Sat, 30 Jan 2016 15:15:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jan 2016 20:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 12799 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 12799@debbugs.gnu.org, eliz@gnu.org, dmoncayo@gmail.com Original-Received: via spool by 12799-done@debbugs.gnu.org id=D12799.145418486819342 (code D ref 12799); Sat, 30 Jan 2016 20:15:01 +0000 Original-Received: (at 12799-done) by debbugs.gnu.org; 30 Jan 2016 20:14:28 +0000 Original-Received: from localhost ([127.0.0.1]:42287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPbue-00051u-CP for submit@debbugs.gnu.org; Sat, 30 Jan 2016 15:14:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39309) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPbud-00051f-3p for 12799-done@debbugs.gnu.org; Sat, 30 Jan 2016 15:14:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPbuS-0000FU-Sr for 12799-done@debbugs.gnu.org; Sat, 30 Jan 2016 15:14:21 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPbuS-0000FQ-PE; Sat, 30 Jan 2016 15:14:16 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2633 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aPbuS-00086w-1h; Sat, 30 Jan 2016 15:14:16 -0500 In-reply-to: <8760yaj1ap.fsf@mbork.pl> (message from Marcin Borkowski on Sat, 30 Jan 2016 20:49:02 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112109 Archived-At: > Date: Sat, 30 Jan 2016 20:49:02 +0100 > Cc: 12799@debbugs.gnu.org > > On 2012-11-04, at 19:07, Dani Moncayo wrote: > > > Recipe from "emacs -nw -Q" (the "-nw" part is not strictly needed, but > > it is cleaner for showing the problem): > > > > 1. Visit the attached file. > > 2. Adjust the vertical space (empty lines) between "first line" and > > "last visible line" until the latter becomes indeed the last visible > > line in the window. > > 3. Go to the start of the buffer: M-< > > 4. Advance one line: C-n > > 5. C-s 1 > > 6. C-g > > > > I observe that after step #5 the window is scrolled (OK), and that > > scrolling is cancelled after step #6 (OK - like it should be). > > > > But if I set `scroll-conservatively' to 1 and repeat the experiment > > (from step #3), I observe that the vertical scrolling made in step #5 > > is not cancelled in step #6. IMO it should be cancelled, because > > "C-g" should leave the view (not just the point) where it was before > > the Isearch. > > Hi everyone, > > I can confirm that this behavior is still present in GNU Emacs > 25.1.50.1. I am not 100% sure, however, whether this is really > a bug. No, it isn't a bug, but the intended behavior: contrary to the OP's expectations C-g is _not_ supposed to cancel the scroll, it is supposed to return point to where the search started. And setting scroll-conservatively to 1 means that if point is 1 line above or below the window, Emacs should scroll the window only by 1 line in order to bring point into view. Which is what Emacs does in this case. So I'm closing the bug. I apologize for not noticing it when it was originally reported. Thanks.