unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Problem in temp-buffer-resize-mode
@ 2007-08-02  4:58 Eli Barzilay
  2007-08-02 10:19 ` martin rudalics
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Barzilay @ 2007-08-02  4:58 UTC (permalink / raw)
  To: bug-gnu-emacs

Try this (using version 22.1.1 on Fedora):

  (set-fringe-mode 1)
  (temp-buffer-resize-mode 1)

and you'll see that temp buffers are not resized.  The problem is that
the small fringe makes (window-width) bigger than (frame-width), which
makes the test in `resize-temp-buffer-window' fail.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

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

* Re: Problem in temp-buffer-resize-mode
  2007-08-02  4:58 Problem in temp-buffer-resize-mode Eli Barzilay
@ 2007-08-02 10:19 ` martin rudalics
  0 siblings, 0 replies; 2+ messages in thread
From: martin rudalics @ 2007-08-02 10:19 UTC (permalink / raw)
  To: Eli Barzilay; +Cc: bug-gnu-emacs

 > Try this (using version 22.1.1 on Fedora):
 >
 >   (set-fringe-mode 1)
 >   (temp-buffer-resize-mode 1)
 >
 > and you'll see that temp buffers are not resized.  The problem is that
 > the small fringe makes (window-width) bigger than (frame-width), which
 > makes the test in `resize-temp-buffer-window' fail.

Thanks for reporting this bug.  In fact a test like

   (=  (frame-width) (window-width))

is used quite frequently in Elisp code and may fail in all these cases
just as it did for you.  FWIW these tests should be replaced by calling
a function `window-full-width-p' (the function `display-buffer' uses to
check whether it should split the largest window).

In any case something is inherently wrong with `frame-width' and
`window-width' if the latter may return a larger value than the former.

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

end of thread, other threads:[~2007-08-02 10:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-02  4:58 Problem in temp-buffer-resize-mode Eli Barzilay
2007-08-02 10:19 ` martin rudalics

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