Subject: bug#15821: a better M-SPC

From: Stefan Monnier <[email-masked]>
Date: Sat, 16 Nov 2013 16:42:24 -0500

> I hope this is the right place for the following suggestion.

It is.

> My version of M-SPC is an improvement over the original Emacs one in
> two respects: it operates both horizontally and vertically, and it
> takes a numeric argument.  See the docstring for details.

I don't myself use M-SPC much and have never used its numeric argument,
so I'd like to hear what other users have to say about your suggestion.

Reading your docstring, I see the following changes:
1- On a non-empty blank line, leave exactly ARG spaces on it (without
   ARG, make it empty).

2- On an empty line, delete all blank lines above and below it, leaving
   ARG empty lines.

3- At the beginning or end of a non-blank line, delete all leading
   resp. trailing whitespace, leaving ARG (by default, zero) spaces.

4- Don't treat a negative ARG as meaning to also delete newlines.

Point 4 sounds like an oversight (you don't yourself use that "negative
ARG" feature, so you didn't bother to implement it), right?

For points 1 to 3, the main issue I see with them is that some people
apparently tend to like M-SPC so much that they hit M-SPC when they just
want to insert a SPC (Richard mentioned doing that, recently), so
changing M-SPC so that it sometimes finishes with no space at point can
be an annoyance.

        Stefan