Whenever I open an info entry in emacs (C-h i
) an additional frame pops up. On my system, it is too small and I'd love to have it in the top left corner, being wider and longer as it was created by default. The new frame is labeled "*info".
The same applies to the frame, that rises, whenever I use emacs various help functions (C-h k
, C-h v
, C-h f
, ...). Those new frames are labaled "Help". This frame has a similar position and size, as the "info" frames.
I have defined a default-frame-alist
as well as an initial-frame-alist
in my ~.emacs
file.
(setq initial-frame-alist
'((top . 35)
(right . 5)
(width . 200)
(height . 55) ))
(setq default-frame-alist
'(
;(scroll-bar-foreground-color . "yellow")
(vertical-scroll-bar . right)
(scroll-bar-width . 17)
(internal-border-width . 2)
(top . 20)
(left . 10)
(width . 120)
(mouse-color . "yellow")
(cursor-color . "red")
))
Those new frames are obviously not the initial frame. Therefore, it is okay to me, that the don't use the dimensions given in the 'initial-frame-alist'.
EDIT
This image shows the location of the two frames, after having pressed C-h i
. AS you can see, a new frame "* info *" was opened on top of the initial frame (which is now in the background). Please notice also, the width of the new frame is not sufficient, to view the text, without breaking some longer lines. Furthermore, I'd love to have the new frame on the left screen side.
But I'd like to define the dimensions as well. That would save me to use the mouse, to correct their size and location. Something like this is desired:
(Obviously, I picked the frame with the mouse, moved it to its desired location and resized it with the mouse. I'd love to avoid using the mouse, instead I want to add some lisp code to my ~/.emacs
to do this changes for me!
If I press than C-h k TAB
I get another frame as shown here. This should also open on the left screen side (and not on the right side, as shown here).
What do I have to add, to my '~.emacs' file, in order to define the size ('width' x 'height') and location ('left' and 'top') of this kind of frames.
Something like this (pseudocode)
(setq info-frame-alist
'((top . 5)
(left . 5)
(width . 100)
(height . 25) ))
(setq help-frame-alist
'((top . 7)
(left . 7)
(width . 75)
(height . 20) ))
Any suggestions?
EDIT
When I eval
some functions in the new frames, I do get this kind of information:
(frame-root-window) ; => #<window 7 on *info*>
the number ("7" in this case) depends on how many buffers I have opened in the actual running emacs. But the text "info" is exact the title of the frame in question.
emacs -Q
(no init file)? Otherwise, some of what you write seems unclear. E.g.C-i
versusC-h i
, and what do you mean by "a new frame"? If you useC-i
multiple times do you end up with multiple Info frames? Seems like the recipe is not complete, or some of its description is not clear.my-example-make-frame
can be used in both theinitial-frame-alist
anddefault-frame-alist
if so desired; or, you can usemake-frame
with the desired specs and create frames programmatically at will.C-i
should have readC-h i
. Yes, it doesn't matter, if you start emacs reading its init files or not. When I type 'C-h i' for the first time, I do get an new frame, presenting the content of the info directory. After having read the info, I press 'q' and the frame is icnoized (on MacOS/Aquamcs). When I type 'C-h i' again, the icon is reopend again and placed in at the former location on the screen. I wish to define the location and width of the frame in my init file, to avoid correcting it by hand/mouse.