bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13429: 24.2; `window-end' returns point after last point in window


From: Nathan Trapuzzano
Subject: bug#13429: 24.2; `window-end' returns point after last point in window
Date: Sun, 13 Jan 2013 17:12:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]