all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Geometry and temp-buffer-max-height
@ 2007-07-26 19:45 Andrea Vettorello
  2007-07-31  6:03 ` Kevin Rodgers
  0 siblings, 1 reply; 13+ messages in thread
From: Andrea Vettorello @ 2007-07-26 19:45 UTC (permalink / raw)
  To: EMACS List

I've a trouble setting "temp-buffer-max-height" under X and Emacs 22.1.

If i start Emacs with a geometry parameter, via .Xdefaults or passing
the option from the command line, in the first created frame
(initial-frame) the value assigned to "temp-buffer-max-height" is not
applied, i.e. the temp buffer height spans the default half frame.
This doesn't happen if i resize the frame before invoking a temp
buffer (for example using the help) or if inside a new frame (C-x 5
2).

I've looked the documentation about "initial-frame-alist" and
"default-frame-alist" but i didn't found nothing interesting.

It's a bug or i'm missing something, like some other variable to poke?


-- 
Andrea

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Geometry and temp-buffer-max-height
@ 2007-08-02 10:34 martin rudalics
  2007-08-02 11:59 ` Andrea Vettorello
  0 siblings, 1 reply; 13+ messages in thread
From: martin rudalics @ 2007-08-02 10:34 UTC (permalink / raw)
  To: andrea.vettorello, help-gnu-emacs

> Nope, even explicitly setting this one doesn't change it. Maybe it's
> only in the Debian build, i haven't checked from CVS/SVN, but as i've
> said above, it's a small glitch that shows up if i use the "geometry"
> option, i can easily workaround it.

Could you please tell here whether the window is resized at all with
`temp-buffer-resize-mode' activated?  WOW, is the bug you observe a bug
where only the value of `temp-buffer-max-height' is not respected, or is
it a bug where `temp-buffer-resize-mode' is not applied?

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Geometry and temp-buffer-max-height
@ 2007-08-02 16:12 martin rudalics
  2007-08-02 16:52 ` Andrea Vettorello
  0 siblings, 1 reply; 13+ messages in thread
From: martin rudalics @ 2007-08-02 16:12 UTC (permalink / raw)
  To: andrea.vettorello; +Cc: help-gnu-emacs

 > I've isolated the conflicting parameter, modifying the fringe exhibit
 > the problem.
 >
 > This was reported today on the bug mailing list:
 > http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-08/msg00007.html

Then you probably read my answer too.  Can you please now confirm that
the window is _not_ resized on your "local configuration" when you have
`temp-buffer-resize-mode' enabled and `temp-buffer-max-height' is left
at the default value.

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Geometry and temp-buffer-max-height
@ 2007-08-02 20:43 martin rudalics
  2007-08-03  7:46 ` Andrea Vettorello
  0 siblings, 1 reply; 13+ messages in thread
From: martin rudalics @ 2007-08-02 20:43 UTC (permalink / raw)
  To: andrea.vettorello; +Cc: emacs-devel

 >> Can you please now confirm that
 >> the window is _not_ resized on your "local configuration" when you have
 >> `temp-buffer-resize-mode' enabled and `temp-buffer-max-height' is left
 >> at the default value.
 >>
 >
 > I confirm it, the temp buffer doesn't apply the
 > "temp-buffer-max-height" if i pass the geometry option, from command
 > line or .Xdefaults/.Xrerources, and if the fringe-mode is used in any
 > other way than the default.

That doesn't answer my question but let's ignore this for the moment.
Could you please add the lines below at the end of your .emacs file,
restart Emacs, and tell me whether the problem persists (this is by no
means the correct fix but merely a temporary workaround):

(require 'help)

(defun resize-temp-buffer-window ()
   ""
   (unless (or (one-window-p 'nomini)
               (not (pos-visible-in-window-p (point-min)))
               (> (frame-width) (window-width)))
     (fit-window-to-buffer
      (selected-window)
      (if (functionp temp-buffer-max-height)
	 (funcall temp-buffer-max-height (current-buffer))
        temp-buffer-max-height))))

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Geometry and temp-buffer-max-height
@ 2007-08-02 21:09 martin rudalics
  0 siblings, 0 replies; 13+ messages in thread
From: martin rudalics @ 2007-08-02 21:09 UTC (permalink / raw)
  To: help-gnu-emacs

>> Can you please now confirm that
>> the window is _not_ resized on your "local configuration" when you have
>> `temp-buffer-resize-mode' enabled and `temp-buffer-max-height' is left
>> at the default value.
>>
>
> I confirm it, the temp buffer doesn't apply the
> "temp-buffer-max-height" if i pass the geometry option, from command
> line or .Xdefaults/.Xrerources, and if the fringe-mode is used in any
> other way than the default.

That doesn't answer my question but let's ignore this for the moment.
Could you please add the lines below at the end of your .emacs file,
restart Emacs, and tell me whether the problem persists (this is by no
means the correct fix but merely a temporary workaround):

(require 'help)

(defun resize-temp-buffer-window ()
   ""
   (unless (or (one-window-p 'nomini)
               (not (pos-visible-in-window-p (point-min)))
               (> (frame-width) (window-width)))
     (fit-window-to-buffer
      (selected-window)
      (if (functionp temp-buffer-max-height)
	 (funcall temp-buffer-max-height (current-buffer))
        temp-buffer-max-height))))

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

end of thread, other threads:[~2007-08-03  7:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26 19:45 Geometry and temp-buffer-max-height Andrea Vettorello
2007-07-31  6:03 ` Kevin Rodgers
2007-07-31  7:58   ` Andrea Vettorello
2007-08-02  7:18     ` Kevin Rodgers
2007-08-02  8:42       ` Andrea Vettorello
  -- strict thread matches above, loose matches on Subject: below --
2007-08-02 10:34 martin rudalics
2007-08-02 11:59 ` Andrea Vettorello
2007-08-02 12:51   ` Andrea Vettorello
2007-08-02 16:12 martin rudalics
2007-08-02 16:52 ` Andrea Vettorello
2007-08-02 20:43 martin rudalics
2007-08-03  7:46 ` Andrea Vettorello
2007-08-02 21:09 martin rudalics

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.