GNU bug report logs - #11464
24.1.50; pos-visible-in-window-p returns a false positive with bidi text

Previous Next

Package: emacs;

Reported by: Ari Roponen <ari.roponen <at> gmail.com>

Date: Sun, 13 May 2012 15:56:01 UTC

Severity: normal

Found in version 24.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ari Roponen <ari.roponen <at> gmail.com>
Subject: bug#11464: closed (Re: bug#11464: 24.1.50; pos-visible-in-window-p
 returns a false positive with bidi text)
Date: Sun, 13 May 2012 18:25:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#11464: 24.1.50; pos-visible-in-window-p returns a false positive with bidi text

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 11464 <at> debbugs.gnu.org.

-- 
11464: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11464
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Ari Roponen <ari.roponen <at> gmail.com>
Cc: 11464-done <at> debbugs.gnu.org
Subject: Re: bug#11464: 24.1.50;
	pos-visible-in-window-p returns a false positive with bidi text
Date: Sun, 13 May 2012 21:26:03 +0300
> From: Ari Roponen <ari.roponen <at> gmail.com>
> Date: Sun, 13 May 2012 18:54:59 +0300
> 
> The following code shows a problem with pos-visible-in-window-p
> and bidirectional text. When there are right-to-left characters
> at the beginning of the buffer, the function returns nil, as the
> last line is not visible. However, when "a" is inserted into the
> beginning of the buffer, the function returns t, which is
> incorrect.

Sigh... where are you guys on weekends, when I _really_ have time to
work on Emacs?...

> The bug happens in trunk and emacs-24, but not in emacs-23, so it
> could be considered as a regression ;-)

Nothing that's related to R2L text in a left-to-right paragraph can
ever be a regression wrt Emacs 23.

But since the fix is quite simple, here you go: fixed in revision
107994 on the emacs-24 branch.

Thanks.

[Message part 3 (message/rfc822, inline)]
From: Ari Roponen <ari.roponen <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1.50;
	pos-visible-in-window-p returns a false positive with bidi text
Date: Sun, 13 May 2012 18:54:59 +0300
The following code shows a problem with pos-visible-in-window-p
and bidirectional text. When there are right-to-left characters
at the beginning of the buffer, the function returns nil, as the
last line is not visible. However, when "a" is inserted into the
beginning of the buffer, the function returns t, which is
incorrect.

The bug happens in trunk and emacs-24, but not in emacs-23, so it
could be considered as a regression ;-)


(let (before after)
  (pop-to-buffer (get-buffer-create "test"))
  (erase-buffer)

  (dotimes (i (* 2 (window-height)))
    (insert "\u05d0\n"))		; HEBREW LETTER ALEF
  (insert "Last line\n")
  (goto-char (point-min))

  (setq before (pos-visible-in-window-p (point-max)))

  (insert "a")
  (setq after (pos-visible-in-window-p (point-max)))
  (message "Visible: before: %S, after: %S" before after))


In GNU Emacs 24.1.50.8 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.1)
 of 2012-05-13 on arirop
Bzr revision: 108213 monnier <at> iro.umontreal.ca-20120513030506-t7ggxqlr92y8yjw4
Windowing system distributor `Fedora Project', version 11.0.11200000
Configured using:
 `configure '--with-x-toolkit=gtk3''

-- 
Ari Roponen



This bug report was last modified 13 years and 4 days ago.

Previous Next


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