GNU bug report logs - #16839
24.3.50; image-mode-fit-frame fails to use all display space with image larger than display

Previous Next

Package: emacs;

Reported by: nljlistbox2 <at> gmail.com (N. Jackson)

Date: Sat, 22 Feb 2014 01:01:02 UTC

Severity: minor

Tags: moreinfo

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 16839 in the body.
You can then email your comments to 16839 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#16839; Package emacs. (Sat, 22 Feb 2014 01:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to nljlistbox2 <at> gmail.com (N. Jackson):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 22 Feb 2014 01:01:02 GMT) Full text and rfc822 format available.

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

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50;
 image-mode-fit-frame fails to use all display space with image larger
 than display
Date: Fri, 21 Feb 2014 21:00:14 -0400
Recipe:
=======
This recipe requires an image file bigger than the display (I used a
2048 x 1536 pixel JPEG file on a display with a resolution of 1366 x 768).

1. emacs -Q
2. C-x C-f big-image.jpg
3. M-x image-mode-fit-frame

Expected behaviour:
===================
Frame size increases to the maximum size that will fit on the display.

Actual behaviour:
=================
Frame size increases to a size slightly less that the maximum that will
fit on the display. There is a gap above the frame of about the height
of the title bar, a gap below the frame about a pixel high, and a gap to
the left of the frame maybe three pixels wide.

Furthermore, the size of this frame does not seem to be recorded
wherever such parameters normally are (in Emacs or the windowing
system?), so that if I maximise the frame (logo key and up arrow) and
then "restore" it (logo key and down arrow), it does not return to the
size it was before I maximised it, nor to the size it was before I
issued the image-mode-fit-frame command, but to some intermediate size.

Additional Comments:
====================
The name of the command image-mode-fit-frame seems ill-chosen. This is
not intended to fit the image to the frame, but rather the frame to the
image. The text on the menu -- "Fit Frame to Image" -- is clear. This
suggests the command should be called image-mode-fit-frame-to-image.


In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.8)
 of 2014-02-19 on moondust
Repository revision: 116484 lekktu <at> gmail.com-20140219210406-y2s7lx244ojfl5on
Windowing system distributor `Fedora Project', version 11.0.11404000
System Description:	Fedora release 19 (Schrödinger’s Cat)

Configured using:
 `configure --prefix=/home/nlj/local/'

Important settings:
  value of $LC_MONETARY: en_DK.utf8
  value of $LC_NUMERIC: en_DK.utf8
  value of $LC_TIME: en_DK.utf8
  value of $LANG: en_CA.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Image[jpeg]

Minor modes in effect:
  tooltip-mode: t
  electric-indent-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

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
help-fns mail-prsvr mail-utils help-mode image-mode easymenu time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-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 nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16839; Package emacs. (Mon, 24 Feb 2014 17:56:01 GMT) Full text and rfc822 format available.

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

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#16839: 24.3.50;
 image-mode-fit-frame fails to use all display space with image larger
 than display
Date: Mon, 24 Feb 2014 13:54:41 -0400
At 21:00 -0400 on Friday 2014-02-21, N. Jackson wrote:

> 1. emacs -Q
> 2. C-x C-f big-image.jpg
> 3. M-x image-mode-fit-frame

> Frame size increases to a size slightly less that the maximum that will
> fit on the display. There is a gap above the frame of about the height
> of the title bar, a gap below the frame about a pixel high, and a gap to
> the left of the frame maybe three pixels wide.

Setting frame-resize-pixelwise to t works around this problem.

> Furthermore, the size of this frame does not seem to be recorded
> wherever such parameters normally are (in Emacs or the windowing
> system?), so that if I maximise the frame (logo key and up arrow) and
> then "restore" it (logo key and down arrow), it does not return to the
> size it was before I maximised it, nor to the size it was before I
> issued the image-mode-fit-frame command, but to some intermediate size.

But frame-resize-pixelwise doesn't help with the frame not "remembering"
what size to restore to.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16839; Package emacs. (Thu, 03 Mar 2016 21:22:02 GMT) Full text and rfc822 format available.

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

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: 16839 <at> debbugs.gnu.org
Subject: Re: bug#16839: 24.3.50;
 image-mode-fit-frame fails to use all display space with image larger
 than display
Date: Thu, 03 Mar 2016 17:21:03 -0400
At 21:00 -0400 on Friday 2014-02-21, N. Jackson wrote:
>
> Recipe:
> =======
> This recipe requires an image file bigger than the display (I used
> a 2048 x 1536 pixel JPEG file on a display with a resolution of
> 1366 x 768).
>
> 1. emacs -Q
> 2. C-x C-f big-image.jpg
> 3. M-x image-mode-fit-frame

Just a quick update on this bug report.

The recipe I provided above doesn't work on Emacs 25 (currently
testing on the second pretest 25.0.92) because it seems that images
are now shrunk to fit into the frame when they are opened.

In any case the image-mode-fit-frame function still seems to be
broken. The documented behaviour is:

    If called interactively, or if TOGGLE is non-nil, toggle between
    fitting FRAME to the current image and restoring the size and
    window configuration prior to the last ‘image-mode-fit-frame’
    call.

The toggling makes it slightly confusing to figure out what's going
on but it seems that the function is only doing half of its job.

When it needs to adjust only the height of the frame and when it
needs to adjust only the width of the frame, the function seems to
work correctly. But when it needs to adjust both the height and the
width, it only adjusts the height and fails to adjust the width.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16839; Package emacs. (Thu, 26 Sep 2019 17:04:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: nljlistbox2 <at> gmail.com (N. Jackson)
Cc: 16839 <at> debbugs.gnu.org
Subject: Re: bug#16839: 24.3.50; image-mode-fit-frame fails to use all
 display space with image larger than display
Date: Thu, 26 Sep 2019 19:03:21 +0200
nljlistbox2 <at> gmail.com (N. Jackson) writes:

> In any case the image-mode-fit-frame function still seems to be
> broken. The documented behaviour is:
>
>     If called interactively, or if TOGGLE is non-nil, toggle between
>     fitting FRAME to the current image and restoring the size and
>     window configuration prior to the last ‘image-mode-fit-frame’
>     call.
>
> The toggling makes it slightly confusing to figure out what's going
> on but it seems that the function is only doing half of its job.
>
> When it needs to adjust only the height of the frame and when it
> needs to adjust only the width of the frame, the function seems to
> work correctly. But when it needs to adjust both the height and the
> width, it only adjusts the height and fails to adjust the width.

I'm not quite sure whether I'm reproducing this right...  If I `C-x C-f'
a big image file, then readjust the Emacs frame to be smaller than that
image, and then say `M-x image-mode-fit-frame', it does expand both
width and height to fit that image as displayed.

Are you still seeing this problem in Emacs 27?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 26 Sep 2019 17:04:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16839; Package emacs. (Mon, 14 Oct 2019 07:28:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: nljlistbox2 <at> gmail.com (N. Jackson)
Cc: 16839 <at> debbugs.gnu.org
Subject: Re: bug#16839: 24.3.50; image-mode-fit-frame fails to use all
 display space with image larger than display
Date: Mon, 14 Oct 2019 09:27:28 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I'm not quite sure whether I'm reproducing this right...  If I `C-x C-f'
> a big image file, then readjust the Emacs frame to be smaller than that
> image, and then say `M-x image-mode-fit-frame', it does expand both
> width and height to fit that image as displayed.
>
> Are you still seeing this problem in Emacs 27?

More information was requested some weeks back, but no response was
given, so I'm closing this bug report.  If you're still seeing this
problem, please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 16839 <at> debbugs.gnu.org and nljlistbox2 <at> gmail.com (N. Jackson) Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 14 Oct 2019 07:28:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Nov 2019 12:24:09 GMT) Full text and rfc822 format available.

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

Previous Next


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