all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using only one emacs session
@ 2009-05-15 11:04 Francis Moreau
  2009-05-15 11:47 ` Peter Dyballa
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: Francis Moreau @ 2009-05-15 11:04 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

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.

Thanks for your feedbacks.


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

* Re: Using only one emacs session
  2009-05-15 11:04 Using only one emacs session Francis Moreau
@ 2009-05-15 11:47 ` Peter Dyballa
  2009-05-15 12:48 ` Pascal J. Bourguignon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 27+ messages in thread
From: Peter Dyballa @ 2009-05-15 11:47 UTC (permalink / raw)
  To: Francis Moreau; +Cc: help-gnu-emacs


Am 15.05.2009 um 13:04 schrieb Francis Moreau:

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


One Emacs with session and desktop loaded will remember a lot of  
different compile and other commands ...

--
Greetings

   Pete

Don't just do something, sit there.







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

* Re: Using only one emacs session
  2009-05-15 11:04 Using only one emacs session Francis Moreau
  2009-05-15 11:47 ` Peter Dyballa
@ 2009-05-15 12:48 ` Pascal J. Bourguignon
  2009-05-15 13:34   ` Francis Moreau
       [not found] ` <mailman.7199.1242388057.31690.help-gnu-emacs@gnu.org>
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 27+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-15 12:48 UTC (permalink / raw)
  To: help-gnu-emacs

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__


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

* Re: Using only one emacs session
       [not found] ` <mailman.7199.1242388057.31690.help-gnu-emacs@gnu.org>
@ 2009-05-15 12:50   ` Pascal J. Bourguignon
  2009-05-15 12:53   ` Francis Moreau
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 27+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-15 12:50 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 15.05.2009 um 13:04 schrieb Francis Moreau:
>
>> 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...
>
>
> One Emacs with session and desktop loaded will remember a lot of
> different compile and other commands ...

Notice also that you may have several compilation buffer running at
the same time, just rename *compilation* to something else and create
a new compilation.

You may write a command to do it more systematically similar to my
nshell command: http://darcs.informatimago.com/public/emacs/pjb-shell.el

-- 
__Pascal Bourguignon__


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

* Re: Using only one emacs session
       [not found] ` <mailman.7199.1242388057.31690.help-gnu-emacs@gnu.org>
  2009-05-15 12:50   ` Pascal J. Bourguignon
@ 2009-05-15 12:53   ` Francis Moreau
  2009-05-15 13:36     ` Pascal J. Bourguignon
                       ` (3 more replies)
  2009-05-15 13:38   ` Lowell Gilbert
       [not found]   ` <mailman.7201.1242394726.31690.help-gnu-emacs@gnu.org>
  3 siblings, 4 replies; 27+ messages in thread
From: Francis Moreau @ 2009-05-15 12:53 UTC (permalink / raw)
  To: help-gnu-emacs

On May 15, 1:47 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 15.05.2009 um 13:04 schrieb Francis Moreau:
>
> > 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...
>
> One Emacs with session and desktop loaded will remember a lot of  
> different compile and other commands ...
>

hmm how do you tell emacs to use different compile commands for
different buffers ?

thanks


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

* Re: Using only one emacs session
  2009-05-15 12:48 ` Pascal J. Bourguignon
@ 2009-05-15 13:34   ` Francis Moreau
  0 siblings, 0 replies; 27+ messages in thread
From: Francis Moreau @ 2009-05-15 13:34 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

On May 15, 2:48 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
>
> 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,

so you put all your development projects inside the same emacs
sessions...

Do you use anything like session, desktop, window pacakges ?

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

Ah yes you're right, when the network is down gnus locks the emacs
session where it's running, really annoying.

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

I think I'm probably going to do the same.

>
> Now about data sharing across emacs processes, it's not really a
> problem, you can still cut-and-paste between emacs processes,

that's what I'd like to avoid

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

ok

thanks


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

* Re: Using only one emacs session
  2009-05-15 12:53   ` Francis Moreau
@ 2009-05-15 13:36     ` Pascal J. Bourguignon
  2009-05-15 13:45       ` Francis Moreau
  2009-05-15 14:13     ` Michael Ekstrand
                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 27+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-15 13:36 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:

> On May 15, 1:47 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
>> Am 15.05.2009 um 13:04 schrieb Francis Moreau:
>>
>> > 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...
>>
>> One Emacs with session and desktop loaded will remember a lot of  
>> different compile and other commands ...
>>
>
> hmm how do you tell emacs to use different compile commands for
> different buffers ?

M-x compile RET and you edit the command line.

-- 
__Pascal Bourguignon__


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

* Re: Using only one emacs session
       [not found] ` <mailman.7199.1242388057.31690.help-gnu-emacs@gnu.org>
  2009-05-15 12:50   ` Pascal J. Bourguignon
  2009-05-15 12:53   ` Francis Moreau
@ 2009-05-15 13:38   ` Lowell Gilbert
  2009-05-15 14:00     ` tomas
       [not found]   ` <mailman.7201.1242394726.31690.help-gnu-emacs@gnu.org>
  3 siblings, 1 reply; 27+ messages in thread
From: Lowell Gilbert @ 2009-05-15 13:38 UTC (permalink / raw)
  To: Francis Moreau, help-gnu-emacs

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 15.05.2009 um 13:04 schrieb Francis Moreau:
>
>> 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...
>
>
> One Emacs with session and desktop loaded will remember a lot of
> different compile and other commands ...

That will let you get the settings from the last time you set things up,
but it begs the question, which is having those settings co-exist in the
same session with other settings for other work.  The way to do the
latter is to make the settings buffer-local.  A good method is to do
this in a mode hook; you can even have the mode hook look at the path
and set the build command accordingly.  




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

* Re: Using only one emacs session
  2009-05-15 13:36     ` Pascal J. Bourguignon
@ 2009-05-15 13:45       ` Francis Moreau
  2009-05-15 14:55         ` Peter Dyballa
                           ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Francis Moreau @ 2009-05-15 13:45 UTC (permalink / raw)
  To: help-gnu-emacs

On May 15, 3:36 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> Francis Moreau <francis.m...@gmail.com> writes:
> > On May 15, 1:47 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> >> Am 15.05.2009 um 13:04 schrieb Francis Moreau:
>
> >> > 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...
>
> >> One Emacs with session and desktop loaded will remember a lot of  
> >> different compile and other commands ...
>
> > hmm how do you tell emacs to use different compile commands for
> > different buffers ?
>
> M-x compile RET and you edit the command line.

but that would change the compile for all buffers, no ?


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

* Re: Using only one emacs session
       [not found]   ` <mailman.7201.1242394726.31690.help-gnu-emacs@gnu.org>
@ 2009-05-15 13:49     ` Francis Moreau
  0 siblings, 0 replies; 27+ messages in thread
From: Francis Moreau @ 2009-05-15 13:49 UTC (permalink / raw)
  To: help-gnu-emacs

On May 15, 3:38 pm, Lowell Gilbert <lguse...@be-well.ilk.org> wrote:
>
> That will let you get the settings from the last time you set things up,
> but it begs the question, which is having those settings co-exist in the
> same session with other settings for other work.  The way to do the
> latter is to make the settings buffer-local.  A good method is to do
> this in a mode hook; you can even have the mode hook look at the path
> and set the build command accordingly.  

yes that's what I do with my multiple emacs session setting.

I use desktop package and each project has a specific desktop file
which saves setting per work.


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

* Re: Using only one emacs session
  2009-05-15 13:38   ` Lowell Gilbert
@ 2009-05-15 14:00     ` tomas
  0 siblings, 0 replies; 27+ messages in thread
From: tomas @ 2009-05-15 14:00 UTC (permalink / raw)
  To: Lowell Gilbert; +Cc: help-gnu-emacs, Francis Moreau

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, May 15, 2009 at 09:38:34AM -0400, Lowell Gilbert wrote:
> Peter Dyballa <Peter_Dyballa@Web.DE> writes:

[...]
> [...] you can even have the mode hook look at the path
> and set the build command accordingly. 

There are also per-directory variables: if a directory contains a file
called .dir-locals.el, those settings take effect for all files in this
direcctory (and recursively in its sub-directories). Newer versions of
Emacs (don't know, more or less those younger than a year, I guess)
provide this.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKDXWCBcgs9XrR2kYRAgVqAJ9M9i10PXoEoK4z5pJw3/XRVoJAJgCbBFxY
tICJQjmrz4FAvNM2egjPA2Q=
=DFJ+
-----END PGP SIGNATURE-----




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

* Re: Using only one emacs session
  2009-05-15 12:53   ` Francis Moreau
  2009-05-15 13:36     ` Pascal J. Bourguignon
@ 2009-05-15 14:13     ` Michael Ekstrand
  2009-05-15 14:38     ` Peter Dyballa
  2009-05-16 11:14     ` Vagn Johansen
  3 siblings, 0 replies; 27+ messages in thread
From: Michael Ekstrand @ 2009-05-15 14:13 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:
> On May 15, 1:47 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
>> Am 15.05.2009 um 13:04 schrieb Francis Moreau:
>>
>> > 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...
>>
>> One Emacs with session and desktop loaded will remember a lot of  
>> different compile and other commands ...
>>
>
> hmm how do you tell emacs to use different compile commands for
> different buffers ?

Look at project-root.el (available on EmacsWiki).  It lets you configure
how to define a "project", and then use some trickery based on that to
customize your compile commands (e.g. storing the compile command in a
text file in the project root directory, or having Elisp detect what
kind of project it is and set the compile command appropriately).  There
are probably other solutions as well.

- Michael

-- 
mouse, n: A device for pointing at the xterm in which you want to type.
Confused by the strange files?  I cryptographically sign my messages.
For more information see <http://www.elehack.net/resources/gpg>.


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

* Re: Using only one emacs session
  2009-05-15 12:53   ` Francis Moreau
  2009-05-15 13:36     ` Pascal J. Bourguignon
  2009-05-15 14:13     ` Michael Ekstrand
@ 2009-05-15 14:38     ` Peter Dyballa
  2009-05-16 11:14     ` Vagn Johansen
  3 siblings, 0 replies; 27+ messages in thread
From: Peter Dyballa @ 2009-05-15 14:38 UTC (permalink / raw)
  To: Francis Moreau; +Cc: help-gnu-emacs


Am 15.05.2009 um 14:53 schrieb Francis Moreau:

> hmm how do you tell emacs to use different compile commands for
> different buffers ?


By using the compile command history function.

--
Greetings

   Pete

A TRUE Klingon warrior does not comment his code.





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

* Re: Using only one emacs session
  2009-05-15 13:45       ` Francis Moreau
@ 2009-05-15 14:55         ` Peter Dyballa
  2009-05-15 16:50           ` Suttles, Andrew C. (GRC-DSI0)
       [not found]           ` <mailman.7245.1242439486.31690.help-gnu-emacs@gnu.org>
       [not found]         ` <mailman.7205.1242399319.31690.help-gnu-emacs@gnu.org>
  2009-05-15 21:41         ` Pascal J. Bourguignon
  2 siblings, 2 replies; 27+ messages in thread
From: Peter Dyballa @ 2009-05-15 14:55 UTC (permalink / raw)
  To: Francis Moreau; +Cc: help-gnu-emacs


Am 15.05.2009 um 15:45 schrieb Francis Moreau:

> but that would change the compile for all buffers, no ?

Of course! The last compile command is put on top of the history  
stack and would have to scroll through it. (I can't tell any  
experience from having more than just one *compilation* buffer at one  
time.)

--
Greetings

   Pete

Government is actually the worst failure of civilized man. There has  
never been a really good one, and even those that are most tolerable  
are arbitrary, cruel, grasping and unintelligent.
				– H. L. Mencken







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

* Re: Using only one emacs session
       [not found]         ` <mailman.7205.1242399319.31690.help-gnu-emacs@gnu.org>
@ 2009-05-15 16:02           ` Francis Moreau
  0 siblings, 0 replies; 27+ messages in thread
From: Francis Moreau @ 2009-05-15 16:02 UTC (permalink / raw)
  To: help-gnu-emacs

On May 15, 4:55 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 15.05.2009 um 15:45 schrieb Francis Moreau:
>
> > but that would change the compile for all buffers, no ?
>
> Of course! The last compile command is put on top of the history  
> stack and would have to scroll through it. (I can't tell any  
> experience from having more than just one *compilation* buffer at one  
> time.)
>

just try to deal with several projects at the same time in the same
emacs session


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

* RE: Using only one emacs session
  2009-05-15 14:55         ` Peter Dyballa
@ 2009-05-15 16:50           ` Suttles, Andrew C. (GRC-DSI0)
       [not found]           ` <mailman.7245.1242439486.31690.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 27+ messages in thread
From: Suttles, Andrew C. (GRC-DSI0) @ 2009-05-15 16:50 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

I put local variables at the bottom of each project file I write code in.  When I load the source files, the compile command is automatically configured.

Andrew

>-----Original Message-----
>From: help-gnu-emacs-bounces+andrew.c.suttles=nasa.gov@gnu.org
>[mailto:help-gnu-emacs-bounces+andrew.c.suttles=nasa.gov@gnu.org] On
>Behalf Of Peter Dyballa
>Sent: Friday, May 15, 2009 10:55 AM
>To: Francis Moreau
>Cc: help-gnu-emacs@gnu.org
>Subject: Re: Using only one emacs session
>
>
>Am 15.05.2009 um 15:45 schrieb Francis Moreau:
>
>> but that would change the compile for all buffers, no ?
>
>Of course! The last compile command is put on top of the history
>stack and would have to scroll through it. (I can't tell any
>experience from having more than just one *compilation* buffer at one
>time.)
>
>--
>Greetings
>
>   Pete
>
>Government is actually the worst failure of civilized man. There has
>never been a really good one, and even those that are most tolerable
>are arbitrary, cruel, grasping and unintelligent.
>				- H. L. Mencken
>
>
>
>





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

* Re: Using only one emacs session
  2009-05-15 11:04 Using only one emacs session Francis Moreau
                   ` (2 preceding siblings ...)
       [not found] ` <mailman.7199.1242388057.31690.help-gnu-emacs@gnu.org>
@ 2009-05-15 17:07 ` William Xu
       [not found] ` <mailman.7216.1242408514.31690.help-gnu-emacs@gnu.org>
  4 siblings, 0 replies; 27+ messages in thread
From: William Xu @ 2009-05-15 17:07 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:

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

For that I would open multiple shell or eshell buffers for them.

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

How about `C-x r w' or window-configuration-to-register? 

> The drawbacks of that is the multiple instance of emacs: each instance
> can't exchange data, emacsclient is more difficult to setup...

Why? The traditional emacsclient is rather easy to setup: 

  (server-start)

Then, 

  $ emacsclient FILE

-- 
William

http://xwl.appspot.com





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

* Re: Using only one emacs session
  2009-05-15 13:45       ` Francis Moreau
  2009-05-15 14:55         ` Peter Dyballa
       [not found]         ` <mailman.7205.1242399319.31690.help-gnu-emacs@gnu.org>
@ 2009-05-15 21:41         ` Pascal J. Bourguignon
  2 siblings, 0 replies; 27+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-15 21:41 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:

> On May 15, 3:36 pm, p...@informatimago.com (Pascal J. Bourguignon)
> wrote:
>> Francis Moreau <francis.m...@gmail.com> writes:
>> > On May 15, 1:47 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
>> >> Am 15.05.2009 um 13:04 schrieb Francis Moreau:
>>
>> >> > 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...
>>
>> >> One Emacs with session and desktop loaded will remember a lot of  
>> >> different compile and other commands ...
>>
>> > hmm how do you tell emacs to use different compile commands for
>> > different buffers ?
>>
>> M-x compile RET and you edit the command line.
>
> but that would change the compile for all buffers, no ?

For the new compilation buffers, but in the old when you use M-x
recompile it still uses the command you gave to create that old
compilation buffer.


-- 
__Pascal Bourguignon__


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

* Re: Using only one emacs session
  2009-05-15 12:53   ` Francis Moreau
                       ` (2 preceding siblings ...)
  2009-05-15 14:38     ` Peter Dyballa
@ 2009-05-16 11:14     ` Vagn Johansen
  3 siblings, 0 replies; 27+ messages in thread
From: Vagn Johansen @ 2009-05-16 11:14 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:

> On May 15, 1:47 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
>> Am 15.05.2009 um 13:04 schrieb Francis Moreau:
>
> hmm how do you tell emacs to use different compile commands for
> different buffers ?

(make-variable-buffer-local 'compile-command)

-- 
Vagn Johansen


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

* Re: Using only one emacs session
       [not found]           ` <mailman.7245.1242439486.31690.help-gnu-emacs@gnu.org>
@ 2009-05-16 12:33             ` Francis Moreau
  2009-05-18 13:14               ` Suttles, Andrew C. (GRC-DSI0)
  0 siblings, 1 reply; 27+ messages in thread
From: Francis Moreau @ 2009-05-16 12:33 UTC (permalink / raw)
  To: help-gnu-emacs

On May 15, 6:50 pm, "Suttles, Andrew C. (GRC-DSI0)"
<andrew.c.sutt...@nasa.gov> wrote:
> I put local variables at the bottom of each project file I write code in.  When I load the source files, the compile command is automatically configured.
>


IMHO, that's not a good solution because if you work on project with
several people, each person can't clutter each file with his editor
configuration. And if you want to change one value of a variable you
need to edit all files of the project.


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

* Re: Using only one emacs session
       [not found] ` <mailman.7216.1242408514.31690.help-gnu-emacs@gnu.org>
@ 2009-05-16 12:55   ` Francis Moreau
  2009-05-16 15:43     ` Pascal J. Bourguignon
  0 siblings, 1 reply; 27+ messages in thread
From: Francis Moreau @ 2009-05-16 12:55 UTC (permalink / raw)
  To: help-gnu-emacs

On May 15, 7:07 pm, William Xu <william....@gmail.com> wrote:
> Francis Moreau <francis.m...@gmail.com> writes:
> > 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.
>
> For that I would open multiple shell or eshell buffers for them.

not really convenient since to conpile, grep etc... you need to switch
to the shell buffer and type (or retrieve in the history) the peculiar
command.

>
> > 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.
>
> How about `C-x r w' or window-configuration-to-register?

yes, that's one possibility I did evaluate. But the main concern is
that I don't know how to get a list of all registers with a
description for each.

With the 'window' package you can get this list and it tells you for
each window which buffer is open.

>
> > The drawbacks of that is the multiple instance of emacs: each instance
> > can't exchange data, emacsclient is more difficult to setup...
>
> Why? The traditional emacsclient is rather easy to setup:
>
>   (server-start)
>
> Then,
>
>   $ emacsclient FILE
>

sure but what if you do (server-start) in each emacs process ?



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

* Re: Using only one emacs session
  2009-05-16 12:55   ` Francis Moreau
@ 2009-05-16 15:43     ` Pascal J. Bourguignon
  2009-05-16 21:53       ` Francis Moreau
  0 siblings, 1 reply; 27+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-16 15:43 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:
> yes, that's one possibility I did evaluate. But the main concern is
> that I don't know how to get a list of all registers with a
> description for each.

Then why don't you ask emacs how to get a list of all registers with a
description for each?

M-x apropos RET list register RET

-- 
__Pascal Bourguignon__


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

* Re: Using only one emacs session
  2009-05-16 15:43     ` Pascal J. Bourguignon
@ 2009-05-16 21:53       ` Francis Moreau
  2009-05-16 23:05         ` Pascal J. Bourguignon
  0 siblings, 1 reply; 27+ messages in thread
From: Francis Moreau @ 2009-05-16 21:53 UTC (permalink / raw)
  To: help-gnu-emacs

On May 16, 5:43 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> Francis Moreau <francis.m...@gmail.com> writes:
> > yes, that's one possibility I did evaluate. But the main concern is
> > that I don't know how to get a list of all registers with a
> > description for each.
>
> Then why don't you ask emacs how to get a list of all registers with a
> description for each?
>

Well the result is quite bad:

   Register a contains a window configuration.
   Register b contains a window configuration.
   Register c contains a window configuration.

which is not very useful IMHO.

Other things (perharps more important) that make window package
superior is that it allows me to use some window navigation 'a la' gnu
screen (go back and forth between the 2 most recent visited windows,
go to the next/previous window, select a window among a list of well
described window etc...).


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

* Re: Using only one emacs session
  2009-05-16 21:53       ` Francis Moreau
@ 2009-05-16 23:05         ` Pascal J. Bourguignon
  2009-05-17  7:01           ` Francis Moreau
  0 siblings, 1 reply; 27+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-16 23:05 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:

> On May 16, 5:43 pm, p...@informatimago.com (Pascal J. Bourguignon)
> wrote:
>> Francis Moreau <francis.m...@gmail.com> writes:
>> > yes, that's one possibility I did evaluate. But the main concern is
>> > that I don't know how to get a list of all registers with a
>> > description for each.
>>
>> Then why don't you ask emacs how to get a list of all registers with a
>> description for each?
>>
>
> Well the result is quite bad:
>
>    Register a contains a window configuration.
>    Register b contains a window configuration.
>    Register c contains a window configuration.
>
> which is not very useful IMHO.

The results are better for other kinds of register contents.

But if you're not happy with this result, why don't you patch it?


The problem here is that window-configuration are opaque objects.

We have about only three functions: 
  (current-window-configuration) to get the current window configuration
  (set-window-configuration wc)  to set the window configuration and
  (compare-window-configuration wc1 wc2) to compare them.
and these functions are implemented in C.  

You have two solutions:

If you want to have accessors  to get details about eg. the windows in
a given window configuration, you would have to patch the C code of
emacs.  Untasty, but it would probably be the best solution.

An alternative would be to put an advice on
window-configuration-to-register.  This advice would collect whatever
information about the current window configuration you may like to
report in the register list, (eg. a list of the displayed buffer
names), and associate it to the window-configuration so it can be
displayed by list-register.



> Other things (perharps more important) that make window package
> superior is that it allows me to use some window navigation 'a la' gnu
> screen (go back and forth between the 2 most recent visited windows,
> go to the next/previous window, select a window among a list of well
> described window etc...).

I don't know what "window package" is, so I cannot comment, but it
seems to me that these features are already present in emacs, or
easily added.

-- 
__Pascal Bourguignon__


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

* Re: Using only one emacs session
  2009-05-16 23:05         ` Pascal J. Bourguignon
@ 2009-05-17  7:01           ` Francis Moreau
  2009-05-17 15:32             ` Pascal J. Bourguignon
  0 siblings, 1 reply; 27+ messages in thread
From: Francis Moreau @ 2009-05-17  7:01 UTC (permalink / raw)
  To: help-gnu-emacs

On May 17, 1:05 am, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
>
> The results are better for other kinds of register contents.
>
> But if you're not happy with this result, why don't you patch it?

Because I don't have skills to do that I'm just a dumb emacs _user_.

>
> The problem here is that window-configuration are opaque objects.

[...]

>
> > Other things (perharps more important) that make window package
> > superior is that it allows me to use some window navigation 'a la' gnu
> > screen (go back and forth between the 2 most recent visited windows,
> > go to the next/previous window, select a window among a list of well
> > described window etc...).
>
> I don't know what "window package" is, so I cannot comment, but it
> seems to me that these features are already present in emacs, or
> easily added.

Please have a look to

http://www.gentei.org/~yuuji/software/

to get details. But basically (taken from Windows.el):

;;;       Windows.el  enables  you  to  have  multiple  favorite
window
;;;     configurations at the same  time, and switch them.
Furthermore,
;;;     it  can  save  all  window  configurations and  some  global
or
;;;     buffer-local variables into a file and restore them correctly.




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

* Re: Using only one emacs session
  2009-05-17  7:01           ` Francis Moreau
@ 2009-05-17 15:32             ` Pascal J. Bourguignon
  0 siblings, 0 replies; 27+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-17 15:32 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Moreau <francis.moro@gmail.com> writes:

> On May 17, 1:05 am, p...@informatimago.com (Pascal J. Bourguignon)
> wrote:
>>
>> The results are better for other kinds of register contents.
>>
>> But if you're not happy with this result, why don't you patch it?
>
> Because I don't have skills to do that I'm just a dumb emacs _user_.

Don't worry, even dumb emacs users may configure it, as Bernie
Greenberg discovered, Richard Stallman reports in:
http://www.gnu.org/gnu/rms-lisp.html

> Please have a look to
> http://www.gentei.org/~yuuji/software/
> to get details. But basically (taken from Windows.el):

Thanks, looks interesting.

-- 
__Pascal Bourguignon__


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

* RE: Using only one emacs session
  2009-05-16 12:33             ` Francis Moreau
@ 2009-05-18 13:14               ` Suttles, Andrew C. (GRC-DSI0)
  0 siblings, 0 replies; 27+ messages in thread
From: Suttles, Andrew C. (GRC-DSI0) @ 2009-05-18 13:14 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Good point.  I was thinking of two small programming projects where I am the chief code maintainer.  However, if the only local variable at the bottom of the source is "compile-command", it seems to be a good solution.  The compile command should be the same for whoever edits the source for projects with simple compile commands.

>-----Original Message-----
>From: help-gnu-emacs-bounces+andrew.c.suttles=nasa.gov@gnu.org
>[mailto:help-gnu-emacs-bounces+andrew.c.suttles=nasa.gov@gnu.org] On
>Behalf Of Francis Moreau
>Sent: Saturday, May 16, 2009 8:33 AM
>To: help-gnu-emacs@gnu.org
>Subject: Re: Using only one emacs session
>
>On May 15, 6:50 pm, "Suttles, Andrew C. (GRC-DSI0)"
><andrew.c.sutt...@nasa.gov> wrote:
>> I put local variables at the bottom of each project file I write code
>in.  When I load the source files, the compile command is automatically
>configured.
>>
>
>
>IMHO, that's not a good solution because if you work on project with
>several people, each person can't clutter each file with his editor
>configuration. And if you want to change one value of a variable you
>need to edit all files of the project.




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

end of thread, other threads:[~2009-05-18 13:14 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-15 11:04 Using only one emacs session Francis Moreau
2009-05-15 11:47 ` Peter Dyballa
2009-05-15 12:48 ` Pascal J. Bourguignon
2009-05-15 13:34   ` Francis Moreau
     [not found] ` <mailman.7199.1242388057.31690.help-gnu-emacs@gnu.org>
2009-05-15 12:50   ` Pascal J. Bourguignon
2009-05-15 12:53   ` Francis Moreau
2009-05-15 13:36     ` Pascal J. Bourguignon
2009-05-15 13:45       ` Francis Moreau
2009-05-15 14:55         ` Peter Dyballa
2009-05-15 16:50           ` Suttles, Andrew C. (GRC-DSI0)
     [not found]           ` <mailman.7245.1242439486.31690.help-gnu-emacs@gnu.org>
2009-05-16 12:33             ` Francis Moreau
2009-05-18 13:14               ` Suttles, Andrew C. (GRC-DSI0)
     [not found]         ` <mailman.7205.1242399319.31690.help-gnu-emacs@gnu.org>
2009-05-15 16:02           ` Francis Moreau
2009-05-15 21:41         ` Pascal J. Bourguignon
2009-05-15 14:13     ` Michael Ekstrand
2009-05-15 14:38     ` Peter Dyballa
2009-05-16 11:14     ` Vagn Johansen
2009-05-15 13:38   ` Lowell Gilbert
2009-05-15 14:00     ` tomas
     [not found]   ` <mailman.7201.1242394726.31690.help-gnu-emacs@gnu.org>
2009-05-15 13:49     ` Francis Moreau
2009-05-15 17:07 ` William Xu
     [not found] ` <mailman.7216.1242408514.31690.help-gnu-emacs@gnu.org>
2009-05-16 12:55   ` Francis Moreau
2009-05-16 15:43     ` Pascal J. Bourguignon
2009-05-16 21:53       ` Francis Moreau
2009-05-16 23:05         ` Pascal J. Bourguignon
2009-05-17  7:01           ` Francis Moreau
2009-05-17 15:32             ` Pascal J. Bourguignon

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.