From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.bugs Subject: bug#12811: 24.3.50; `scroll-up/down-aggressively' don't seem to work as expected Date: Sun, 11 Nov 2012 17:55:59 +0100 Message-ID: References: <83ip9i3c59.fsf@gnu.org> <831ug62z3c.fsf@gnu.org> <83r4o51h92.fsf@gnu.org> <83zk2ow1ry.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1352653010 9285 80.91.229.3 (11 Nov 2012 16:56:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2012 16:56:50 +0000 (UTC) Cc: 12811@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 11 17:57:00 2012 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 1TXaqB-00047n-TJ for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Nov 2012 17:57:00 +0100 Original-Received: from localhost ([::1]:33302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXaq2-0003Xt-Hq for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Nov 2012 11:56:50 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXapy-0003Xo-34 for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 11:56:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXapv-00063A-0e for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 11:56:46 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXapu-000636-TK for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 11:56:42 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TXaqD-0004bZ-Tc for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 11:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dani Moncayo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Nov 2012 16:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12811 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12811-submit@debbugs.gnu.org id=B12811.135265298217654 (code B ref 12811); Sun, 11 Nov 2012 16:57:01 +0000 Original-Received: (at 12811) by debbugs.gnu.org; 11 Nov 2012 16:56:22 +0000 Original-Received: from localhost ([127.0.0.1]:33385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TXapa-0004ag-2S for submit@debbugs.gnu.org; Sun, 11 Nov 2012 11:56:22 -0500 Original-Received: from mail-ob0-f172.google.com ([209.85.214.172]:50190) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TXapX-0004aZ-Cd for 12811@debbugs.gnu.org; Sun, 11 Nov 2012 11:56:20 -0500 Original-Received: by mail-ob0-f172.google.com with SMTP id wo10so1919557obc.3 for <12811@debbugs.gnu.org>; Sun, 11 Nov 2012 08:55:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HPMEd+styKIaAF7vV0/UMN/V2il84egcETkDiHYEvkM=; b=oHRV0SYwHCztCfDgssyXmZQPcXFm1BV6ToTbkQcGn+kT50F21imsQ4sgW/WS4C7LWU fSkUXntLTHa4r9uxFhmQvwtoyK6lePNFbsxCXmpaay1QcWxyo4kwyHPA/h62rx/YzGKG KakEfgWFIXx1VU6GSCHiyPKg80Ddbg/VJxLvc17zrLaKiFu5SQMpzFxsI/RAapLJQvXw 3J8fl7S25E+lv3cZuKQNYunDiczrmC3L/YafTRWsTXE3qDKNb2EWu02JYz71hJ59gLFe m9O56MyjZwpe8kFKyi7nDvKR80U5X80giXHuK93OCsUj5Grjo54yPhY+5ZNIHPQbh+po lnkQ== Original-Received: by 10.182.146.107 with SMTP id tb11mr13275936obb.30.1352652959408; Sun, 11 Nov 2012 08:55:59 -0800 (PST) Original-Received: by 10.60.131.168 with HTTP; Sun, 11 Nov 2012 08:55:59 -0800 (PST) In-Reply-To: <83zk2ow1ry.fsf@gnu.org> X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-Spam-Score: 0.1 (/) 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:66766 Archived-At: > Emacs doesn't count in lines, it counts in pixels. And since a line > has a finite size, where exactly those 70% end is not well determined > (is it the top of the line, the bottom of the line, somewhere in > between?). I don't see the point of using pixel as unit of measure here. The unit should be the line, because the problem to solve here can (should) be expressed in terms of lines; going down to the pixel level is unnecessary and confusing, IMO. So, given a window which is W lines high, the line L that is X % from the top of the window can be determined as L = round((X/100)*(W-1))+1 Conversely, the percentage X from the top of the window can be determined as X = 100*(L-1)/(W-1) Therefore, testing with a window of W=11 lines high makes the above calculations quite easy, because each line counts as 10%. -- Dani Moncayo