unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11464: 24.1.50; pos-visible-in-window-p returns a false positive with bidi text
@ 2012-05-13 15:54 Ari Roponen
  2012-05-13 18:26 ` Eli Zaretskii
  0 siblings, 1 reply; 24+ messages in thread
From: Ari Roponen @ 2012-05-13 15:54 UTC (permalink / raw)
  To: 11464

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@iro.umontreal.ca-20120513030506-t7ggxqlr92y8yjw4
Windowing system distributor `Fedora Project', version 11.0.11200000
Configured using:
 `configure '--with-x-toolkit=gtk3''

-- 
Ari Roponen





^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2012-05-19 12:32 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-13 15:54 bug#11464: 24.1.50; pos-visible-in-window-p returns a false positive with bidi text Ari Roponen
2012-05-13 18:26 ` Eli Zaretskii
2012-05-15 10:07   ` Ari Roponen
2012-05-15 16:19     ` Eli Zaretskii
2012-05-16  5:21       ` Ari Roponen
2012-05-16 15:15         ` Eli Zaretskii
2012-05-17  4:52           ` Ari Roponen
2012-05-17 16:23             ` Eli Zaretskii
2012-05-17 17:54               ` Ari Roponen
2012-05-17 17:56               ` Michael Welsh Duggan
2012-05-17 21:11                 ` Eli Zaretskii
2012-05-17 21:22                   ` Michael Welsh Duggan
2012-05-18  7:42                     ` Eli Zaretskii
2012-05-18  8:03                       ` Ari Roponen
2012-05-18  8:26                         ` Ari Roponen
2012-05-18  8:44                         ` Eli Zaretskii
2012-05-18 10:47                           ` Ari Roponen
2012-05-18 11:32                             ` Eli Zaretskii
2012-05-18 11:47                               ` Ari Roponen
2012-05-18 14:02                                 ` Eli Zaretskii
2012-05-18 14:39                                   ` Ari Roponen
2012-05-18 14:59                                     ` Eli Zaretskii
2012-05-19 12:26                                     ` Eli Zaretskii
2012-05-19 12:32                                       ` Ari Roponen

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).