Subject: bug#18839: closed (Re: bug#18839: 24.4; posn-object-width-height returns (0 . 0) for large images)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 26 Oct 2014 15:45:02 +0000

Your bug report

#18839: 24.4; posn-object-width-height returns (0 . 0) for large images

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 [email-masked].

-- 
18839: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18839
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#18839: 24.4; posn-object-width-height returns (0 . 0) for large images
From: Eli Zaretskii <[email-masked]>
To: Roland Winkler <[email-masked]>
Cc: [email-masked]
Date: Sun, 26 Oct 2014 17:44:02 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Sat, 25 Oct 2014 23:15:15 -0500
> From: "Roland Winkler" <[email-masked]>
> Cc: [email-masked]
> 
> On Sun Oct 26 2014 Eli Zaretskii wrote:
> > Please post the URLs where one can find the images you tried, or
> > images that can be used to reproduce this problem.
> 
> Say, I observe the buggy behavior if I enlarge the file splash.png
> in the etc directory of emacs:
> 
> convert splash.png -resize 1024 splash-1024.png
> convert splash.png -resize 2048 splash-2048.png
> 
> In this case for emacs 24.4
> 
> emacs -q --no-splash -l foo.el splash-1024.png  # fine
> emacs -q             -l foo.el splash-1024.png  # buggy
> emacs -q --no-splash -l foo.el splash-2048.png  # buggy
> emacs -q             -l foo.el splash-2048.png  # buggy
> 
> No problem with emacs 24.3.93

An embarrassing typo that caused this is now fixed on the emacs-24
branch.

Thanks.

Subject: 24.4; posn-object-width-height returns (0 . 0) for large images
From: "Roland Winkler" <[email-masked]>
To: [email-masked]
Date: Sat, 25 Oct 2014 21:29:50 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

cat > foo.el <<EOF
(global-set-key [C-down-mouse-1] 'foo)
(global-set-key [C-mouse-1] 'foo)
(defun foo (event)
  (interactive "e")
  (message "foo: %s" (posn-object-width-height (event-start event))))
EOF

emacs -q --no-site-file -l foo.el

load some image (say jpg, png, or tif) in image-mode,
the image needs to be large enough for the bug to occur, say 1024x768

Put mouse pointer over image.
Press C-mouse-1

emacs 24.3.93: command foo gives width and height of the image
emacs 24.4: command foo gives (0 . 0)

Strange enough: starting emacs 24.4 via

emacs -q --no-site-file --no-splash -l ~/emacs/dot/foo.el

works as expected

In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2)
 of 2014-10-22 on regnitz
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
System Description:	Ubuntu 12.04.5 LTS

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.ISO-8859-15
  locale-coding-system: iso-latin-9-unix