I have the following in my init.el
(if (display-graphic-p)
(progn
(setq initial-frame-alist
'((tool-bar-lines . 0)
(width . 106) ; chars
(height . 60) ; lines
(left . 50)
(top . 50)))
(setq default-frame-alist
'((tool-bar-lines . 0)
(width . 106)
(height . 60)
(left . 50)
(top . 50))))
(progn
(setq initial-frame-alist '((tool-bar-lines . 0)))
(setq default-frame-alist '((tool-bar-lines . 0)))))
I am new to emacs and want to know how do I make every successive new frame open (left + 10) of the previous frame.
I want to be able to visually see all frames everytime I open a new frame with C-x 5 2. With the current setting in init.el new frames overlap the previous frame.
I think that the easy way here is creating frames directly emacs will create the frame following the variable:
I have this on my init.el
I also Use fringe-mode
So this is my initial setup of the emacs, then when I need a new frame I press C-x 5-2 and do not have any problem about where emacs puts that. but if you need, to create it. I recommend you to experiment with ielm (
M-x ielm), and with the frames:First the function for creating frames make-frame:
This will create and emacs frame exactly as the one created with C-x 5-2
Lets move this frame:
Now let's investigate the make-frame function (C-h f):
We cannot find the real information here but inspecting the function, looking at the source file: we find that the frame has this parameters:
top',left',width',height',user-size' anduser-position' parameters.So we can specify when creating the new frame this 4 things, now we are agoing to take only the position (this also depends on your window manager, pixels and how want you to put)
And you will get this:
(lets use