all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Miles Bader'" <miles@gnu.org>,
	"'David De La Harpe Golden'" <david@harpegolden.net>
Cc: emacs-devel@gnu.org
Subject: RE: shouldn't `delete-blank-lines' treat form-feed as whitespace?
Date: Wed, 3 Mar 2010 22:21:12 -0800	[thread overview]
Message-ID: <B3895CCCF8684F8EBD1261AE29A93BB4@us.oracle.com> (raw)
In-Reply-To: <87635cq2yy.fsf@catnip.gol.com>

> > 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	other threads:[~2010-03-04  6:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-28 20:44 shouldn't `delete-blank-lines' treat form-feed as whitespace? Drew Adams
2010-03-03 19:32 ` Juri Linkov
2010-03-03 19:54   ` Drew Adams
2010-03-04  4:28     ` Stefan Monnier
2010-03-05  8:48       ` Eli Zaretskii
2010-03-06 17:57         ` Juri Linkov
2010-03-06 18:56           ` Eli Zaretskii
2010-03-03 21:35 ` David De La Harpe Golden
2010-03-03 22:21   ` Drew Adams
2010-03-04  1:40   ` Miles Bader
2010-03-04  6:21     ` Drew Adams [this message]
     [not found] <E1No0yT-0007vs-HZ@mail.fsf.org>
2010-03-06 22:34 ` Jonathan Yavner
2010-03-07  4:14   ` Eli Zaretskii
2010-03-07  4:34     ` Jonathan Yavner
2010-03-07 17:42       ` Eli Zaretskii
2010-03-07 18:11       ` Stephen J. Turnbull
2010-03-07  5:08     ` Stephen J. Turnbull

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B3895CCCF8684F8EBD1261AE29A93BB4@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=david@harpegolden.net \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.