GNU bug report logs - #13429
24.2; `window-end' returns point after last point in window

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Nathan Trapuzzano <nbtrap@HIDDEN>; dated Sun, 13 Jan 2013 22:15:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 13429 <at> debbugs.gnu.org:


Received: (at 13429) by debbugs.gnu.org; 14 Jan 2013 03:47:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 13 22:47:43 2013
Received: from localhost ([127.0.0.1]:58988 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Tub1S-0007kU-Mt
	for submit <at> debbugs.gnu.org; Sun, 13 Jan 2013 22:47:43 -0500
Received: from mtaout21.012.net.il ([80.179.55.169]:55034)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eliz@HIDDEN>) id 1Tub1O-0007kD-Vu
	for 13429 <at> debbugs.gnu.org; Sun, 13 Jan 2013 22:47:40 -0500
Received: from conversion-daemon.a-mtaout21.012.net.il by
	a-mtaout21.012.net.il (HyperSendmail v2007.08) id
	<0MGL00800JT38M00@HIDDEN> for
	13429 <at> debbugs.gnu.org; Mon, 14 Jan 2013 05:47:10 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0MGL008T8JUM0270@HIDDEN>;
	Mon, 14 Jan 2013 05:47:10 +0200 (IST)
Date: Mon, 14 Jan 2013 05:47:39 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#13429: 24.2;
	`window-end' returns point after last point in window
In-reply-to: <87y5fwivf8.fsf@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Nathan Trapuzzano <nbtrap@HIDDEN>
Message-id: <83vcb0qvc4.fsf@HIDDEN>
References: <87y5fwivf8.fsf@HIDDEN>
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
	has
	identified this incoming email as possible spam. The original message
	has been attached to this so you can view it (if it isn't spam) or
	label similar future email.  If you have any questions, see
	the administrator of that system for details.
	Content preview: > From: Nathan Trapuzzano <nbtrap@HIDDEN> > Date:
	Sun, 
	13 Jan 2013 17:12:59 -0500 > > The current doc-string for `window-end'
	states
	that the function returns > the ``position at which display currently
	ends in WINDOW''. I understand > this to mean, more or less,
	the greatest position visible in > WINDOW. [...] 
	Content analysis details:   (1.5 points, 10.0 required)
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,
	no trust [80.179.55.169 listed in list.dnswl.org]
	0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
	0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
	[score: 0.5000]
X-Debbugs-Envelope-To: 13429
Cc: 13429 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > From: Nathan Trapuzzano <nbtrap@HIDDEN> > Date: Sun,
    13 Jan 2013 17:12:59 -0500 > > The current doc-string for `window-end' states
    that the function returns > the ``position at which display currently ends
    in WINDOW''. I understand > this to mean, more or less, the greatest position
    visible in > WINDOW. [...] 
 
 Content analysis details:   (1.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
                             trust
                             [80.179.55.169 listed in list.dnswl.org]
  0.7 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
  0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
                             [score: 0.4907]

> From: Nathan Trapuzzano <nbtrap@HIDDEN>
> Date: Sun, 13 Jan 2013 17:12:59 -0500
> 
> The current doc-string for `window-end' states that the function returns
> the ``position at which display currently ends in WINDOW''. I understand
> this to mean, more or less, the greatest position visible in
> WINDOW.

This interpretation is incorrect.

> For example, when a given window is displaying a buffer that overflows
> the window, a call to `window-end' will return the greatest visible
> position **plus one**.

This is what is meant by "position at which display ends".
Suggestions for how to describe that better are welcome.

> Whereas, when the buffer does not overflow the window
> (i.e., when the window displays the end of the buffer, including any
> blank lines at the end), `window-end' returns just the greatest visible
> position, the same thing that `point-max' would return.

This is still consistent: there's no character at position returned by
point-max.  The last position visible in the window is one less that
the returned value in this case as well.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#13429; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Jan 2013 22:14:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 13 17:14:10 2013
Received: from localhost ([127.0.0.1]:58737 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TuVoe-0004uA-7j
	for submit <at> debbugs.gnu.org; Sun, 13 Jan 2013 17:14:09 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34561)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <nbtrap@HIDDEN>) id 1TuVob-0004tW-DZ
	for submit <at> debbugs.gnu.org; Sun, 13 Jan 2013 17:14:07 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nbtrap@HIDDEN>) id 1TuVo7-0006ke-QP
	for submit <at> debbugs.gnu.org; Sun, 13 Jan 2013 17:13:39 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 
	T_DKIM_INVALID autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:41787)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nbtrap@HIDDEN>) id 1TuVo7-0006ka-NL
	for submit <at> debbugs.gnu.org; Sun, 13 Jan 2013 17:13:35 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45909)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <nbtrap@HIDDEN>) id 1TuVo1-0007ZC-00
	for bug-gnu-emacs@HIDDEN; Sun, 13 Jan 2013 17:13:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <nbtrap@HIDDEN>) id 1TuVnx-0006jm-K5
	for bug-gnu-emacs@HIDDEN; Sun, 13 Jan 2013 17:13:28 -0500
Received: from oproxy9.bluehost.com ([69.89.24.6]:35917)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <nbtrap@HIDDEN>) id 1TuVnx-0006ja-8N
	for bug-gnu-emacs@HIDDEN; Sun, 13 Jan 2013 17:13:25 -0500
Received: (qmail 1744 invoked by uid 0); 13 Jan 2013 22:13:02 -0000
Received: from unknown (HELO host393.hostmonster.com) (66.147.240.193)
	by oproxy9.bluehost.com with SMTP; 13 Jan 2013 22:13:02 -0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbtrap.com;
	s=default; 
	h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From;
	bh=69vX2PU0ewD+3z0EMupflzwAb0/a5b1pExKKQD5VDvo=; 
	b=iSZpNj29oxurZXnuoU97SjxxibzvcHXysx0JVNvBnXjWW0NE1DuE42RaxcH5AhOeDACvqM0/TCnwjuNpOdWVuL7vftit2jeMVC/lWdkWvywZkoJMBWTY0CPNK4PB5CXw;
Received: from [76.240.203.247] (port=52177 helo=Nathan-GNU)
	by host393.hostmonster.com with esmtpsa (TLSv1:CAMELLIA128-SHA:128)
	(Exim 4.80) (envelope-from <nbtrap@HIDDEN>) id 1TuVnZ-0006GE-Kt
	for bug-gnu-emacs@HIDDEN; Sun, 13 Jan 2013 15:13:02 -0700
From: Nathan Trapuzzano <nbtrap@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.2; `window-end' returns point after last point in window
Date: Sun, 13 Jan 2013 17:12:59 -0500
Message-ID: <87y5fwivf8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Identified-User: {1585:host393.hostmonster.com:nbtrapco:nbtrap.com}
	{sentby:smtp auth 76.240.203.247 authed with nbtrap@HIDDEN}
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -6.1 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.1 (------)

The current doc-string for `window-end' states that the function returns
the ``position at which display currently ends in WINDOW''. I understand
this to mean, more or less, the greatest position visible in
WINDOW. However, even if that's an incorrect interpretation, the
behavior of this function is inconsistent under seemingly any
interpretation.

For example, when a given window is displaying a buffer that overflows
the window, a call to `window-end' will return the greatest visible
position **plus one**. Whereas, when the buffer does not overflow the window
(i.e., when the window displays the end of the buffer, including any
blank lines at the end), `window-end' returns just the greatest visible
position, the same thing that `point-max' would return.

As I say, this behavior seems inconsistent under any interpretation of
the documentation. If it is in fact a bug, the code should be rectified;
but in either case, the documentation should be clarified, because if
there is a correct interpretation that I'm missing, it's not obvious.

Nathan

In GNU Emacs 24.2.1 (x86_64-unknown-linux-gnu)
 of 2013-01-13 on Nathan-GNU
Configured using:
 `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--without-x' '--without-sound'
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
 --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2'
 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t




Acknowledgement sent to Nathan Trapuzzano <nbtrap@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#13429; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.