From owner-freebsd-doc Thu Jan 13 3:15:41 2000 Delivered-To: freebsd-doc@freebsd.org Received: from nothing-going-on.demon.co.uk (nothing-going-on.demon.co.uk [193.237.89.66]) by hub.freebsd.org (Postfix) with ESMTP id 819AC152C3; Thu, 13 Jan 2000 03:15:33 -0800 (PST) (envelope-from nik@nothing-going-on.demon.co.uk) Received: from kilt.nothing-going-on.org (kilt.nothing-going-on.org [192.168.1.18]) by nothing-going-on.demon.co.uk (8.9.3/8.9.3) with ESMTP id BAA60767; Thu, 13 Jan 2000 01:32:52 GMT (envelope-from nik@catkin.nothing-going-on.org) Received: (from nik@localhost) by kilt.nothing-going-on.org (8.9.3/8.9.3) id AAA14677; Thu, 13 Jan 2000 00:57:36 GMT (envelope-from nik@catkin.nothing-going-on.org) Date: Thu, 13 Jan 2000 00:57:36 +0000 From: Nik Clayton To: Jeroen Ruigrok/Asmodai Cc: Nik Clayton , doc@freebsd.org Subject: Re: Patches I have up my sleeve Message-ID: <20000113005736.F8876@kilt.nothing-going-on.org> References: <19991218195612.A26001@daemon.ninth-circle.org> <19991219212411.B4452@catkin.nothing-going-on.org> <19991220070201.C35359@daemon.ninth-circle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <19991220070201.C35359@daemon.ninth-circle.org>; from Jeroen Ruigrok/Asmodai on Mon, Dec 20, 1999 at 07:02:01AM +0100 Organization: FreeBSD Project Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org [ cc'd to cvs@freebsd.org for some advice ] On Mon, Dec 20, 1999 at 07:02:01AM +0100, Jeroen Ruigrok/Asmodai wrote: > >> One, which impacts a lot of files per subdir (faq, handbook, etc) will > >> remove all excessive whitespaces which were introduced by the sgmlmode > >> of emacs. I consider this a bug in the editor and should be properly > >> cleaned up. > > > >What sort of excessive whitespace? > > Just take a random file from the handbook and you will see a lot of of > four spaces on line between tags. These lines should be empty instead > of carrying four spaces. I am really thinking emacs sgml mode messed > up. I know exactly how this has happened, having done it myself tonight. Go to a section of a .sgml file, something like this; ... A random title ... Now, suppose you start thinking about adding a new section between the end of the first and the beginning of the next . So you move the cursor to be in between them, and hit TAB. Emacs moves the cursor in four spaces for you, to the correct indentation level for this. Now, change your mind, and decide that this section isn't needed, or is in the wrong location. Move the cursor off the line. The four spaces remain. It's not really an editor bug, as there's no way Emacs could guess your intentions in this case. From what I can recall, CVS has a mechanism to automatically process documents before they are committed. If we could have the following run over every .sgml file just before it's committed, I think we could solve the problem; perl -pe 's/^\s+$/\n/' (reads from STDIN, writes to STDOUT). All this does is convert any line that contains only plain text to just a single new line. If this is done every time anything is committed to the tree we take the repository bloat hit once, and then never have to worry about it again. I can't think of any circumstances where this would cause problems with the actual content -- only lines that consist only of white space characters are going to be affected, and, by their nature, changes to them aren't going to affect the content -- even in things like lines that consist only of whitespace aren't important, as long as the notion of a 'blank' line is retained. We wouldn't even need to update all the files at once. A file will be fixed automatically the first time it is committed to after we make this change. CVSMeisters -- how feasible would something like this be for implementation on freefall? N -- If you want to imagine the future, imagine a tennis shoe stamping on a penguin's face forever. --- with apologies to George Orwell To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message