emacs-devel
[Top][All Lists]
Advanced

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

Re: 23.0.60; whitespace.el mishap


From: Vinicius Jose Latorre
Subject: Re: 23.0.60; whitespace.el mishap
Date: Sat, 16 Feb 2008 17:47:32 -0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080201 SeaMonkey/1.1.8


Well, indeed the old whitespace-buffer had reported
where the bogus whitespace had happened.

Instead of reporting, the new whitespace-mode
displays visually the bogus whitespace.

Is it ok if the new whitespace-buffer is removed?

Maybe a better alternative should be to create a
whitespace-report command which reports like the old
whitespace-buffer.

One point in favor of using a report function is that a
report gives you all the bogus whitespace line instead of
you having to run the whole buffer to see if there are
some bogus whitespace.


My personal opinion is that the old whitespace mode was pretty wacky,
and had lots of unneeded features and features which didn't follow Emacs
conventions. It doesn't seem necessary to me to _exactly_ preserve the
interface (maybe some def-obsolete-alias could be used in some case),
just keep those commands which were actually useful, and maybe try to
make them follow emacs conventions better.

Could you elaborate better this point,
whose functionalities should be kept
(via def-obsolete-alias) or not?


E.g., how about:

+ `suspicious-whitespace-mode' -- highlights only "suspicious"
whitespace, i.e., that which probably should be removed. This is
sort of like the old "whitespace-buffer" command, but implemented as
a proper mode, or like your "whitespace-mode", but only highlights
suspicious whitespace. [dunno about the term "suspicious", but you
know what I mean]

+ `cleanup-whitespace' -- removes suspicious whitespace [same
definition as suspicious-whitespace-mode]

Well, the new whitespace.el uses a symbol list
(whitespace-chars variable) to select which kind
of whitespaces are visualized.

Some symbols (empty, indentation, trailing,
space-before-tab, space-after-tab) represents
the "suspicious" (or bogus) whitespaces.

Here are the "suspicious" whitespaces:

empty -- empty lines at beginning/end of buffer.

indentation -- 8 or more SPACEs at beginning of line.

trailing -- SPACEs or TABs at end of line.

space-before-tab -- SPACEs before TAB.

space-after-tab -- 8 or more SPACEs after TAB.

The whitespace-cleanup function already removes
the "suspicious" whitespaces.

Maybe the symbols above (the "suspicious" one)
should be renamed to, for example:

   suspicious-empty, suspicious-indentation,...

Or:

   bogus-empty, bogus-indentation,...

Or whatever other suitable name.





reply via email to

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