help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using only one emacs session


From: Pascal J. Bourguignon
Subject: Re: Using only one emacs session
Date: Fri, 15 May 2009 14:48:04 +0200
User-agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.2 (gnu/linux)

Francis Moreau <francis.moro@gmail.com> writes:
> After using emacs for a couple of years now, I'm still not satisfied
> on the way I'm using it.
>
> I have a couple of emacs processes, each of them dedicated for a
> specific task: for example, emacs #1 is used to work on project #1,
> emacs #2 for project #2, emacs #3 used for email, irc...
>
> The advantage of this is that each emacs can be customized according
> to the project it tracks: for example project #1 has a peculiar
> compile command ("make -j4...")       whereas project #2 does "gcc -Wall..."
> for compiling the project.
>
> Also I like to have some specific buffer layouts to be easily set so I
> use the 'window' package: for example I keep in window #2 of emacs #3
> some buffers doing irc on a specific irc server.
>
> The drawbacks of that is the multiple instance of emacs: each instance
> can't exchange data, emacsclient is more difficult to setup...
>
> So I'm wondering how other people work and if someone found out THE
> right answer. I know that some people use only one emacs session for
> doing all of their work but for now it doesn't seem very practical but
> I'm probably missing something.

There are good advantages to work as you do, if really you have
several projects going on in parallel.

In my case, in general I have one emacs used for development,
and two more, one for erc, and another for gnus.

Since erc and gnus work with the network, sometimes there are delays
or just time consuming processing in gnus, and since emacs lacks
threads, it would lock the development buffers.  So I keep several
processes to be able to work while gnus fetch articles, etc.  Besides,
I also use cvs or cutting edge versions of emacs that may crash
sometimes, so it's good to be able to crash one without losing the
others.


Now about data sharing across emacs processes, it's not really a
problem, you can still cut-and-paste between emacs processes, or you
can open the same file, and the emacs processes are careful not to
overwrite it when you update it from another emacs.

One thing that makes it easy is actually a window manager such as
ratpoison which allows you to switch from one emacs process to another
with a key choard.  Instead of doing C-x 5 o to switch to another
frame, I type C-t n.


Remains the problem of emacsclient.  We would have to modify the
server code (cf server-start) to create one socket per process instead
of one socket per user, and then pass a -s option to  emacsclient to
select the process we want.

-- 
__Pascal Bourguignon__


reply via email to

[Prev in Thread] Current Thread [Next in Thread]