Date: Thu, 25 Nov 1999 17:27:12 -0500 From: Greg Lehey <grog@mojave.sitaranetworks.com> To: Mark Ovens <mark@dogma.freebsd-uk.eu.org> Cc: Brooks Davis <brooks@one-eyed-alien.net>, James A Wilde <james.wilde@telia.com>, freebsd-questions@freebsd.org Subject: Re: Programmers' editor? Message-ID: <19991125172712.03192@mojave.sitaranetworks.com> In-Reply-To: <19991125221140.D1342@marder-1>; from Mark Ovens on Thu, Nov 25, 1999 at 10:11:41PM %2B0000 References: <Pine.BSF.4.21.9911231240360.4557-100000@fw.wintelcom.net> <00e101bf3681$44cb04a0$8c0aa8c0@hk.tbv.se> <19991124103253.B2554@orion.ac.hmc.edu> <19991124135521.44585@mojave.sitaranetworks.com> <19991125192634.B316@marder-1> <19991125153045.40243@mojave.sitaranetworks.com> <19991125221140.D1342@marder-1>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, 25 November 1999 at 22:11:41 +0000, Mark Ovens wrote: > On Thu, Nov 25, 1999 at 03:30:45PM -0500, Greg Lehey wrote: >>> Indenting is a big mystery. OK, when in C-mode it will >>> auto-indent, but for non-code text it doesn't seem to work. >>> This e-mail is done in emacs and indenting this paragraph and >>> the one above I found impossible to do other than manually. >>> >>> The first line of each was started with a TAB but no way could I make >>> emacs indent the subsequent lines to match (``:se ai'' will do it >>> automatically in vi, and if you later edit it and mess it up then >>> ``!}fmt'' will clean it up). I tried selecting the paragraph and then >>> Edit->Fill, but all it did was split it into lines ~75 chars but only >>> the first line was indented! (the ``goto-line'' paragraph above). >> >> Emacs has a different approach to this issue. Each buffer has a mode >> assigned to it. When you edit C text, you automatically get the >> c-mode loaded. With text, by default, you get fundamental, which >> doesn't know much about indenting. The first thing you can do is load >> letter-mode, which will do what you want to do. It also modifies the >> way m-q (fill paragraph) works. > > I take it that by this you mean ``M-x mh-letter-mode''? No, that's something to do with mh mode, I'd guess. Oops, I see the problem. Put this in your .emacs: (defun letter-mode () ;this gets called by F8 (interactive) (indented-text-mode) (flyspell-mode nil) (auto-fill-mode nil) ) What you really wanted was auto-fill-mode. If you want flyspell mode, you'll also need to install ispell (Ports Collection). > I tried it, but just get: > > Cannot find the commands 'inc' and 'mhl' They're probably executables for mh. > There is "Auto Fill (word wrap) in Text modes" on the Help->Options > menu, but that doesn't seem to do anything. It certainly isn't > formatting this paragraph as I type it. No, it doesn't seem to do anything, does it? If you do m-x auto-fill-mode, it will work correctly, but letter-mode might be even better. >> No, but O'Reilly does a book. >> > > Is that a personal recommendation? Hmm. I don't have it at hand, so I can't check, but ISTR it wasn't too bad. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991125172712.03192>