From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#13690: 24.3.50; scroll-conservatively and Info-up Date: Thu, 14 Feb 2013 00:18:30 +0100 Message-ID: <871ucj7qgp.fsf@rosalinde.fritz.box> References: <87sj52juwu.fsf@rosalinde.fritz.box> <834nhh5x1y.fsf@gnu.org> <87ip5xp4yv.fsf@rosalinde.fritz.box> <83txpg509x.fsf@gnu.org> <87621w72th.fsf@rosalinde.fritz.box> <83mwv83ydi.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1360797578 20634 80.91.229.3 (13 Feb 2013 23:19:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2013 23:19:38 +0000 (UTC) Cc: 13690@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 14 00:19:59 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 1U5lcM-0000yD-Mo for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Feb 2013 00:19:58 +0100 Original-Received: from localhost ([::1]:42929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5lc3-00037L-6t for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Feb 2013 18:19:39 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5lbw-00037D-NR for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 18:19:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5lbs-00059P-Fr for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 18:19:32 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5lbs-00059J-CQ for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 18:19:28 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U5lcP-0005oV-JH for bug-gnu-emacs@gnu.org; Wed, 13 Feb 2013 18:20:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Feb 2013 23:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13690 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13690-submit@debbugs.gnu.org id=B13690.136079755322285 (code B ref 13690); Wed, 13 Feb 2013 23:20:01 +0000 Original-Received: (at 13690) by debbugs.gnu.org; 13 Feb 2013 23:19:13 +0000 Original-Received: from localhost ([127.0.0.1]:54721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5lbc-0005nO-99 for submit@debbugs.gnu.org; Wed, 13 Feb 2013 18:19:12 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:62227) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U5lbZ-0005nF-6X for 13690@debbugs.gnu.org; Wed, 13 Feb 2013 18:19:11 -0500 Original-Received: from mailout-de.gmx.net ([10.1.76.28]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MJYft-1U4NcH0NFD-0038wN for <13690@debbugs.gnu.org>; Thu, 14 Feb 2013 00:18:34 +0100 Original-Received: (qmail invoked by alias); 13 Feb 2013 23:18:33 -0000 Original-Received: from i59F57718.versanet.de (EHLO rosalinde.fritz.box) [89.245.119.24] by mail.gmx.net (mp028) with SMTP; 14 Feb 2013 00:18:33 +0100 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+EoXVffOKEbWxIgcgW9znZQ7+hKW20i8lhTz+ojA Pdym95G9Rn7JoL In-Reply-To: <83mwv83ydi.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 13 Feb 2013 19:41:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:71222 Archived-At: --=-=-= Content-Type: text/plain On Wed, 13 Feb 2013 19:41:13 +0200 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: 13690@debbugs.gnu.org >> Date: Wed, 13 Feb 2013 14:36:58 +0100 >> >> > scroll-conservatively affects _any_ movement within a buffer, not just >> > to scrolling commands. >> >> I think this should be made clear in the documentation. In the Emacs >> Lisp manual, scroll-conservatively is only mentioned in the context of >> textual scrolling and there's no indication that it has wider scope. >> The variable's doc string doesn't say it only affects movement by >> scrolling, but given its name and the manual discussion, this is a >> plausible assumption, so its scope should also be made clear here. A >> less misleading name would also help, e.g. restore-point-conservatively. > > A name change is out of question at this point, I think, as this > option is very old. As for documentation, feel free to send patches > that clarify this. > > Note that the applicability of scroll-* options to movement that > doesn't necessarily look like "scrolling" is not limited to > scroll-conservatively. E.g., scroll-margin comes to mind. I don't feel confident I understand the intended behavior of these options well enough to formulate satisfactory doc. But I'll think about it some more and maybe make an attempt, which could then be refined. >> *** lisp/info.el 2013-02-01 16:46:46 +0000 >> --- lisp/info.el 2013-02-13 13:25:51 +0000 >> *************** >> *** 2246,2252 **** >> nil t)) >> (progn (beginning-of-line) (if (looking-at "^\\* ") (forward-char 2))) >> (goto-char p) >> ! (Info-restore-point Info-history))))) >> >> (defun Info-history-back () >> "Go back in the history to the last node visited." >> --- 2246,2255 ---- >> nil t)) >> (progn (beginning-of-line) (if (looking-at "^\\* ") (forward-char 2))) >> (goto-char p) >> ! (Info-restore-point Info-history)))) >> ! ;; If scroll-conservatively is non-zero, display as much of the >> ! ;; superior node above the target line as possible (bug#13690). >> ! (recenter)) > > I don't mind, but let's hear from others. In any case, I think this > re-centering should be conditioned on: > > . scroll-conservatively being less than 100 (people who set it to > large values don't want Emacs to recenter, ever) This is a good condition, since it effectively does the job of an option to trigger recentering (but according to the doc string, the condition should be less than 101). That way both those who never want recentering, even with Info-up, and those who do are served. Thanks for the suggestion. > . scroll-conservatively being non-nil I think you mean non-zero, since only integer values are admissible. But when scroll-conservatively is zero, recentering happens anyway, so I don't see the point of adding this condition. Or is there a problem is if recentering happens twice (once directly from the display engine and once by explicitly calling recenter)? I don't notice any problem. > . perhaps also scroll-margin being zero, because otherwise you get > several lines of context before point I tested scroll-margin and found no difference in the behavior of Info-up whether it is zero or non-zero; do you see something different? If not, then perhaps the following patch will make everyone happy. 2013-02-13 Stephen Berman * info.el (Info-up): If scroll-conservatively is less than 101, display as much of the superior node above the target line as possible. (Bug#13690) --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Description: Info-up patch === modified file 'lisp/info.el' *** lisp/info.el 2013-02-01 16:46:46 +0000 --- lisp/info.el 2013-02-13 23:13:49 +0000 *************** *** 2246,2252 **** nil t)) (progn (beginning-of-line) (if (looking-at "^\\* ") (forward-char 2))) (goto-char p) ! (Info-restore-point Info-history))))) (defun Info-history-back () "Go back in the history to the last node visited." --- 2246,2256 ---- nil t)) (progn (beginning-of-line) (if (looking-at "^\\* ") (forward-char 2))) (goto-char p) ! (Info-restore-point Info-history)))) ! ;; If scroll-conservatively is less than 101, display as much of the ! ;; superior node above the target line as possible (bug#13690). ! (when (< scroll-conservatively 101) ! (recenter))) (defun Info-history-back () "Go back in the history to the last node visited." --=-=-=--