emacs-devel
[Top][All Lists]
Advanced

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

RE: How about a non-nil and non-t value of show-trailing-whitespa ce?


From: Marshall, Simon
Subject: RE: How about a non-nil and non-t value of show-trailing-whitespa ce?
Date: Mon, 30 Jul 2001 14:30:40 +0100

> > I was looking for some way to turn on 
> show-trailing-whitespace only for
> > files that are checked out of VC.
> [...]
> > So, I suggest that redisplay is changed so that if
> > show-trailing-whitespace is non-nil and non-t, Emacs should 
> highlight
> > trailing whitespace only if buffer-read-only is t.
> 
> That feature doesn't make too much sense to me.  Suppose I want to
> check whether a file has trailing white space, and if so, I want to
> check the file out and remove the white space.  It doesn't seem
> plausible to me to link this to buffer-read-only in any way.

I think it's worth explaining where I was coming from.

I originally turned on show-trailing-whitespace cos it seemed like a
neat and useful feature.  I fairly quickly got fed up with it because it
began to be intrusive and stopped being useful.  I don't want the
feature so that I can trawl 100s of files written by dozens of
programmers and remove trailing whitespace.  I don't have the time to do
it and, let's face it, it's not that important either.  I want the
feature so that, if I happen to be editing a file, I can remove
whitespace where I happen to see it.  I only want to see the whitespace
if I am in a position to do something about it.  I don't want to see it
just for the sake of it.  YMMV, but there it is.

That was my original motivation for looking for a means to do it in VC.

However, having thought about it, I realised I was really trying to
create a workaround (doing show-trailing-whitespace only for VC files)
for the undesirable effects of the underlying feature
(show-trailing-whitespace itself).  The current semantics (never show
trailing whitespace and always show trailing whitespace) are too blunt.
What is the point of showing trailing whitespace in someone else's file?
Or in a buffer generated by Emacs?  What does the user gain by seeing it
highlighted?

Maybe a more general solution is better, also since novice users are not
going to be adding their own show-trailing-whitespace toggling functions
to 3 different hooks (find-file-hooks, vc-checkin-hook and
vc-checkout-hook).  (Instead, they will just disable the feature---a
pity.)

So, although a vc-checkout-hook would be useful for consistency, I
suggest a change to show-trailing-whitespace.

Another approach I considered was adding a vc-show-trailing-whitespace,
so users could just turn it on for VC without writing functions for
hooks...

Simon.



reply via email to

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