* Two separate emacs running ?? @ 2007-08-17 15:18 William Case 2007-08-17 15:36 ` Peter Dyballa ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: William Case @ 2007-08-17 15:18 UTC (permalink / raw) To: EMACS List 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? 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. -- Regards Bill ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Two separate emacs running ?? 2007-08-17 15:18 Two separate emacs running ?? William Case @ 2007-08-17 15:36 ` Peter Dyballa 2007-08-17 16:40 ` William Case [not found] ` <mailman.4910.1187365029.32220.help-gnu-emacs@gnu.org> 2007-08-17 18:39 ` Eli Zaretskii 2 siblings, 1 reply; 8+ messages in thread From: Peter Dyballa @ 2007-08-17 15:36 UTC (permalink / raw) To: William Case; +Cc: EMACS List Am 17.08.2007 um 17:18 schrieb William Case: > I thought of constructing a /.emacs2 file Think of a second login account with its own ~/.emacs or user init file. Think of putting the fontify code into the system init file and launch the second GNU Emacs without loading the system init file. Consider putting the fontify code into a separate Elisp file and and load this file only into one GNU Emacs. You could also launch GNU Emacs and make it evaluate some Elisp code from the command line. Depending on this your init file can provide the fontify code or not. -- Greetings Pete The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" (I found it!) but "That's funny..." Isaac Asimov ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Two separate emacs running ?? 2007-08-17 15:36 ` Peter Dyballa @ 2007-08-17 16:40 ` William Case 0 siblings, 0 replies; 8+ messages in thread From: William Case @ 2007-08-17 16:40 UTC (permalink / raw) To: Peter Dyballa; +Cc: EMACS List Thanks Peter; On Fri, 2007-08-17 at 17:36 +0200, Peter Dyballa wrote: > Am 17.08.2007 um 17:18 schrieb William Case: > > > I thought of constructing a /.emacs2 file > > Think of a second login account with its own ~/.emacs or user init file. > > Think of putting the fontify code into the system init file and > launch the second GNU Emacs without loading the system init file. > > Consider putting the fontify code into a separate Elisp file and and > load this file only into one GNU Emacs. > > You could also launch GNU Emacs and make it evaluate some Elisp code > from the command line. Depending on this your init file can provide > the fontify code or not. > You did get me thinking. I should be able to solve this by creating a new major mode, notes-mode, derived from text-mode. http://www.emacswiki.org/cgi-bin/wiki/CreateNewMajorMode I can open my working emacs in frame #1 and, then as I need it, open frame #2 in my new notes-mode restricted to *.nts files (or some such). Do you see anything wrong with this as a solution? -- Regards Bill ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.4910.1187365029.32220.help-gnu-emacs@gnu.org>]
* Re: Two separate emacs running ?? [not found] ` <mailman.4910.1187365029.32220.help-gnu-emacs@gnu.org> @ 2007-08-17 16:09 ` Pascal Bourguignon 0 siblings, 0 replies; 8+ messages in thread From: Pascal Bourguignon @ 2007-08-17 16:09 UTC (permalink / raw) To: help-gnu-emacs Peter Dyballa <Peter_Dyballa@Web.DE> writes: > Am 17.08.2007 um 17:18 schrieb William Case: > >> I thought of constructing a /.emacs2 file > > Think of a second login account with its own ~/.emacs or user init file. No, emacs is enough customizable that we don't need to go thru that drastic a solution. > Think of putting the fontify code into the system init file and > launch the second GNU Emacs without loading the system init file. No need to meddle with system stuff, this can be done at the user level. > Consider putting the fontify code into a separate Elisp file and and > load this file only into one GNU Emacs. Yes, this can be done. > You could also launch GNU Emacs and make it evaluate some Elisp code > from the command line. Depending on this your init file can provide > the fontify code or not. That's what I'd do. -- __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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Two separate emacs running ?? 2007-08-17 15:18 Two separate emacs running ?? William Case 2007-08-17 15:36 ` Peter Dyballa [not found] ` <mailman.4910.1187365029.32220.help-gnu-emacs@gnu.org> @ 2007-08-17 18:39 ` Eli Zaretskii 2 siblings, 0 replies; 8+ messages in thread From: Eli Zaretskii @ 2007-08-17 18:39 UTC (permalink / raw) To: help-gnu-emacs > From: William Case <billlinux@rogers.com> > Date: Fri, 17 Aug 2007 11:18:46 -0400 > > 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. How about using a notes.c file for C notes, notes.el file for Lisp notes, etc.? You can maintain plain text in there as comments, while code fragments will look and feel just like they do in the respective source files. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.4909.1187363917.32220.help-gnu-emacs@gnu.org>]
* Re: Two separate emacs running ?? [not found] <mailman.4909.1187363917.32220.help-gnu-emacs@gnu.org> @ 2007-08-17 16:07 ` Pascal Bourguignon 2007-08-17 16:54 ` William Case 2007-08-17 19:33 ` Floyd L. Davidson 1 sibling, 1 reply; 8+ messages in thread From: Pascal Bourguignon @ 2007-08-17 16:07 UTC (permalink / raw) To: help-gnu-emacs 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. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Two separate emacs running ?? 2007-08-17 16:07 ` Pascal Bourguignon @ 2007-08-17 16:54 ` William Case 0 siblings, 0 replies; 8+ messages in thread From: William Case @ 2007-08-17 16:54 UTC (permalink / raw) To: Pascal Bourguignon; +Cc: help-gnu-emacs Thanks Pascal; Your suggestions and my last post passed in the night. On Fri, 2007-08-17 at 18:07 +0200, Pascal Bourguignon wrote: > William Case <billlinux@rogers.com> writes: > > 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? > I started there. > > > 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" Your suggestions are within the bounds of what I already know (or think I know, anyways) so I'll try that. Creating a new major mode might be a reach for me. -- Regards Bill ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Two separate emacs running ?? [not found] <mailman.4909.1187363917.32220.help-gnu-emacs@gnu.org> 2007-08-17 16:07 ` Pascal Bourguignon @ 2007-08-17 19:33 ` Floyd L. Davidson 1 sibling, 0 replies; 8+ messages in thread From: Floyd L. Davidson @ 2007-08-17 19:33 UTC (permalink / raw) To: help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-08-17 19:33 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-08-17 15:18 Two separate emacs running ?? William Case 2007-08-17 15:36 ` Peter Dyballa 2007-08-17 16:40 ` William Case [not found] ` <mailman.4910.1187365029.32220.help-gnu-emacs@gnu.org> 2007-08-17 16:09 ` Pascal Bourguignon 2007-08-17 18:39 ` Eli Zaretskii [not found] <mailman.4909.1187363917.32220.help-gnu-emacs@gnu.org> 2007-08-17 16:07 ` Pascal Bourguignon 2007-08-17 16:54 ` William Case 2007-08-17 19:33 ` Floyd L. Davidson
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.