emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: shouldn't `delete-blank-lines' treat form-feed as whitespace?


From: Drew Adams
Subject: RE: shouldn't `delete-blank-lines' treat form-feed as whitespace?
Date: Wed, 3 Mar 2010 22:21:12 -0800

> > While it's logically formally a whitespace class character, 
> > I'm quite unconvinced it would "feel right" to me. 
> > formfeed is usually put in much more rarely and with more
> > forethought than space/tab/newline.
> 
> Yes I agree -- the formfeed character, when it is used, is 
> for document structuring; it's not "whitespace" in the normal
> sense. It's sort of like the next-level above newline in a hierarchy.
> 
> This suggests that perhaps there should be a command
> `delete-blank-pages', which would delete pages containing only blank
> lines (including the terminating formfeed).
> 
> [Drew, wouldn't the latter command address your use?]

Dunno. I hadn't really thought that much about this all 'round. I was just
thinking that in some sense (contexts) \f-only lines are blank.

Obviously, for any given bit of code (context), one can easily delete the
whitespace or non-whitespace one wants - no special need for a ready-made
function to do that. So no, I don't think we need a `delete-blank-pages'
function.

And we probably don't need to have `delete-blank-lines' always treat \f (or
always \n or \t..., for that matter) as whitespace. I guess I was thinking
either (a) `delete-blank-lines' should generally delete \f-only lines also or
(b) we might add an optional arg to `delete-blank-lines', to tell it what we
mean by "blank" at the point of call.

I agree now that (a) is not a great idea. (b) is probably not very useful
either. Chalk this up to (piddling) thinking out loud.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]