From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christoph Newsgroups: gmane.emacs.devel Subject: count-lines-page Date: Sun, 22 Aug 2010 12:31:52 -0600 Message-ID: <4C716D18.8090006@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282501929 13960 80.91.229.12 (22 Aug 2010 18:32:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 22 Aug 2010 18:32:09 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 22 20:32:09 2010 Return-path: Envelope-to: ged-emacs-devel@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 1OnFKw-0002VM-PN for ged-emacs-devel@m.gmane.org; Sun, 22 Aug 2010 20:32:07 +0200 Original-Received: from localhost ([127.0.0.1]:48653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnFKw-0000mz-6S for ged-emacs-devel@m.gmane.org; Sun, 22 Aug 2010 14:32:06 -0400 Original-Received: from [140.186.70.92] (port=40504 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnFKq-0000mu-64 for emacs-devel@gnu.org; Sun, 22 Aug 2010 14:32:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnFKp-00060Y-3q for emacs-devel@gnu.org; Sun, 22 Aug 2010 14:32:00 -0400 Original-Received: from mail-gy0-f169.google.com ([209.85.160.169]:39909) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnFKp-00060S-0p for emacs-devel@gnu.org; Sun, 22 Aug 2010 14:31:59 -0400 Original-Received: by gyb11 with SMTP id 11so2262649gyb.0 for ; Sun, 22 Aug 2010 11:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=KeAKRYv7f/dusTe+4V2dGU1rq8+RVFutZ0xQSivGcoI=; b=oirdZjxNoTtQPduANl7vKhBIsPtH59bwSJlRdTrmcLjYxdIfB2IxlSm021wb/Zu/3y frOUeWdcj8p1CQrRFxn/5FmL8lDDilziBRkpzZc8ll/9nqpyWVJ0atuCk3q4hjRP9qAD driQOMEMzUPwV+7to28d0mXg87nmgL6nkcUTo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=EwmeUMfnvV5zbi0ZQymey/RpZ7px8ccNtx6jUXGmlKx6nZ873qB/Txasp5wqDKKazY 9fJ3UxLQl47VW1fbYDltIETeS7lPW+DZp6EjTr5Q+MJGSyZ8ta6WzQS7izXEVITwjz+G lZKwCbgYXva4X4AVaqk05+wXFMZFpjajCtscU= Original-Received: by 10.100.121.2 with SMTP id t2mr4303395anc.41.1282501917807; Sun, 22 Aug 2010 11:31:57 -0700 (PDT) Original-Received: from [192.168.1.3] (97-122-115-184.hlrn.qwest.net [97.122.115.184]) by mx.google.com with ESMTPS id q7sm9150955anf.26.2010.08.22.11.31.55 (version=SSLv3 cipher=RC4-MD5); Sun, 22 Aug 2010 11:31:57 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:129050 Archived-At: Bug #6825 (http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6825) points out some peculiar behavior of what-page. This is actually caused by the count-lines-page function. I am wondering if this behavior is intended or a bug itself. emacs -Q open a buffer, type test C-a i.e. test ^ point M-x count-lines-page Output: Page has 1 lines (0 + 1) (means: 0 before, 1 after) C-f i.e. test ^ point M-x count-lines-page Output: Page has 1 lines (1 + 1) (means: 1 before, 1 after) Does this make sense? There is only 1 line in the buffer. How can there be 1 before and 1 after? Christoph