* customizing emacs windows
@ 2007-05-23 17:04 Ivan
2007-05-23 22:24 ` Lennart Borgman (gmail)
2007-05-24 0:28 ` Lennart Borgman (gmail)
0 siblings, 2 replies; 25+ messages in thread
From: Ivan @ 2007-05-23 17:04 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
How can I customize Emacs so that my windows customization is
persisted (so that the customization is put in the .emacs file)? I'd
like to divide my Emacs frame to several windows with particular sizes
and to set-up some of the windows open particular buffers. Generally
I'd like to do somthing like ECB, but not exactly that.
Thanks,
--
Ivan
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-23 17:04 customizing emacs windows Ivan
@ 2007-05-23 22:24 ` Lennart Borgman (gmail)
2007-05-24 7:32 ` Eli Zaretskii
[not found] ` <mailman.1130.1179991947.32220.help-gnu-emacs@gnu.org>
2007-05-24 0:28 ` Lennart Borgman (gmail)
1 sibling, 2 replies; 25+ messages in thread
From: Lennart Borgman (gmail) @ 2007-05-23 22:24 UTC (permalink / raw)
To: Ivan; +Cc: help-gnu-emacs
Ivan wrote:
> Hi,
>
> How can I customize Emacs so that my windows customization is
> persisted (so that the customization is put in the .emacs file)? I'd
> like to divide my Emacs frame to several windows with particular sizes
> and to set-up some of the windows open particular buffers. Generally
> I'd like to do somthing like ECB, but not exactly that.
You can try winsav.el from here
http://ourcomments.org/Emacs/DL/elisp/
It currently does not do what you want. The parts save/restore from file
are not finished, but I did begin writing them. Maybe someone wants to
finish that part?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-23 17:04 customizing emacs windows Ivan
2007-05-23 22:24 ` Lennart Borgman (gmail)
@ 2007-05-24 0:28 ` Lennart Borgman (gmail)
1 sibling, 0 replies; 25+ messages in thread
From: Lennart Borgman (gmail) @ 2007-05-24 0:28 UTC (permalink / raw)
To: Ivan; +Cc: help-gnu-emacs
Ivan wrote:
> Hi,
>
> How can I customize Emacs so that my windows customization is
> persisted (so that the customization is put in the .emacs file)? I'd
> like to divide my Emacs frame to several windows with particular sizes
> and to set-up some of the windows open particular buffers. Generally
> I'd like to do somthing like ECB, but not exactly that.
>
> Thanks,
I fixed winsav.el so that it should work for save/restore window config
to/from files.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-23 22:24 ` Lennart Borgman (gmail)
@ 2007-05-24 7:32 ` Eli Zaretskii
2007-05-24 10:06 ` Lennart Borgman (gmail)
[not found] ` <mailman.1130.1179991947.32220.help-gnu-emacs@gnu.org>
1 sibling, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2007-05-24 7:32 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Thu, 24 May 2007 00:24:23 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> Cc: help-gnu-emacs@gnu.org
>
> > How can I customize Emacs so that my windows customization is
> > persisted (so that the customization is put in the .emacs file)? I'd
> > like to divide my Emacs frame to several windows with particular sizes
> > and to set-up some of the windows open particular buffers. Generally
> > I'd like to do somthing like ECB, but not exactly that.
>
> You can try winsav.el from here
>
> http://ourcomments.org/Emacs/DL/elisp/
Rather than introduce a new and unbundled package, isn't it better to
enhance the bundled winner.el?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
[not found] ` <mailman.1130.1179991947.32220.help-gnu-emacs@gnu.org>
@ 2007-05-24 9:41 ` Ivan
2007-05-24 10:00 ` Jason Rumney
2007-05-25 5:13 ` Tim X
0 siblings, 2 replies; 25+ messages in thread
From: Ivan @ 2007-05-24 9:41 UTC (permalink / raw)
To: help-gnu-emacs
On четвъртък, Май 24 2007, Eli Zaretskii wrote:
>> Date: Thu, 24 May 2007 00:24:23 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> Cc: help-gnu-emacs@gnu.org
>>
>> > How can I customize Emacs so that my windows customization is
>> > persisted (so that the customization is put in the .emacs file)? I'd
>> > like to divide my Emacs frame to several windows with particular sizes
>> > and to set-up some of the windows open particular buffers. Generally
>> > I'd like to do somthing like ECB, but not exactly that.
>>
>> You can try winsav.el from here
>>
>> http://ourcomments.org/Emacs/DL/elisp/
Thanks but, I refuse to beleive that the functionality I'm loooking
for does not exist in Emacs.
> Rather than introduce a new and unbundled package, isn't it better
> to enhance the bundled winner.el?
I read about winner-mode but I don't understand how to use it.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-24 9:41 ` Ivan
@ 2007-05-24 10:00 ` Jason Rumney
2007-05-24 11:06 ` Lennart Borgman (gmail)
2007-05-25 5:13 ` Tim X
1 sibling, 1 reply; 25+ messages in thread
From: Jason Rumney @ 2007-05-24 10:00 UTC (permalink / raw)
To: help-gnu-emacs
> > Rather than introduce a new and unbundled package, isn't it better
> > to enhance the bundled winner.el?
>
> I read about winner-mode but I don't understand how to use it.
`winner' does not save its state across sessions, but it does keep
track of the window-configuration, which will help. `desktop' keeps
track of which files are loaded across sessions, but does not deal
with window configuration (yet). Some combination of the two seems to
be what you want.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-24 7:32 ` Eli Zaretskii
@ 2007-05-24 10:06 ` Lennart Borgman (gmail)
2007-05-24 10:49 ` Eli Zaretskii
0 siblings, 1 reply; 25+ messages in thread
From: Lennart Borgman (gmail) @ 2007-05-24 10:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii wrote:
>> Date: Thu, 24 May 2007 00:24:23 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> Cc: help-gnu-emacs@gnu.org
>>
>>> How can I customize Emacs so that my windows customization is
>>> persisted (so that the customization is put in the .emacs file)? I'd
>>> like to divide my Emacs frame to several windows with particular sizes
>>> and to set-up some of the windows open particular buffers. Generally
>>> I'd like to do somthing like ECB, but not exactly that.
>> You can try winsav.el from here
>>
>> http://ourcomments.org/Emacs/DL/elisp/
>
> Rather than introduce a new and unbundled package, isn't it better to
> enhance the bundled winner.el?
Maybe, I do not know. I do not think winner.el was mentioned when we
discussed this before.
After a quick look it seems to me they are not doing the same thing.
winner.el looks more for redoing/undoing window configuration
interactively (a nice thing).
winsav.el was written to save window configurations and inject them in
frames or windows.
It looks like winner.el and winsav.el complement each other.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-24 10:06 ` Lennart Borgman (gmail)
@ 2007-05-24 10:49 ` Eli Zaretskii
2007-05-24 11:22 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2007-05-24 10:49 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Thu, 24 May 2007 12:06:41 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> CC: help-gnu-emacs@gnu.org
>
> It looks like winner.el and winsav.el complement each other.
To me it looks like saving the window configuration to a file is a
natural extension of a package that lets you save and restore window
configuration during a single session.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-24 10:00 ` Jason Rumney
@ 2007-05-24 11:06 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 25+ messages in thread
From: Lennart Borgman (gmail) @ 2007-05-24 11:06 UTC (permalink / raw)
To: Jason Rumney; +Cc: help-gnu-emacs
Jason Rumney wrote:
>>> Rather than introduce a new and unbundled package, isn't it better
>>> to enhance the bundled winner.el?
>> I read about winner-mode but I don't understand how to use it.
>
> `winner' does not save its state across sessions, but it does keep
> track of the window-configuration, which will help. `desktop' keeps
> track of which files are loaded across sessions, but does not deal
> with window configuration (yet). Some combination of the two seems to
> be what you want.
I looks to me it will be difficult to achieve what Ivan wants with that,
but I might be misunderstanding him.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-24 10:49 ` Eli Zaretskii
@ 2007-05-24 11:22 ` Lennart Borgman (gmail)
2007-05-24 13:21 ` Eli Zaretskii
0 siblings, 1 reply; 25+ messages in thread
From: Lennart Borgman (gmail) @ 2007-05-24 11:22 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii wrote:
>> Date: Thu, 24 May 2007 12:06:41 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> CC: help-gnu-emacs@gnu.org
>>
>> It looks like winner.el and winsav.el complement each other.
>
> To me it looks like saving the window configuration to a file is a
> natural extension of a package that lets you save and restore window
> configuration during a single session.
Absolutely, from a logical point of view. Maybe also from a code point
of view, but I doubt that a bit in this case. The data structures that
winner.el is using is perhaps not feasable for save/restore, but maybe
you think differently?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-24 11:22 ` Lennart Borgman (gmail)
@ 2007-05-24 13:21 ` Eli Zaretskii
2007-05-24 13:55 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2007-05-24 13:21 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Thu, 24 May 2007 13:22:59 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> CC: help-gnu-emacs@gnu.org
>
> Eli Zaretskii wrote:
> >> Date: Thu, 24 May 2007 12:06:41 +0200
> >> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> >> CC: help-gnu-emacs@gnu.org
> >>
> >> It looks like winner.el and winsav.el complement each other.
> >
> > To me it looks like saving the window configuration to a file is a
> > natural extension of a package that lets you save and restore window
> > configuration during a single session.
>
>
> Absolutely, from a logical point of view. Maybe also from a code point
> of view, but I doubt that a bit in this case. The data structures that
> winner.el is using is perhaps not feasable for save/restore, but maybe
> you think differently?
Lisp data structures are easily converted into plain text, and then a
buffer which holds that text can be saved to a disk file. To restore,
you need only invoke the Lisp reader on the saved text. How difficult
can that be? There are already quite a few packages that do similar
things, like saveplace, for example.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-24 13:21 ` Eli Zaretskii
@ 2007-05-24 13:55 ` Lennart Borgman (gmail)
2007-05-24 14:21 ` Eli Zaretskii
0 siblings, 1 reply; 25+ messages in thread
From: Lennart Borgman (gmail) @ 2007-05-24 13:55 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii wrote:
>> Date: Thu, 24 May 2007 13:22:59 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> CC: help-gnu-emacs@gnu.org
>>
>> Eli Zaretskii wrote:
>>>> Date: Thu, 24 May 2007 12:06:41 +0200
>>>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>>>> CC: help-gnu-emacs@gnu.org
>>>>
>>>> It looks like winner.el and winsav.el complement each other.
>>> To me it looks like saving the window configuration to a file is a
>>> natural extension of a package that lets you save and restore window
>>> configuration during a single session.
>>
>> Absolutely, from a logical point of view. Maybe also from a code point
>> of view, but I doubt that a bit in this case. The data structures that
>> winner.el is using is perhaps not feasable for save/restore, but maybe
>> you think differently?
>
> Lisp data structures are easily converted into plain text, and then a
> buffer which holds that text can be saved to a disk file. To restore,
> you need only invoke the Lisp reader on the saved text. How difficult
> can that be? There are already quite a few packages that do similar
> things, like saveplace, for example.
That is not exactly what I meant. I meant if the data structures
contains information that are useful for save/restore.
But I did not look close at it. The data structures in winner.el may be
that too. I took a look at winner-currents and maybe that contains the
information needed.
However I do not know if there is a way to save it. It contains the
information needed in something that looks like #<window-configuration>
when trying to print it. Is there a way to print this so that it can be
saved?
BTW, winsav.el has a little bit different focus, solving a problem that
I could not find a way to solve easily: Injection of a window
configuration into a window. The ability to save and restore window
configuration on a frame is just a byproduct.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-24 13:55 ` Lennart Borgman (gmail)
@ 2007-05-24 14:21 ` Eli Zaretskii
2007-05-24 19:29 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2007-05-24 14:21 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Thu, 24 May 2007 15:55:24 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
> CC: help-gnu-emacs@gnu.org
>
> However I do not know if there is a way to save it. It contains the
> information needed in something that looks like #<window-configuration>
> when trying to print it. Is there a way to print this so that it can be
> saved?
winner.el uses functions from ring.el to maintain its info. The
various print functions are your friends. Reading those hashed
objects might be a little tricky, but you could perhaps use the
technique similar to desktop.el to output, instead of the objects,
function calls that create the objects.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-24 14:21 ` Eli Zaretskii
@ 2007-05-24 19:29 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 25+ messages in thread
From: Lennart Borgman (gmail) @ 2007-05-24 19:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii wrote:
>> Date: Thu, 24 May 2007 15:55:24 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> CC: help-gnu-emacs@gnu.org
>>
>> However I do not know if there is a way to save it. It contains the
>> information needed in something that looks like #<window-configuration>
>> when trying to print it. Is there a way to print this so that it can be
>> saved?
>
> winner.el uses functions from ring.el to maintain its info. The
> various print functions are your friends. Reading those hashed
> objects might be a little tricky, but you could perhaps use the
> technique similar to desktop.el to output, instead of the objects,
> function calls that create the objects.
I think it is only you get back from (current-window-configuration) that
holds the information that winner.el uses to restore the windows.
Everything is there so winner.el does not have to do very much.
Unfortunately you can not investigate the value of this and it prints
just as #<window-configuration>. I think I remember now that we (I do
not know if you were involved) discussed this on the devel list.
Because of this I use (window-tree) instead which gives the necessary
window structure information.
For now I can not see any other way to save the window configuration
than something similar to what I have done in winsav.el.
It is however complicated to do this on the lisp level (as in
winsav.el), the window layout is probably more easier handled on the C
level, like in set-window-configuration. So for a long term solution I
would think it is much better to enhance the printed representation of
the value of (current-window-configuration) so that it could be used
together with (set-window-configuration) for save/restore from file. A
bit more than the printed representation must be added of course, but I
guess that is clear.
Eli, I would be glad if you put this in etc/TODO. I think that at the
splitting of the top level in window tree is also a matter to consider
there. (That this can not be done was the main reason for writing
winsav.el.)
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-24 9:41 ` Ivan
2007-05-24 10:00 ` Jason Rumney
@ 2007-05-25 5:13 ` Tim X
2007-05-25 10:09 ` Ivan
1 sibling, 1 reply; 25+ messages in thread
From: Tim X @ 2007-05-25 5:13 UTC (permalink / raw)
To: help-gnu-emacs
Ivan <ivanushka@yahoo.com> writes:
> On четвъртък, Май 24 2007, Eli Zaretskii wrote:
>
>>> Date: Thu, 24 May 2007 00:24:23 +0200
>>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>>> Cc: help-gnu-emacs@gnu.org
>>>
>>> > How can I customize Emacs so that my windows customization is
>>> > persisted (so that the customization is put in the .emacs file)? I'd
>>> > like to divide my Emacs frame to several windows with particular sizes
>>> > and to set-up some of the windows open particular buffers. Generally
>>> > I'd like to do somthing like ECB, but not exactly that.
>>>
>>> You can try winsav.el from here
>>>
>>> http://ourcomments.org/Emacs/DL/elisp/
>
> Thanks but, I refuse to beleive that the functionality I'm loooking
> for does not exist in Emacs.
>
>> Rather than introduce a new and unbundled package, isn't it better
>> to enhance the bundled winner.el?
>
> I read about winner-mode but I don't understand how to use it.
AFAIK and understand what you are requesting, the functionality you want does
not exist 'out of the box'. All the low level functionality exists, but not all
put together in a nice high level package for end users. There are a number of
such packages available which may or may not meet your needs, but as far as I
know, none of them are yet bundled with emacs.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-25 5:13 ` Tim X
@ 2007-05-25 10:09 ` Ivan
2007-05-25 11:02 ` Ivan
0 siblings, 1 reply; 25+ messages in thread
From: Ivan @ 2007-05-25 10:09 UTC (permalink / raw)
To: help-gnu-emacs
On петък, Май 25 2007, Tim X wrote:
> Ivan <ivanushka@yahoo.com> writes:
>
>> On четвъртък, Май 24 2007, Eli Zaretskii wrote:
>>
>>>> Date: Thu, 24 May 2007 00:24:23 +0200
>>>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>>>> Cc: help-gnu-emacs@gnu.org
>>>>
>>>> > How can I customize Emacs so that my windows customization is
>>>> > persisted (so that the customization is put in the .emacs
>>>> > file)? I'd like to divide my Emacs frame to several windows
>>>> > with particular sizes and to set-up some of the windows open
>>>> > particular buffers. Generally I'd like to do somthing like ECB,
>>>> > but not exactly that.
>>>>
>>>> You can try winsav.el from here
>>>>
>>>> http://ourcomments.org/Emacs/DL/elisp/
>>
>> Thanks but, I refuse to beleive that the functionality I'm loooking
>> for does not exist in Emacs.
>>
>>> Rather than introduce a new and unbundled package, isn't it better
>>> to enhance the bundled winner.el?
>>
>> I read about winner-mode but I don't understand how to use it.
>
> AFAIK and understand what you are requesting, the functionality you
> want does not exist 'out of the box'. All the low level
> functionality exists, but not all put together in a nice high level
> package for end users. There are a number of such packages available
> which may or may not meet your needs, but as far as I know, none of
> them are yet bundled with emacs.
First, thanks for your messages. Sorry if I wasn't quite clear in my
request. I almost managed to achieve what I needed with simple
Emacs-commands. I defined a function in .emacs that opens buffers and
splits windows and I called that function on Emacs start. I used
commands such as split-window-vertically, find-file, other-window and
so on. It is not perfect because I have problems controlling which
window which buffer to display as one of the things I start is - run
Slime and Slime does some strange things with the windows. I also have
problems controlling windows's sizes.
My requirements are very simple for now - I need the Emacs frame
devided into several windows with particular sizes. Each window should
display a particular buffer.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-25 10:09 ` Ivan
@ 2007-05-25 11:02 ` Ivan
2007-05-26 3:29 ` Tim X
0 siblings, 1 reply; 25+ messages in thread
From: Ivan @ 2007-05-25 11:02 UTC (permalink / raw)
To: help-gnu-emacs
On петък, Май 25 2007, Ivan wrote:
> First, thanks for your messages. Sorry if I wasn't quite clear in my
> request. I almost managed to achieve what I needed with simple
> Emacs-commands. I defined a function in .emacs that opens buffers and
> splits windows and I called that function on Emacs start. I used
> commands such as split-window-vertically, find-file, other-window and
> so on. It is not perfect because I have problems controlling which
> window which buffer to display as one of the things I start is - run
> Slime and Slime does some strange things with the windows. I also have
> problems controlling windows's sizes.
>
> My requirements are very simple for now - I need the Emacs frame
> devided into several windows with particular sizes. Each window should
> display a particular buffer.
As a matter of fact what I'm trying to do is make Emacs provide an
integrated development environment for Lisp development like
Eclispe. I need several buffers:
1. REPL
2. Log output buffer
3. Project's source files tree
4. Web browser
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-25 11:02 ` Ivan
@ 2007-05-26 3:29 ` Tim X
2007-05-26 9:02 ` Ivan
2007-05-26 10:18 ` Petter Gustad
0 siblings, 2 replies; 25+ messages in thread
From: Tim X @ 2007-05-26 3:29 UTC (permalink / raw)
To: help-gnu-emacs
Ivan <ivanushka@yahoo.com> writes:
> On петък, Май 25 2007, Ivan wrote:
>
>> First, thanks for your messages. Sorry if I wasn't quite clear in my
>> request. I almost managed to achieve what I needed with simple
>> Emacs-commands. I defined a function in .emacs that opens buffers and
>> splits windows and I called that function on Emacs start. I used
>> commands such as split-window-vertically, find-file, other-window and
>> so on. It is not perfect because I have problems controlling which
>> window which buffer to display as one of the things I start is - run
>> Slime and Slime does some strange things with the windows. I also have
>> problems controlling windows's sizes.
>>
>> My requirements are very simple for now - I need the Emacs frame
>> devided into several windows with particular sizes. Each window should
>> display a particular buffer.
>
> As a matter of fact what I'm trying to do is make Emacs provide an
> integrated development environment for Lisp development like
> Eclispe. I need several buffers:
> 1. REPL
> 2. Log output buffer
> 3. Project's source files tree
> 4. Web browser
Something which may provide some ideas or some code you could borrow is the
emacs window manager. I think it may be mentioned on the emacs wiki site
(http://emacswiki.org) and at one time, I think there was a Debian package for
it.
>From memory, it only works for XEmacs, but it may have some code or ideas you
could use to create the function you want.
Another possibility depends on your window manager. I use Sawfish, which is a
light weight window manager written in 'rep', which is essentially a lisp
dialect. However, it has support for window groups, named desktops etc and the
ability to send specific windows to specific workspaces and positions. It would
probably be possible to use a combination of emacs and rep to control frame
placement and some emacs functions to divide up the frames according to how you
want them.
When using slime, I open three frames, send them to different workspaces and
have a function key defined to switch between the frames. In one frame I have a
buffer witht he source code in it, in another frame, I have the slime REPL and
log window and in the third frame, I have w3m. I've thought about automating
the whole process, but to be honest, haven't bothered because I restart emacs
so rarely that its not really been necessary. I usually have about 15 different
workspaces and different emacs frames on most of them. I then just switch
between workspaces using two function keys or by moving the mouse to the left
or right edge of the screen.
A package able to open frames, divide them up into windows, associate specific
buffers with the windows and distribute the frames over specific workspaces
would be very handy. The ability to define 'groups' of such would be even more
useful than just the ability to save your config on exit and restore it.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-26 3:29 ` Tim X
@ 2007-05-26 9:02 ` Ivan
2007-05-26 9:45 ` Leo
` (3 more replies)
2007-05-26 10:18 ` Petter Gustad
1 sibling, 4 replies; 25+ messages in thread
From: Ivan @ 2007-05-26 9:02 UTC (permalink / raw)
To: help-gnu-emacs
On събота, Май 26 2007, Tim X wrote:
> Ivan <ivanushka@yahoo.com> writes:
>
>> On петък, Май 25 2007, Ivan wrote:
>>
>>> First, thanks for your messages. Sorry if I wasn't quite clear in my
>>> request. I almost managed to achieve what I needed with simple
>>> Emacs-commands. I defined a function in .emacs that opens buffers and
>>> splits windows and I called that function on Emacs start. I used
>>> commands such as split-window-vertically, find-file, other-window and
>>> so on. It is not perfect because I have problems controlling which
>>> window which buffer to display as one of the things I start is - run
>>> Slime and Slime does some strange things with the windows. I also have
>>> problems controlling windows's sizes.
>>>
>>> My requirements are very simple for now - I need the Emacs frame
>>> devided into several windows with particular sizes. Each window should
>>> display a particular buffer.
>>
>> As a matter of fact what I'm trying to do is make Emacs provide an
>> integrated development environment for Lisp development like
>> Eclispe. I need several buffers:
>> 1. REPL
>> 2. Log output buffer
>> 3. Project's source files tree
>> 4. Web browser
>
> Something which may provide some ideas or some code you could borrow is the
> emacs window manager. I think it may be mentioned on the emacs wiki site
> (http://emacswiki.org) and at one time, I think there was a Debian package for
> it.
I found this while looking it up:
http://www.emacswiki.org/cgi-bin/wiki/XWindowEmacsManager
> From memory, it only works for XEmacs, but it may have some code or ideas you
> could use to create the function you want.
>
> Another possibility depends on your window manager. I use Sawfish, which is a
> light weight window manager written in 'rep', which is essentially a lisp
> dialect. However, it has support for window groups, named desktops etc and the
> ability to send specific windows to specific workspaces and positions. It would
> probably be possible to use a combination of emacs and rep to control frame
> placement and some emacs functions to divide up the frames according to how you
> want them.
I use Windows on my desktop. Other times I only have a console.
> When using slime, I open three frames, send them to different workspaces and
> have a function key defined to switch between the frames. In one frame I have a
> buffer witht he source code in it, in another frame, I have the slime REPL and
> log window and in the third frame, I have w3m. I've thought about automating
> the whole process, but to be honest, haven't bothered because I restart emacs
> so rarely that its not really been necessary. I usually have about 15 different
> workspaces and different emacs frames on most of them. I then just switch
> between workspaces using two function keys or by moving the mouse to the left
> or right edge of the screen.
My target is one Emacs frame divided into several windows just like in
Eclipse. In tune with the Emacs ideology the active window should be
controled with a kbd shortcut and not only with the mouse.
Switching workspaces is tiring for the eyes. A contemporary display
should be enough for a window representing an IDE.
> A package able to open frames, divide them up into windows, associate specific
> buffers with the windows and distribute the frames over specific workspaces
> would be very handy. The ability to define 'groups' of such would be even more
> useful than just the ability to save your config on exit and restore it.
I'd rather have buffer - window association and control over windows's
size and position. Currently even if we manage to set this up, many
functions (for example describe) open windows within Emacs and on
closing them the set-up is broken.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-26 9:02 ` Ivan
@ 2007-05-26 9:45 ` Leo
2007-05-26 10:12 ` Peter Dyballa
` (2 subsequent siblings)
3 siblings, 0 replies; 25+ messages in thread
From: Leo @ 2007-05-26 9:45 UTC (permalink / raw)
To: help-gnu-emacs
----- Ivan (2007-05-26) wrote:-----
> My target is one Emacs frame divided into several windows just like in
> Eclipse. In tune with the Emacs ideology the active window should be
> controled with a kbd shortcut and not only with the mouse.
>
> Switching workspaces is tiring for the eyes. A contemporary display
> should be enough for a window representing an IDE.
It seems ECB¹ is what you want.
Footnotes:
¹ http://ecb.sourceforge.net/screenshots/1.png
--
Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-26 9:02 ` Ivan
2007-05-26 9:45 ` Leo
@ 2007-05-26 10:12 ` Peter Dyballa
[not found] ` <mailman.1273.1180174364.32220.help-gnu-emacs@gnu.org>
[not found] ` <mailman.1268.1180172850.32220.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 25+ messages in thread
From: Peter Dyballa @ 2007-05-26 10:12 UTC (permalink / raw)
To: Ivan; +Cc: help-gnu-emacs
Am 26.05.2007 um 11:02 schrieb Ivan:
> My target is one Emacs frame divided into several windows just like in
> Eclipse. In tune with the Emacs ideology the active window should be
> controled with a kbd shortcut and not only with the mouse.
Have you thought of using desktop.el and/or session.el? They save and
can restore buffers and also layouts, at least up to some
configurable degree ... Changing to others windows works with mouse
best IMO, but you could also exchange this buffer with that one, here
in this window!
--
Greetings
Pete
In a world without walls and fences, who needs gates and windows?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-26 3:29 ` Tim X
2007-05-26 9:02 ` Ivan
@ 2007-05-26 10:18 ` Petter Gustad
2007-05-26 13:50 ` Tim X
1 sibling, 1 reply; 25+ messages in thread
From: Petter Gustad @ 2007-05-26 10:18 UTC (permalink / raw)
To: help-gnu-emacs
Tim X <timx@nospam.dev.null> writes:
> so rarely that its not really been necessary. I usually have about
> 15 different workspaces and different emacs frames on most of
> them. I then just switch between workspaces using two function keys
> or by moving the mouse to the left or right edge of the screen.
I prefer to select Emacs frames using a popup menu. I've made a
function in sawfish which pops up a menu of all Emacs frames:
(provide 'menu-of)
(require 'sawfish.wm.menus)
(defun wm-class-is (w class)
(equal (aref (get-x-text-property w 'WM_CLASS) 1) class))
(defun emacs-p (w)
(wm-class-is w "Emacs"))
(defun xterm-p (w)
(wm-class-is w "XTerm"))
(defun popup-menu-of (pred)
"make popup windows of a certain type"
(popup-menu
(mapcar #'(lambda (w)
(list (window-name w)
(lambda ()
(uniconify-window w)
(x-raise-window w)
(set-input-focus w))))
(filter pred (managed-windows)))))
(defun menu-of-emacs ()
"make a popup menu of emacs windows"
(interactive)
(popup-menu-of emacs-p))
(defun menu-of-xterm ()
"make a popup menu of xterm windows"
(interactive)
(popup-menu-of xterm-p))
Then in the global keymap I bind menu-of-emacs to e.g. to H-1 so when I
press the Windows key and 1 I get a popup menu of all Emacs frames.
Petter
--
________________________________________________________________________
Petter Gustad 8'h2B | ~8'h2B http://www.gustad.com/petter
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
[not found] ` <mailman.1273.1180174364.32220.help-gnu-emacs@gnu.org>
@ 2007-05-26 11:34 ` Ivan
0 siblings, 0 replies; 25+ messages in thread
From: Ivan @ 2007-05-26 11:34 UTC (permalink / raw)
To: help-gnu-emacs
On събота, Май 26 2007, Peter Dyballa wrote:
> Am 26.05.2007 um 11:02 schrieb Ivan:
>
>> My target is one Emacs frame divided into several windows just like
>> in Eclipse. In tune with the Emacs ideology the active window
>> should be controled with a kbd shortcut and not only with the
>> mouse.
>
> Have you thought of using desktop.el and/or session.el? They save
> and can restore buffers and also layouts, at least up to some
> configurable degree ...
No, what can I do with them?
> Changing to others windows works with mouse best IMO, but you could
> also exchange this buffer with that one, here in this window!
Yeah, sure - it's just a preference. It is the idology of Emacs that
your hands are constantly on the keyboard.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
[not found] ` <mailman.1268.1180172850.32220.help-gnu-emacs@gnu.org>
@ 2007-05-26 11:35 ` Ivan
0 siblings, 0 replies; 25+ messages in thread
From: Ivan @ 2007-05-26 11:35 UTC (permalink / raw)
To: help-gnu-emacs
On събота, Май 26 2007, Leo wrote:
> ----- Ivan (2007-05-26) wrote:-----
>
>> My target is one Emacs frame divided into several windows just like in
>> Eclipse. In tune with the Emacs ideology the active window should be
>> controled with a kbd shortcut and not only with the mouse.
>>
>> Switching workspaces is tiring for the eyes. A contemporary display
>> should be enough for a window representing an IDE.
>
> It seems ECB¹ is what you want.
Does anybody managed to integrate it well with Slime for example?
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: customizing emacs windows
2007-05-26 10:18 ` Petter Gustad
@ 2007-05-26 13:50 ` Tim X
0 siblings, 0 replies; 25+ messages in thread
From: Tim X @ 2007-05-26 13:50 UTC (permalink / raw)
To: help-gnu-emacs
Petter Gustad <newsmail6@gustad.com> writes:
> Tim X <timx@nospam.dev.null> writes:
>
>
>> so rarely that its not really been necessary. I usually have about
>> 15 different workspaces and different emacs frames on most of
>> them. I then just switch between workspaces using two function keys
>> or by moving the mouse to the left or right edge of the screen.
>
> I prefer to select Emacs frames using a popup menu. I've made a
> function in sawfish which pops up a menu of all Emacs frames:
>
> (provide 'menu-of)
> (require 'sawfish.wm.menus)
>
> (defun wm-class-is (w class)
> (equal (aref (get-x-text-property w 'WM_CLASS) 1) class))
>
> (defun emacs-p (w)
> (wm-class-is w "Emacs"))
>
> (defun xterm-p (w)
> (wm-class-is w "XTerm"))
>
> (defun popup-menu-of (pred)
> "make popup windows of a certain type"
> (popup-menu
> (mapcar #'(lambda (w)
> (list (window-name w)
> (lambda ()
> (uniconify-window w)
> (x-raise-window w)
> (set-input-focus w))))
> (filter pred (managed-windows)))))
>
> (defun menu-of-emacs ()
> "make a popup menu of emacs windows"
> (interactive)
> (popup-menu-of emacs-p))
>
> (defun menu-of-xterm ()
> "make a popup menu of xterm windows"
> (interactive)
> (popup-menu-of xterm-p))
>
>
> Then in the global keymap I bind menu-of-emacs to e.g. to H-1 so when I
> press the Windows key and 1 I get a popup menu of all Emacs frames.
>
> Petter
>
> --
> ________________________________________________________________________
> Petter Gustad 8'h2B | ~8'h2B http://www.gustad.com/petter
Exactly why I love sawfish as a wm! The combination of sawfish and emacs is
truely friendly.
Thanks for the code snippets.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2007-05-26 13:50 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-23 17:04 customizing emacs windows Ivan
2007-05-23 22:24 ` Lennart Borgman (gmail)
2007-05-24 7:32 ` Eli Zaretskii
2007-05-24 10:06 ` Lennart Borgman (gmail)
2007-05-24 10:49 ` Eli Zaretskii
2007-05-24 11:22 ` Lennart Borgman (gmail)
2007-05-24 13:21 ` Eli Zaretskii
2007-05-24 13:55 ` Lennart Borgman (gmail)
2007-05-24 14:21 ` Eli Zaretskii
2007-05-24 19:29 ` Lennart Borgman (gmail)
[not found] ` <mailman.1130.1179991947.32220.help-gnu-emacs@gnu.org>
2007-05-24 9:41 ` Ivan
2007-05-24 10:00 ` Jason Rumney
2007-05-24 11:06 ` Lennart Borgman (gmail)
2007-05-25 5:13 ` Tim X
2007-05-25 10:09 ` Ivan
2007-05-25 11:02 ` Ivan
2007-05-26 3:29 ` Tim X
2007-05-26 9:02 ` Ivan
2007-05-26 9:45 ` Leo
2007-05-26 10:12 ` Peter Dyballa
[not found] ` <mailman.1273.1180174364.32220.help-gnu-emacs@gnu.org>
2007-05-26 11:34 ` Ivan
[not found] ` <mailman.1268.1180172850.32220.help-gnu-emacs@gnu.org>
2007-05-26 11:35 ` Ivan
2007-05-26 10:18 ` Petter Gustad
2007-05-26 13:50 ` Tim X
2007-05-24 0:28 ` Lennart Borgman (gmail)
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.