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-07-26 19:45 Andrea Vettorello
@ 2007-07-31  6:03 ` Kevin Rodgers
  2007-07-31  7:58   ` Andrea Vettorello
  0 siblings, 1 reply; 13+ messages in thread
From: Kevin Rodgers @ 2007-07-31  6:03 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Vettorello wrote:
> 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?

The documentation for temp-buffer-max-height seems to suggest that you
should call (temp-buffer-max-height 1) to ensure that
temp-buffer-max-height is effective.

-- 
Kevin Rodgers
Denver, Colorado, USA

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

* Re: Geometry and temp-buffer-max-height
  2007-07-31  6:03 ` Kevin Rodgers
@ 2007-07-31  7:58   ` Andrea Vettorello
  2007-08-02  7:18     ` Kevin Rodgers
  0 siblings, 1 reply; 13+ messages in thread
From: Andrea Vettorello @ 2007-07-31  7:58 UTC (permalink / raw)
  To: help-gnu-emacs

On 7/31/07, Kevin Rodgers <kevin.d.rodgers@gmail.com> wrote:


> The documentation for temp-buffer-max-height seems to suggest that you
> should call (temp-buffer-max-height 1) to ensure that
> temp-buffer-max-height is effective.

If it's a function to call i can't find it, for the variable with the
same name, i've tried to set it both as a fixed or a variable value
(2/3 of the current frame, as i've found a suggestion somewhere).

If you mean the "temp-buffer-resize-mode" variable, then is set to
true. I thought about a bug because this happens only when i pass a
geometry option, via command line or ~/.Xdefaults, but it's not a big
deal, i let the ini files resizing the frame and i'm done with it...


-- 
Andrea

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

* Re: Geometry and temp-buffer-max-height
  2007-07-31  7:58   ` Andrea Vettorello
@ 2007-08-02  7:18     ` Kevin Rodgers
  2007-08-02  8:42       ` Andrea Vettorello
  0 siblings, 1 reply; 13+ messages in thread
From: Kevin Rodgers @ 2007-08-02  7:18 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Vettorello wrote:
> On 7/31/07, Kevin Rodgers <kevin.d.rodgers@gmail.com> wrote:
> 
> 
>> The documentation for temp-buffer-max-height seems to suggest that you
>> should call (temp-buffer-max-height 1) to ensure that
>> temp-buffer-max-height is effective.
> 
> If it's a function to call i can't find it, for the variable with the
> same name, i've tried to set it both as a fixed or a variable value
> (2/3 of the current frame, as i've found a suggestion somewhere).
> 
> If you mean the "temp-buffer-resize-mode" variable, then is set to
> true. I thought about a bug because this happens only when i pass a
> geometry option, via command line or ~/.Xdefaults, but it's not a big
> deal, i let the ini files resizing the frame and i'm done with it...

It's a function:

,----[ C-h f temp-buffer-resize-mode RET ]
| temp-buffer-resize-mode is an interactive compiled Lisp function in 
`help.el'.
| (temp-buffer-resize-mode &optional arg)
|
| Toggle the mode which makes windows smaller for temporary buffers.
| With prefix argument arg, turn the resizing of windows displaying 
temporary
| buffers on if arg is positive or off otherwise.
| This makes the window the right height for its contents, but never
| more than `temp-buffer-max-height' nor less than `window-min-height'.
| This applies to `help', `apropos' and `completion' buffers, and some 
others.
|
| [back]
`----

-- 
Kevin Rodgers
Denver, Colorado, USA

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

* Re: Geometry and temp-buffer-max-height
  2007-08-02  7:18     ` Kevin Rodgers
@ 2007-08-02  8:42       ` Andrea Vettorello
  0 siblings, 0 replies; 13+ messages in thread
From: Andrea Vettorello @ 2007-08-02  8:42 UTC (permalink / raw)
  To: help-gnu-emacs

On 8/2/07, Kevin Rodgers <kevin.d.rodgers@gmail.com> wrote:
> Andrea Vettorello wrote:
> > On 7/31/07, Kevin Rodgers <kevin.d.rodgers@gmail.com> wrote:
> >
> >
> >> The documentation for temp-buffer-max-height seems to suggest that you
> >> should call (temp-buffer-max-height 1) to ensure that
> >> temp-buffer-max-height is effective.
> >
> > If it's a function to call i can't find it, for the variable with the
> > same name, i've tried to set it both as a fixed or a variable value
> > (2/3 of the current frame, as i've found a suggestion somewhere).
> >
> > If you mean the "temp-buffer-resize-mode" variable, then is set to
> > true. I thought about a bug because this happens only when i pass a
> > geometry option, via command line or ~/.Xdefaults, but it's not a big
> > deal, i let the ini files resizing the frame and i'm done with it...
>
> It's a function:
>
> ,----[ C-h f temp-buffer-resize-mode RET ]
> | temp-buffer-resize-mode is an interactive compiled Lisp function in
> `help.el'.
> | (temp-buffer-resize-mode &optional arg)
> |
> | Toggle the mode which makes windows smaller for temporary buffers.
> | With prefix argument arg, turn the resizing of windows displaying
> temporary
> | buffers on if arg is positive or off otherwise.
> | This makes the window the right height for its contents, but never
> | more than `temp-buffer-max-height' nor less than `window-min-height'.
> | This applies to `help', `apropos' and `completion' buffers, and some
> others.
> |
> | [back]
> `----

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.

Thanks anyway for your help.


-- 
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 10:34 martin rudalics
@ 2007-08-02 11:59 ` Andrea Vettorello
  2007-08-02 12:51   ` Andrea Vettorello
  0 siblings, 1 reply; 13+ messages in thread
From: Andrea Vettorello @ 2007-08-02 11:59 UTC (permalink / raw)
  To: help-gnu-emacs

On 8/2/07, martin rudalics <rudalics@gmx.at> wrote:

> 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?


I've tried with a different user and the value
"temp-buffer-max-height" is applied, so it's a local config issue, aka
my fault.

Sorry for the noise... (=


-- 
Andrea

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

* Re: Geometry and temp-buffer-max-height
  2007-08-02 11:59 ` Andrea Vettorello
@ 2007-08-02 12:51   ` Andrea Vettorello
  0 siblings, 0 replies; 13+ messages in thread
From: Andrea Vettorello @ 2007-08-02 12:51 UTC (permalink / raw)
  To: help-gnu-emacs

On 8/2/07, Andrea Vettorello <andrea.vettorello@gmail.com> wrote:

> I've tried with a different user and the value
> "temp-buffer-max-height" is applied, so it's a local config issue, aka
> my fault.

Ah, not my fault. (=

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


-- 
Andrea

^ 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 16:12 martin rudalics
@ 2007-08-02 16:52 ` Andrea Vettorello
  0 siblings, 0 replies; 13+ messages in thread
From: Andrea Vettorello @ 2007-08-02 16:52 UTC (permalink / raw)
  To: help-gnu-emacs

On 8/2/07, martin rudalics <rudalics@gmx.at> wrote:

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

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.

If useful, i can post my Emacs init files.


-- 
Andrea

^ 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

* Re: Geometry and temp-buffer-max-height
  2007-08-02 20:43 martin rudalics
@ 2007-08-03  7:46 ` Andrea Vettorello
  0 siblings, 0 replies; 13+ messages in thread
From: Andrea Vettorello @ 2007-08-03  7:46 UTC (permalink / raw)
  To: emacs-devel

On 8/2/07, martin rudalics <rudalics@gmx.at> wrote:
>  >> 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've restored `temp-buffer-max-height' to the default value and
enabled `temp-buffer-resize-mode', the temp buffers are not resized,
they span to half the frame height, when passing a geometry option and
with fringe other than default.

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

I've included you code, tried with `temp-buffer-resize-mode'  enabled
and default for `temp-buffer-max-height', the temp buffers are
resized.

-- 
Andrea

^ 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-08-02 21:09 Geometry and temp-buffer-max-height martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2007-08-02 20:43 martin rudalics
2007-08-03  7:46 ` Andrea Vettorello
2007-08-02 16:12 martin rudalics
2007-08-02 16:52 ` Andrea Vettorello
2007-08-02 10:34 martin rudalics
2007-08-02 11:59 ` Andrea Vettorello
2007-08-02 12:51   ` Andrea Vettorello
2007-07-26 19:45 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

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.