From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) Newsgroups: gmane.emacs.bugs Subject: bug#19129: 25.0.50; recenter-positions is missing a reference to move-to-window-line-top-bottom Date: Fri, 21 Nov 2014 11:10:30 +0100 Message-ID: <87zjbk984p.fsf@vsl28t2g.ww011> References: <87r3wxbju9.fsf@vsl28t2g.ww011> <72b27cbd-244f-467a-aba6-f4ee46519e33@default> <87mw7lbget.fsf@vsl28t2g.ww011> <83zjbl3riz.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1416565181 30759 80.91.229.3 (21 Nov 2014 10:19:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2014 10:19:41 +0000 (UTC) Cc: 19129@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 21 11:19:35 2014 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 1XrlJM-0001WF-QF for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Nov 2014 11:19:33 +0100 Original-Received: from localhost ([::1]:39841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrlJM-0000ac-0Q for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Nov 2014 05:19:32 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrlI2-0007P4-9q for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:18:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrlHu-0001SJ-By for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:18:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrlHu-0001S6-9G for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XrlHt-0004Gt-R6 for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:18:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Nov 2014 10:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19129 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19129-submit@debbugs.gnu.org id=B19129.141656506916402 (code B ref 19129); Fri, 21 Nov 2014 10:18:01 +0000 Original-Received: (at 19129) by debbugs.gnu.org; 21 Nov 2014 10:17:49 +0000 Original-Received: from localhost ([127.0.0.1]:40289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrlHh-0004GT-5V for submit@debbugs.gnu.org; Fri, 21 Nov 2014 05:17:49 -0500 Original-Received: from mail-wg0-f52.google.com ([74.125.82.52]:65336) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrlHe-0004GJ-8w for 19129@debbugs.gnu.org; Fri, 21 Nov 2014 05:17:46 -0500 Original-Received: by mail-wg0-f52.google.com with SMTP id a1so6083316wgh.39 for <19129@debbugs.gnu.org>; Fri, 21 Nov 2014 02:17:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=2yYOApq9WEKW+9cf6mALzgvOtsdoOx0292wx4TubSh8=; b=j+DL+rc2hfrPbfrZm+FJtbWQC37BS70goGSaxxvoUihtOy0Np6xdvE3Lf55CGTq94V pos9jAPD/0kvCpKZTAee65yGZDf401lwPahRj0S2sivLg4kW2+Nfcj1iyziWdMcij7fE WEoJS3lST8RBQM8yL9qJ8Ei403w2U51HJZyggBBSTLFAZtJA9sVoE59cyBDTIPLSAM3t IfHWbbYkQNSB4XcRI5YbybwaD9/xZG0ahYvsGj0uJ/TzbyeNl/EKj1RHeHUrzgeDPSkM oPb9X5xolaDd9cAmMQwlzsJGYqioWguHzinOUD6bdCvgTI3HWjk1lUuPA/yX4hUm/SWE rwIQ== X-Received: by 10.180.206.4 with SMTP id lk4mr24102363wic.47.1416564633023; Fri, 21 Nov 2014 02:10:33 -0800 (PST) Original-Received: from vsl28t2g.ww011 (p57ACDBB7.dip0.t-ipconnect.de. [87.172.219.183]) by mx.google.com with ESMTPSA id s2sm8103643wia.3.2014.11.21.02.10.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Nov 2014 02:10:32 -0800 (PST) In-Reply-To: <83zjbl3riz.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Nov 2014 10:08:04 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) 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:96364 Eli Zaretskii writes: >> From: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) >> Date: Fri, 21 Nov 2014 00:28:42 +0100 >> >> please close the bug (or can I do this as well?) > > Anyone can, by sending an email message to 19129-done@debbugs.gnu.org. I see, thanks, I'll do that for #19129. Please tell me briefly what are you thinking of introducing an extra defcustom for move-to-window-line-top-bottom? diff --git a/lisp/window.el b/lisp/window.el index 91a0e15..8b9c7f5 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7475,6 +7475,27 @@ cycling order is middle -> top -> bottom." :version "23.2" :group 'windows) +(defcustom move-to-window-line-positions '(middle top bottom) + "Cycling order for `move-to-window-line-top-bottom'. +A list of elements with possible values `top', `middle', `bottom', +integer or float numbers that define the cycling order for +the command `move-to-window-line-top-bottom'. + +Top and bottom destinations are `scroll-margin' lines from the true +window top and bottom. Middle redraws the frame and centers point +vertically within the window. Integer number moves current line to +the specified absolute window-line. Float number between 0.0 and 1.0 +means the percentage of the screen space from the top. The default +cycling order is middle -> top -> bottom." + :type '(repeat (choice + (const :tag "Top" top) + (const :tag "Middle" middle) + (const :tag "Bottom" bottom) + (integer :tag "Line number") + (float :tag "Percentage"))) + :version "25.1" + :group 'windows) + (defun recenter-top-bottom (&optional arg) "Move current buffer line to the specified window line. With no prefix argument, successive calls place point according @@ -7515,16 +7536,16 @@ With a prefix argument ARG, acts like `move-to-window-line'. With no argument, positions point at center of window. Successive calls position point at positions defined -by `recenter-positions'." +by `move-to-window-line-positions'." (interactive "P") (cond (arg (move-to-window-line arg)) ; Always respect ARG. (t (setq recenter-last-op (if (eq this-command last-command) - (car (or (cdr (member recenter-last-op recenter-positions)) - recenter-positions)) - (car recenter-positions))) + (car (or (cdr (member recenter-last-op move-to-window-line-positions)) + move-to-window-line-positions)) + (car move-to-window-line-positions))) (let ((this-scroll-margin (min (max 0 scroll-margin) (truncate (/ (window-body-height) 4.0))))) -- Best wishes H. Dieter Wilhelm Darmstadt, Germany