From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: Two separate emacs running ?? Date: Fri, 17 Aug 2007 18:07:37 +0200 Organization: Informatimago Message-ID: <87r6m2ywja.fsf@thalassa.informatimago.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1187368898 29067 80.91.229.12 (17 Aug 2007 16:41:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2007 16:41:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 17 18:41:36 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IM4tC-0006ox-OV for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Aug 2007 18:41:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IM4tC-0002eY-OQ for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Aug 2007 12:41:34 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 74 Original-X-Trace: individual.net 7NfCwiYTj/BzAUtSIfDbCwWRzakH/ILcTSikIrkrKaR64OT8Q5 Cancel-Lock: sha1:YTk5OWI0MDAxODAzZjk0NTg1NmUxNTg4MjI4MzZmYmMxODVmZjlhZQ== sha1:7EwuTjn0oPd4XHV5jkt/OL30Qjg= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1.50 (gnu/linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:151068 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46642 Archived-At: William Case 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.