unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nathan Trapuzzano <nbtrap@nbtrap.com>
To: 13429@debbugs.gnu.org
Subject: bug#13429: 24.2; `window-end' returns point after last point in window
Date: Sun, 13 Jan 2013 17:12:59 -0500	[thread overview]
Message-ID: <87y5fwivf8.fsf@nbtrap.com> (raw)

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	other threads:[~2013-01-13 22:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-13 22:12 Nathan Trapuzzano [this message]
2013-01-14  3:47 ` bug#13429: 24.2; `window-end' returns point after last point in window Eli Zaretskii
2021-07-15  9:23   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y5fwivf8.fsf@nbtrap.com \
    --to=nbtrap@nbtrap.com \
    --cc=13429@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).