Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!ima!think!!rlk From: rlk@.UUCP Newsgroups: comp.emacs Subject: Re: Making a partial version of GNU Emacs Message-ID: <5270@think.UUCP> Date: Thu, 11-Jun-87 10:32:30 EDT Article-I.D.: think.5270 Posted: Thu Jun 11 10:32:30 1987 Date-Received: Sat, 13-Jun-87 09:25:33 EDT Sender: news@think.UUCP Reply-To: rlk@THINK.COM Organization: Thinking Machines Corporation, Cambridge, MA Lines: 69 In article <3910010@nucsrl.UUCP> gore@nucsrl.UUCP (Jacob Gore) writes: ]I cannot use the mail and news modes because we don't use sendmail and news; ]and even if we did, I wouldn't want to use those modes because I don't live in ]emacs (not yet, anyway :-). I think there's a program called fakemail in the etc directory that simulates sendmail, but I may be wrong. I would strongly suggest that you consider one of the emacs interfaces to mail if you're using emacs heavily, though, since the startup overhead is so great. ]So, I'm thinking of making a partial version, which would be smaller at the ]expense of all modes and libraries that don't deal with writing electronic ]messages. Has anybody tried something like this? Any caveats I should be ]aware of? You can take things out of the distribution, which reduces the size of the tree, and you can take some of the libraries out (see below), but you can't do too much to reduce the size of the editor proper. You may be able to speed things up somewhat by cleaning up startup.el; there may be things in there that you don't need or want, such as some of the more esoteric command line switches. ]What can I leave out of GNU Emacs but still have it work? Can emacs-lisp-mode ]be omitted? Can the *scratch* buffer be left out? Do autoloads in loadup.el ]take any space? Are they worth worrying about? The autoloads do indeed take up a fair amount of space, typically about 120K in the standard system. If you don't do any programming, you can delete things like C mode, Lisp mode, etc (you can remove Lisp mode if you fix up startup.el not to put *scratch* in lisp interaction mode). Some of them (like simple, subr, and a fair number of others) will cause emacs to break if you remove them. You can also remove some of the autoloads, but again be careful. Leave everything in that refers to commands that you frequently use. Then you may have to edit config.h to change PURE_LISP_SIZE or something like that (it starts with PURE) to actually decrease the size of the dumped emacs. You'll have to experiment, which means a number of compile cycles, which may be more work than you care to do, especially since you won't reduce the size of emacs by all that much and in any event the initial Lisp code takes a while to run. Do you have the sticky bit turned on? If you're the only person who really uses GNU Emacs on your machine, then depending upon the particular system you're running, you may get considerably better startup performance by turning it on. I'd strongly consider using the server (in another part of your message you claim not to like it) since it is a small program with very little startup overhead. It takes a while to get used to on a non-window based system, but even with having to suspend your mail or news program and putting the editor in the foreground (of course, this assumes you have job control, but since you sound like you're not running BSD, you may not), it's still a lot faster than waiting for emacs to start up. Emacs is really just too big a program to start up instances of it every time you need to edit something -- the documentation suggests a style of use in which you start up an emacs at the beginning of your session and keep it around until you leave. Finally, check your .emacs file: how long is it, and can you compile it? I came up with a trick to compile all the setq's and top level conditionals in my .emacs file: I wrap a defun around them (e. g. (defun init-rlk () ...) and compile the file. I then edit the .elc file and remove the enclosing defun, putting the (byte-code ...) form at the top level. This results in noticeable speedup. Of course, by removing things you don't need, you can do even better. Robert^Z