Date: Mon, 18 Aug 1997 16:00:03 +0300 (IDT) From: Eli Zaretskii To: "M. Schulter" cc: djgpp AT delorie DOT com Subject: Re: Emacs diskspace usage In-Reply-To: <5svveb$c0d$1@vnetnews.value.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 14 Aug 1997, M. Schulter wrote: > In any case, I would consider extensibility a virtue, not a flaw. If a > user chooses to take advantage of optional packages, so much the better > for Emacs and the user. It's a matter of choice, and Emacs gives lots of > options indeed to DOS users. I would like to say up front that this message is not part of an Editors War. I will NOT compare Emacs with other editors here, because I think it's pointless. Instead, I want to tell you why did *I* switch to Emacs (yes, I *did* use other editors before). I hope this will add some useful information to this thread. (I also apologize for a possibly longish message.) What convinced me to begin using Emacs as my main editor was not the major features, like multiple files, syntax highlighting, mouse and compilation from within the editor. Any serious editor has all these in some form or another. (Heck, even latest versions of DOS EDIT can handle multiple files and support the mouse!) What made me switch was not these major features, but the minor ones, all those little niceties that make your everyday work easier (see below for some examples). Now, it takes quite a while to get used to your editor and set it up correctly. Therefore, since these are MINOR features, you can easily hang to your favorite editor even if it lacks a few of them. But Emacs has GOBS of them, and most are not just gimmicks, they are *extremely* useful for everyday's work. A few examples: 1) Emacs automatically completes things for me. If you used Bash, you know what I mean. When I'm prompted for a name of a file, I can type a few letters, then press TAB and Emacs would complete the name. If I press `?', it will display the matching file names in a popup window and let me click on the name I want. This completion works not only for files, it works for commands, colors, fonts--everything that Emacs knows about. I can issue a command, and Emacs will complete words as I type. Let's say I need to type a monstrosity like "__dpmi_get_processor_exception_handler_vector". With Emacs, once I typed this once, I can next time type "__dpmi_get_proc", press Alt-/, and Emacs will complete it. Emacs will search all the buffers for possible completions, so if I have the libc reference loaded into the Emacs built-in Info reader, I don't even have to type it for the first time (since this is the name of one of the library functions, and Emacs will find it in the reference). But wait, it gets better. Some Emacs commands have really long names, like `ps-print-buffer-with-faces' (which will pretty-print the source on a PS printer with syntax highlighting turned into bold, italic and underlined fonts). These are a pain to type all over again. So another Emacs command will enable even smarter completion: I can type "ps-p-b-w-", press TAB, and Emacs will complete the rest. I can also type filenames like and have Emacs look along the GCC include path to find header files. 2) To a programmer, Emacs has an enormous number of features that are hard to find elsewhere. Suppose you are working on a project that has dozens of source files, and you need to see the definition of a macro or a function, or the declaration of a typedef. Put your cursor on the name, and with a single keystroke Emacs will display file with that definition and place the cursor at the right place; no need for you to remember where is that function defined. Most editors will show you the matching parenthesis by moving the cursor to it. But Emacs will also paint matching parens with a standout color, and if there is no matching paren, it will use a different color, so you know something's wrong. Got a complex program and want to see its overall structure? Emacs has a command that will hide lines indented beyond a certain column: you can see the topmost level, then the next one, etc. Need to edit a source with so many #ifdef's that you are unsure which lines are seen by the compiler? Emacs will run cpp on a portion of the buffer that you mark, and present the results. Since it is the same cpp that will be run by the compiler, you have no doubts about the validity of this macro expansion. 3) Of course, all of the advanced features you'd expect are there, too. You can display a directory and copy/move/rename/delete files in it (forget about Norton Commander); you can read compressed archives (zip, tar.gz, lzh, zoo), edit, compress and decompress files from there; you can save the desktop configuration in a file and have Emacs restore the desktop when you invoke it in the same directory later; etc. Emacs usually has small, but significant improvements to these standard features. For example, it can run `grep' as a subprocess, show its output in a buffer and let me jump to any matching line with a click of a mouse. Sure, every serious editor has a multi-file search command, but Emacs actually runs an external program and lets me set its command-line options. I don't have to leave the editor to get full power of the GNU tools. When Emacs runs `diff' to compare two files, it will show the diffs in a buffer and let me jump to any of the places where the files differ. As another example, the directory-editing (ala NC) mode lets you mark several files, then invoke a search-and-replace command on them, or do an operation on files whose names match an arbitrary complex regular expression. 4) There are special modes for every possible programming language you could imagine, and then some. There's support for Ada, C, C++, Awk, Fortran, Modula, Lisp, Pascal, Prolog, Perl, Scheme, Simula, Shell scripts and DOS batch files, SGML/HTML, TeX, Texinfo and Matlab. Each one of these supports language-specific auto-indentation and syntax highlighting. Emacs will automatically invoke the correct mode based on the file name's extension. Need to edit a file as two columns of text, or use ASCII art to draw a picture? Emacs has modes for these, too. 5) There are commands to do almost anything (except love and coffee). For instance, you can display a calendar of every known calendar system on Earth, including Mayan and French Revolution ones. (Sure, many people won't need that, but you will certainly appreciate this feature if you need to visit Israel or Egypt and want to know when is the next public holyday there.) I read all my mail with one of the 3 possible modes for reading mail; and you can read Usenet newsgroups with an Emacs package called GNUS. Does the above sound like a lot? Then you should know that I have barely scratched the surface. With any other editor, whenever you need to do something non-trivial, your first question is "How do I do that?" With Emacs, the question is "Which Emacs command already does that for me?" (there are special commands to locate Emacs commands, so don't worry ;-). Emacs features are contributed and tested by many talented people all around the globe, so IMHO, no other editor can ever beat Emacs in the amout of features it offers. I know: I tried. For years I was adding missing features I needed to the editor I used before Emacs; for example, when I started using ports of GNU utilities, I actually wrote a full-fledged Info reader for that editor. But eventually, I had to give up. After all, an editor is just a tool, and you have to do some real work sometimes instead of constantly working on the editor. Emacs just has all the answers right there, waiting for you. And I haven't even started talking about the extensibility. (Btw, the next version will have a new customization command that will let you customize gazillions of features by editing a form, and will then save the customizations to your `_emacs' init file--no more need to know Lisp to customize your editor!) > Orlando Andico (orly AT gibson DOT eee DOT upd DOT edu DOT ph) wrote: > > : I mean, most DOS people do NOT use AucTeX, GNUS, VHDL, HTML, FORTRAN, > : or most everything else. Just plain C-mode. First, you'd be surprised how sophisticated can the ``plain C-mode'' get. Second, most people read newsgroups (that's what GNUS is for) and edit HTML files, and many need to edit VHDL or Fortran sources. And even if you don't, it's nice to know that you won't need to switch to another editor when one day you have to use these languages.