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: Pascal Bourguignon
Subject: Re: Two separate emacs running ??
Date: Fri, 17 Aug 2007 18:07:37 +0200
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1.50 (gnu/linux)

William Case <billlinux@rogers.com> writes:

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

Yes.  Aquamacs uses frames for special purposes intensively, you could
take example on the code there.


> Could you point me to an existing solution? 

I would add a find-file-hook and test for these specific files, and in
the hook set the frame as I want.   For merely one file, I wouldn't
use another emacs instances (though there's one parameter that cannot
be made different in different frames: the frame border use the same
face on all frames).  Only for a process, since emacs isn't threaded,
a long operation in a process can freeze emacs for some time, so I may
use a different emacs for erc and gnus.  If you use a different emacs,
you need to use the window manager to focus on one emacs or another,
while with a single emacs, you can focus to another frame with C-x 5
o.  But of course, if you use ratpoison, it can be workable, since
then you can just type C-t o.


> [...]
> 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?

Probably.  Have you tried man emacs or emacs --help?



What I do, when I want to launch special purpose emacsen, is:

alias special-purpose='emacs --eval "(my-special-purpose-function)"'

and I set the defaults specially in my-special-purpose-function,
loaded from my normal '~/.emacs'.

I prefer to keep one .emacs (even across different systems!), and test
inside it for the special circumstances, using these variables and
others:

;; system-type          darwin   gnu/linux  cygwin
;; system-name          "naiad.informatimago.com" "host.example.com"
;; system-configuration "i686-pc-linux-gnu" "i686-pc-cygwin"
;; window-system        nil x mac w32
;; emacs-major-version  18 19 20 21
;; emacs-minor-version  0 1 2 3
;; emacs-version        "20.7.2" "21.2.1"


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.


reply via email to

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