Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!leah!rpi!rpi.edu!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: comp.emacs Subject: indentation in GNU (was: Two EMACS Questions) Message-ID: <7131@rpi.edu> Date: 7 Sep 89 19:15:15 GMT References: <574@ajpo.sei.cmu.edu> <37636@bu-cs.BU.EDU> <1989Sep7.175620.16036@talos.uucp> Sender: usenet@rpi.edu Reply-To: tale@pawl.rpi.edu Lines: 50 Edward Berard writes: Edward> 1. Is there a way in emacs to create "hanging indents" like Edward> this one? What I would like is to be able to create a Edward> paragraph formatted like this one, and not have to shift Edward> each line, re-format, etc. myself. In <1989Sep7.175620.16036@talos.uucp> kjones@talos.uucp (Kyle Jones) writes: Kyle> Quite a while ago I wrote a package called "filladapt" that handles this Kyle> correctly, and takes care of several other special cases where normal Kyle> filling/word wrap fails. I'll post it to the emacs groups Kyle> today. When I first read the request I expected Martin Neitzel (neitzel@pollux.UUCP) to ship off a copy of gin-mode.el to Edward. Perhaps he has; but now that this one posting has seen about four follow-ups in the thread perhaps it is also a good time to point out this package to the rest of the net. Here is Martin's summary of gin-mode: ;; Gnu Emacs supports filling of paragraphs and wrapping of lines with a ;; settable string to be used for the left margin, the variable ;; ``fill-prefix''. Setting this variable by hand is fine, but can ;; become mildly annoying if it has to be changed often in a document. ;; However, the appropriate value for fill-prefix can be derived from ;; the layout of the current line in almost all cases. ;; ;; This package provides a function and a minor mode that ``guesses'' ;; the indentation to be used for (auto-) filling. It has proven to be ;; very handy in all text-mode variants. It uses a simple but effective ;; heuristic to guess a fill-prefix based on the current line and two ;; (configurable) regular expressions. Within gin-mode, I almost never ;; have to use "C-x." explicitly anymore. ;; ;; The two regexps control ;; ;; * what line beginnings have to be taken as "fill-prefix" (my ;; standard setup recognizes initial white space and typical ;; mail-prefixes like ">" or "name> "). ;; ;; * what line beginnings are really hanging indents. The ;; standard setup recognizes the stars used right here, ;; enumerations, and some more... I set gin-mode on by default in my text-mode-hook and find it very useful. I almost never have to muck with fill-prefix manually anymore. gin-mode is available in the elisp-archive on tut.cis.ohio-state.edu under (I think) pub/gnu/emacs. Dave -- (setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet"))