From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.bugs Subject: bug#5718: scroll-margin in buffer with small line count. Date: Sun, 14 Mar 2010 19:26:57 +0200 Message-ID: <4B9D1C61.70903@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1268589337 14207 80.91.229.12 (14 Mar 2010 17:55:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 14 Mar 2010 17:55:37 +0000 (UTC) To: 5718@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 14 18:55:31 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nqs1o-0002Wl-Ek for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Mar 2010 18:55:27 +0100 Original-Received: from localhost ([127.0.0.1]:53411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nqs1e-0007Xg-OQ for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Mar 2010 13:54:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nqs1a-0007XS-Hs for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 13:54:50 -0400 Original-Received: from [140.186.70.92] (port=42517 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nqs1X-0007W3-GD for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 13:54:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nqs1T-0000EP-Gr for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 13:54:45 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33926) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nqs1T-0000EG-E0 for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 13:54:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nqrbe-0003hq-FV; Sun, 14 Mar 2010 13:28:02 -0400 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Oleksandr Gavenko Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Mar 2010 17:28:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-GNU-PR-Message: report 5718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.126858763514236 (code B ref -1); Sun, 14 Mar 2010 17:28:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Mar 2010 17:27:15 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nqrat-0003hZ-D4 for submit@debbugs.gnu.org; Sun, 14 Mar 2010 13:27:15 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nqrar-0003hU-E5 for submit@debbugs.gnu.org; Sun, 14 Mar 2010 13:27:13 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:55207) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Nqram-0002vY-PA for submit@debbugs.gnu.org; Sun, 14 Mar 2010 13:27:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nqram-0000iR-Bi for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 13:27:08 -0400 Original-Received: from [140.186.70.92] (port=38629 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nqraj-0000iE-LL for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 13:27:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nqrae-0006Ot-JO for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 13:27:05 -0400 Original-Received: from mail-fx0-f227.google.com ([209.85.220.227]:62090) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nqrae-0006Ok-Ew for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 13:27:00 -0400 Original-Received: by fxm27 with SMTP id 27so2827231fxm.8 for ; Sun, 14 Mar 2010 10:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=V3HwQS+tjsCm1V+tRHwmaubpj+8hmD+SCwbKJkqlc6E=; b=F6th3h6V6TJXH/o/XhCJg/9H7cc4k4Q/We+KXGG7F26qKlK3cMkGQ1zTxhH/0U4VaR 3uTIs5KOVHO0Pavw6TM3Ns81miMUXtWVOI5nu0AGHW9A3iBTFEigNPVAWvYPebn4kFuX uBg3h3T67Xb0mzWkLkRrq8iWuOzMlVwVWp3cE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=oFjBwJpzh+mwXtJCbgEh2zgpnRPP3rnblW+spsDjaLGfSbNA2/sbOXY7LFCTyxH6PW yDhpyvHz2J0YKDHbMYt2AsblyvU0qD3PYEwEdGHNPqOK8r1Ej3GJE+F1prs7LIN6eklD yeUYmcwuiJl3NheblTXk/8CbYZQpyvr/4s0wM= Original-Received: by 10.223.5.69 with SMTP id 5mr4094040fau.8.1268587618781; Sun, 14 Mar 2010 10:26:58 -0700 (PDT) Original-Received: from [178.92.38.203] (203-38-92-178.pool.ukrtel.net [178.92.38.203]) by mx.google.com with ESMTPS id b17sm5955824fka.43.2010.03.14.10.26.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Mar 2010 10:26:58 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 14 Mar 2010 13:28:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35574 Archived-At: I have official Emacs 22.3 from FSF ftp server for Windows. When set (setq scroll-margin 4) in buffer with window width 6 lines real margin value is 1 (so real line scrolling done when press on second line or when press on fifth line). Experiment show such dependence of real margin on line count: lines real-scroll-margin 3,4,5,6 1 7,8,9,10 2 11,12,13,14 3 >15 4 I count from 3 as when try make less lines Emacs warn. I think that whose modify scroll-margin want to see as many as possible margin value up to its customization value. This formula produce such values: best-scroll-margin = min( (line_count - 1)/2, scroll-margin) So previous table changed to: lines best-scroll-margin 3,4 1 5,6 2 7,8 3 >9 4 Also as you can see in proposal case user switch start work from 9 lines in window, not 15! Please implement described behaviour. -- Best regards!