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

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

Re: Two separate emacs running ??


From: Floyd L. Davidson
Subject: Re: Two separate emacs running ??
Date: Fri, 17 Aug 2007 11:33:08 -0800
User-agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.19

William Case <billlinux@rogers.com> wrote:
>Hi;
>
>I am trying to figure out the best way to solve the following problem:
>
>I have a text file, c-notes.txt, which I open in a separate frame.  I
>use it to make lots of notes to myself as a go about learning the 'C'
>language.  I would probably like to start an elisp-notes.txt, etc. for
>other languages.
>
>I would like to open these text files with a completely different set of
>fonts, background colours, faces and minor modes from my usual emacs.  I
>would also like to restrict those frames or instances of emacs to a few
>text files.
>
>Has anybody else done the same?

I keep three different XEmacs instance running all the
time.  In this particular way there isn't any difference
between XEmacs and Emacs, as far as I know, so the reasons
and methods are perhaps of interest to you.

First, my needs are tuned to running Linux with 15
virtual desktops arranged in a vertical 15x1 array, and
using two monitors.  Most of what I actual work on goes
on the left screen, most of what is static and available
in all desktops is kept on the right screen, and is
tagged as "sticky" for the window manager so that it is
available in all 15 desktops.  (In essense, C-UpArrow or
C-DnArrow moves to a different desktop, which will
totally change everything visible on the left monitor
while nothing changes on the right monitor.)

For general editing I use an XEmacs server.  It is
without a visible frame and never goes away.  I use an
alias to invoke an editor (gnuclient, which I believe
would be emacsclient for Emacs), so that it is a two
letter command, "em", to start up an edit frame.  (I
also have a second alias that will use the current
frame, using the -nw option, but I rarely ever do that.)

The advantages of using an edit server are many!  Each
time it comes up, it has access to "history"...  such as
it will remember the last search pattern, the last kill
buffer, and so on.  If a previous invocation is still
running, the files are there too (actually one can exit
a frame and still have the files retained).  Hence I can
go to a different virtual desktop, or even invoke it a
second time in the same desktop, and have all of the
currently available buffers in the new frame.

But, the reason there are three invocations of XEmacs
always running is that sometimes that isn't what one
wants.  One invocation that uses so many buffers that it
would just clog up the edit server is the one I read
Usenet News with, using GNUS (for example, it has 17
buffers open right now).  I also have some significantly
different functions and, in particularl, different key
bindings when reading News.  So that one is distinctly
different.  The other is similar to what you've asked
about, a "Notes" file editor.  That frame sits over on
the right monitor, and no matter which virtual desktop
I'm in, it stays there.  (It takes up most of the
screen, but can be moved out of the way if I need the
space now and then.)

So there is an "edit server", a "News" and a "Notes"
invocation of XEmacs running all of the time.  These are
each configured at least somewhat different.  They are
all invoked with a common standard configuration file,
but the alias used to start them up adds another
configuration file for each.  Hence the server's alias
has "-l .semacs", the News alias has "-l .gemacs", and
the notes is just XEmacs with nothing special (but if it
did it would have "-l .nemacs").

Note that I use a rather extensive standard config file,
which compiled has a size of 40K, while the separate
config files for different invocations are all
relatively small, at just less than 3K, uncompiled.
That is probably typical for anyone who tends to
customize their own configuration and keeps doing it for
a couple decades.

>Could you point me to an existing solution?
>(Yes, I looked.  I couldn't find anything even close, but that could
>have been a search criteria problem.)
>Or, could you suggest a better way to go about solving this problem?
>
>I thought of constructing a /.emacs2 file and having a completely new or
>separate instance of emacs for these files.  How would I do that so that
>emacs2 could find /.emacs2 and not /.emacs on start up, if it is even
>possible?
>
>Any "getting started" strategies or pointers would be welcome.

-- 
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)              floyd@apaflo.com


reply via email to

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