From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Alexandrov <321942@gmail.com> Newsgroups: gmane.emacs.bugs Subject: bug#23546: 25.1.50; scroll-restore-mode breaks comint-mode Date: Sun, 22 May 2016 04:34:30 +0300 Message-ID: <57410CA6.4070401@gmail.com> References: <5738CD38.7030907@gmail.com> <573982E5.9020005@gmx.at> <573B58B9.50409@gmail.com> <573C1342.1040408@gmx.at> <573CB90D.3030808@gmail.com> <573DB806.8020005@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1463880926 19467 80.91.229.3 (22 May 2016 01:35:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 May 2016 01:35:26 +0000 (UTC) To: martin rudalics , 23546@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 22 03:35:15 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 1b4IIU-0003PN-8s for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 May 2016 03:35:14 +0200 Original-Received: from localhost ([::1]:41732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4IIT-00037o-C8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 May 2016 21:35:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4IIM-00035T-6G for bug-gnu-emacs@gnu.org; Sat, 21 May 2016 21:35:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4IIH-0000VL-TO for bug-gnu-emacs@gnu.org; Sat, 21 May 2016 21:35:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4IIH-0000VF-Pe for bug-gnu-emacs@gnu.org; Sat, 21 May 2016 21:35:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b4IIH-0007aL-Md for bug-gnu-emacs@gnu.org; Sat, 21 May 2016 21:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Alexandrov <321942@gmail.com> Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 May 2016 01:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23546-submit@debbugs.gnu.org id=B23546.146388085129097 (code B ref 23546); Sun, 22 May 2016 01:35:01 +0000 Original-Received: (at 23546) by debbugs.gnu.org; 22 May 2016 01:34:11 +0000 Original-Received: from localhost ([127.0.0.1]:60294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4IHT-0007ZF-49 for submit@debbugs.gnu.org; Sat, 21 May 2016 21:34:11 -0400 Original-Received: from mail-lb0-f174.google.com ([209.85.217.174]:36198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <321942@gmail.com>) id 1b4IHR-0007Z1-6g for 23546@debbugs.gnu.org; Sat, 21 May 2016 21:34:09 -0400 Original-Received: by mail-lb0-f174.google.com with SMTP id h1so45804835lbj.3 for <23546@debbugs.gnu.org>; Sat, 21 May 2016 18:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:references:to:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=dN7JsB0uwkdDQ86ULVJ4t5gxaDbanhZipq4FMUbT8m0=; b=RFikIEcB2AfNPEXUyjyxwrlbsy8gvo84+gnIxpjYoQyMIkKAknOnFJLnvRjGp3LNQG WkyqrUT9Zt/kNlEnAq/A9KHAjY2ucxyhC522PIfUWUmXBGstnuvJDB+3m+/SJeKShYCr 3ZRE9DJI5Va/+6RtpASn78y/t4cy3FusCKGgomcCSBNKxHIp4GhmHwUqrNtnpteNUq7K ZkDZ0wMnNmBmf99huMeiyKy1pyzyLyjk3wVDyd3yIeRuWOzXtj7iQt4o/wMeGEVGnLqX E57HcwoPpGFR0oxEyC/4/8CmO1Mn2IdZtaEAxkBtDmw0w710oracl1UDkufvGXJBc/WQ qXVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=dN7JsB0uwkdDQ86ULVJ4t5gxaDbanhZipq4FMUbT8m0=; b=ioYOyjhc5jHk0ewsXIcopqUlAGX9fqm+ZdieQMJoc0YC8n0v5enn9Li9Pr+PJ0ywqU UXHgIlSY0uMB2+fIflvdr2pg00v2LPR6ZyxIzr4jUWyGLoZTxRgmAVghoyKV/6z3xBf4 ODeRS0YSMwZNdgCjzYco5J65hQDtyVCj9RaP2yT3zRew8o6qHf9AnXDFZZ/ZppiSyT5D 2qanVsjDnZyKzKoIXiY0XDn7k5c2NadXFqGzj4ciuJrYOB4pIG+KdwaCIZomt9VIkS+x 8BUivkOm9ZtCiCFwZ+Kup2u4qMByLqE3A6LUrYMo+BYwL2uFAiJ9Xxw4gA4aib3+z1Ce JJZw== X-Gm-Message-State: AOPr4FV3GGw8QlyCxXDG3G6P0NUGmAgib9RrFzgL7JkNTckyL4IDb5uUa/fW9IUX2MvEaw== X-Received: by 10.112.124.228 with SMTP id ml4mr2967416lbb.113.1463880842901; Sat, 21 May 2016 18:34:02 -0700 (PDT) Original-Received: from [192.168.1.132] ([178.218.27.218]) by smtp.googlemail.com with ESMTPSA id j97sm256218lfi.5.2016.05.21.18.34.01 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 21 May 2016 18:34:01 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; GNU x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 In-Reply-To: <573DB806.8020005@gmx.at> 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:118528 Archived-At: On 19/05/16 15:56, martin rudalics wrote: >> Hmm... Probably I completely missed the point, but is not >> ‘scroll-restore-jump-back’ an option that enables the title >> functionality of scroll-restore-mode — restoring the point position >> after scrolling, thus simulating the behaviour of most editors, which >> does not have that limitation of Emacs — that cursor position can be >> on-screen only. > > The aim of ‘scroll-restore-mode’ was much more modest: To move the > cursor to the position of ‘window-point’ after a sequence of scroll > commands have made that position invisible and then visible again. > > ‘scroll-restore-jump-back’ is much more aggressive: It forces the > position of ‘window-point’ to become visible again and move the cursor > to it after the first command which is not part of a sequence of scroll > commands that have made that position invisible. If you are used to the > behavior of "most editors" where such behavior is the default, you might > like this. > > Note, however, that the behavior I just described is not precisely the > behavior of these editors because, in addition to moving window-point > when it is scrolled off-screen, Emacs may also move window-point when it > enters the scroll margin. Such movement is left alone by my algorithm. Thank you for explanation. >> How would you recommend to use it? To write an advice around ‘keyboard-quit’ (like below), so scrolling would be ‘cancelled’ only with ‘C-g’? >> >> (defadvice keyboard-quit (before scroll-restore-jump-back activate) >> (scroll-restore-jump-back)) >> > > It depends on what precisely you want to accomplish (or what you are > used to). But why on earth would you want to advise ‘keyboard-quit’? To make ‘C-g’ and other keys that I bound to ‘keyboard-quit’ to ‘quit’ scrolling (if I may say so) too, of course. Should I redefine these keys instead? >>> I'll attach my latest version of ‘scroll-restore-mode’. Please try it. >>> If you confirm that this version works >> >> Yes. My appreciations to you. >> >>> and doesn't break anything else, >> >> I could not try anything, of course, but at first sight it does not. > > All you have to do is use it for a sufficient amount of time. I'm > confident that there are unresolved issues left. And you are right. There is one of them: now it breaks macros that involve isearch. Suppose that macro: C-x ( C-s sit RET SPC bar C-x ) By executing it on a line: ¦Lorem ipsum dolor sit amet. instead of: Lorem ipsum dolor sit bar¦ amet. I get: r¦ab Lorem ipsum dolor sit amet. (‘¦’ denotes point).