GNU bug report logs - #12245
24.2.50; Image height scaled to fill whole line

Previous Next

Packages: emacs, ns;

Reported by: Ivan Andrus <darthandrus <at> gmail.com>

Date: Tue, 21 Aug 2012 10:21:02 UTC

Severity: normal

Found in version 24.2.50

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12245 in the body.
You can then email your comments to 12245 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12245; Package emacs. (Tue, 21 Aug 2012 10:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Andrus <darthandrus <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 21 Aug 2012 10:21:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Andrus <darthandrus <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2.50; Image height scaled to fill whole line
Date: Tue, 21 Aug 2012 12:20:09 +0200
A fairly recent change (in the past few weeks) changed preview-latex in an
interesting way.  I would bisect it, but I have never been able to get
`bzr bisect` to work.

What happens, is that the image heights are stretched to fill the full
height of the current line.  If the image is larger, however, it is not
shrunk.  This leads to problems reading the short images like those
produced from $x$, when they are on a line with a tall equation like a
sum.  

The problem can be see without preview-latex.  Start from `emacs -Q` and
evaluate the code below.  Notice that both images are the same height
(larger than a normal line--this works for me with the default font
size).  Then delete the second image and notice that the first image
shrinks.  In fact the image should be even smaller.

    (progn (insert (propertize "1" 'display
                               (create-image "/* XPM */
    static char * arrow_right[] = {
    \"12 5 2 1\",
    \".	c grey60\",
    \" 	c None\",
    \".           \",
    \"..          \",
    \"...         \",
    \"....        \",
    \".....       \",
    \"......      \",
    \".......     \",
    \"........    \",
    \".........   \",
    \".........   \",
    \"........    \",
    \".......     \",
    \"......      \",
    \".....       \",
    \"....        \",
    \"...         \",
    \"..          \",
    \".           \"};"
                                             'xpm t)))
           (insert (propertize "1" 'display
                               (create-image "/* XPM */
    static char * arrow_right[] = {
    \"12 24 2 1\",
    \".	c grey60\",
    \" 	c None\",
    \".           \",
    \"..          \",
    \"...         \",
    \"....        \",
    \".....       \",
    \"......      \",
    \".......     \",
    \"........    \",
    \".........   \",
    \".........   \",
    \".........   \",
    \".........   \",
    \".........   \",
    \".........   \",
    \".........   \",
    \".........   \",
    \"........    \",
    \".......     \",
    \"......      \",
    \".....       \",
    \"....        \",
    \"...         \",
    \"..          \",
    \".           \"};"
                                             'xpm t))))

                                         


In GNU Emacs 24.2.50.2 (i386-apple-darwin10.8.0, NS apple-appkit-1038.36)
of 2012-08-20 on oroszlan.local
Bzr revision: 109700 jlf <at> foxtail.org-20120820160851-cooolx696cb26xc0
Windowing system distributor `Apple', version 10.3.1038
Configured using:
`configure '--with-ns''

Important settings:
  value of $LC_CTYPE: UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
s-x r e M-x r e p o <tab> r t <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
kill-region: The mark is not set now, so there is no region
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-mode easymenu time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process ns multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12245; Package emacs. (Tue, 21 Aug 2012 18:03:02 GMT) Full text and rfc822 format available.

Message #8 received at 12245 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Ivan Andrus <darthandrus <at> gmail.com>
Cc: 12245 <at> debbugs.gnu.org
Subject: Re: bug#12245: 24.2.50; Image height scaled to fill whole line
Date: Tue, 21 Aug 2012 14:02:16 -0400
Ivan Andrus wrote:

> I would bisect it, but I have never been able to get `bzr bisect` to
> work.

You could try this then, if you can work git's bisect:

http://savannah.gnu.org/git/?group=emacs




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12245; Package emacs. (Tue, 21 Aug 2012 18:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 12245 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ivan Andrus <darthandrus <at> gmail.com>
Cc: 12245 <at> debbugs.gnu.org
Subject: Re: bug#12245: 24.2.50; Image height scaled to fill whole line
Date: Tue, 21 Aug 2012 21:05:38 +0300
> From: Ivan Andrus <darthandrus <at> gmail.com>
> Date: Tue, 21 Aug 2012 12:20:09 +0200
> 
> I would bisect it, but I have never been able to get `bzr bisect` to
> work.

What did you try, and how did it not work for you?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12245; Package emacs. (Wed, 22 Aug 2012 08:41:03 GMT) Full text and rfc822 format available.

Message #14 received at 12245 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Andrus <darthandrus <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12245 <at> debbugs.gnu.org
Subject: Re: bug#12245: 24.2.50; Image height scaled to fill whole line
Date: Wed, 22 Aug 2012 10:39:47 +0200
On Aug 21, 2012, at 8:05 PM, Eli Zaretskii wrote:

>> From: Ivan Andrus <darthandrus <at> gmail.com>
>> Date: Tue, 21 Aug 2012 12:20:09 +0200
>> 
>> I would bisect it, but I have never been able to get `bzr bisect` to
>> work.
> 
> What did you try, and how did it not work for you?

I couldn't find my notes on it, and so I tried again.  Of course this time it worked.  Last time I was trying to use it on the emacs24 branch which perhaps was the problem.  

Anyway, I got it figured out and it was introduced by revision 109331:

$ bzr log -r 109331
------------------------------------------------------------
revno: 109331
committer: Jan D. <jan.h.d <at> swipnet.se>
branch nick: trunk
timestamp: Tue 2012-07-31 18:19:03 +0200
message:
  Fix compiler and run time warnings in nsmenu.m and nsterm.m
  
  *  nsfns.m, nsmenu.m, msterm.m: Adopt to struct frame/FVAR changes.
  
  * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
  
  * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
  instead of compositeToPoint.
  (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.


-Ivan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12245; Package emacs,ns. (Sat, 22 Sep 2012 17:04:01 GMT) Full text and rfc822 format available.

Message #17 received at 12245 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Ivan Andrus <darthandrus <at> gmail.com>, 12245 <at> debbugs.gnu.org
Subject: Re: 24.2.50; Image height scaled to fill whole line
Date: Sat, 22 Sep 2012 19:01:48 +0200
Hello.

I don't quite follow your description of the problem.
Is the bug that when the two images are shown, they are too large, or that 
when one is deleted the other is not shrunk enough?

Can you provide screenshots of the correct behaviour?

Thanks,

	Jan D.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12245; Package emacs,ns. (Sat, 22 Sep 2012 19:05:01 GMT) Full text and rfc822 format available.

Message #20 received at 12245 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Andrus <darthandrus <at> gmail.com>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 12245 <at> debbugs.gnu.org
Subject: Re: 24.2.50; Image height scaled to fill whole line
Date: Sat, 22 Sep 2012 21:02:15 +0200
[Message part 1 (text/plain, inline)]
On Sep 22, 2012, at 7:01 PM, Jan Djärv wrote:

> Hello.
> 
> I don't quite follow your description of the problem.
> Is the bug that when the two images are shown, they are too large, or that when one is deleted the other is not shrunk enough?

> Can you provide screenshots of the correct behaviour?


I have included screen shots of correct and incorrect behaviour.  I should note that the green bar is from hl-line-mode.  Anyway, the bug is that a "small" image is stretched.  "Large" images are not stretched or shrunk.  

[correct.png (image/png, inline)]
[incorrect.png (image/png, inline)]
[Message part 4 (text/plain, inline)]

This may or may not be related to the fact that opening wide pdfs in docview mode causes the width to be shrunk to fit on the screen.  The height, however, is not affected.  I haven't filed a bug about that since I hadn't noticed it before.  If it's not resolved with the fix to this bug (or if you just prefer it), then I'll open another bug about it.

I'm on 10.6 in case I haven't mentioned that.

-Ivan

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12245; Package emacs,ns. (Sat, 22 Sep 2012 19:25:02 GMT) Full text and rfc822 format available.

Message #23 received at 12245 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Andrus <darthandrus <at> gmail.com>
To: Ivan Andrus <darthandrus <at> gmail.com>
Cc: Jan Djärv <jan.h.d <at> swipnet.se>, 12245 <at> debbugs.gnu.org
Subject: Re: 24.2.50; Image height scaled to fill whole line
Date: Sat, 22 Sep 2012 21:22:53 +0200
On Sep 22, 2012, at 9:02 PM, Ivan Andrus wrote:
> On Sep 22, 2012, at 7:01 PM, Jan Djärv wrote:
> 
>> Hello.
>> 
>> I don't quite follow your description of the problem.
>> Is the bug that when the two images are shown, they are too large, or that when one is deleted the other is not shrunk enough?
> 
>> Can you provide screenshots of the correct behaviour?
> 
> 
> I have included screen shots of correct and incorrect behaviour.  I should note that the green bar is from hl-line-mode.  Anyway, the bug is that a "small" image is stretched.  "Large" images are not stretched or shrunk.  

I should say, since I didn't make it clear, that large images shouldn't
be shrunk.  At least IMO, the size of the image should never be changed.

-Ivan



Reply sent to Jan Djärv <jan.h.d <at> swipnet.se>:
You have taken responsibility. (Sun, 23 Sep 2012 08:38:02 GMT) Full text and rfc822 format available.

Notification sent to Ivan Andrus <darthandrus <at> gmail.com>:
bug acknowledged by developer. (Sun, 23 Sep 2012 08:38:02 GMT) Full text and rfc822 format available.

Message #28 received at 12245-done <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Ivan Andrus <darthandrus <at> gmail.com>
Cc: 12245-done <at> debbugs.gnu.org
Subject: Re: 24.2.50; Image height scaled to fill whole line
Date: Sun, 23 Sep 2012 10:35:11 +0200
Hello.

22 sep 2012 kl. 21:02 skrev Ivan Andrus <darthandrus <at> gmail.com>:

> On Sep 22, 2012, at 7:01 PM, Jan Djärv wrote:
> 
>> Hello.
>> 
>> I don't quite follow your description of the problem.
>> Is the bug that when the two images are shown, they are too large, or that when one is deleted the other is not shrunk enough?
> 
>> Can you provide screenshots of the correct behaviour?
> 
> 
> I have included screen shots of correct and incorrect behaviour.  I should note that the green bar is from hl-line-mode.  Anyway, the bug is that a "small" image is stretched.  "Large" images are not stretched or shrunk.  


Thanks, this has been fixed in trunk now.

	Jan D.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 21 Oct 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 324 days ago.

Previous Next


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