unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* half of emacs lisp files tested positive for trailing whitespace
@ 2003-12-23 20:43 Dan Jacobson
  2003-12-24  6:01 ` Eli Zaretskii
       [not found] ` <mailman.562.1072249331.868.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Jacobson @ 2003-12-23 20:43 UTC (permalink / raw)


Gentlemen, wearing my show-trailing-whitespace xray-specs all day long
has made me acutely aware of the waste current these days.  Indeed,
emacs authors should be required to wear them too, as half of the
files on this quick sample returned positive results when tested for
trailing whitespace:

$ find /usr/share/emacs/21.3/lisp/ -name \*.el|LC_ALL=C xargs grep -L ' $'|wc -l
373
$ find /usr/share/emacs/21.3/lisp/ -name \*.el|LC_ALL=C xargs grep -l ' $'|wc -l
386
$ find /usr/share/emacs/21.3/lisp/ -name \*.el|wc -l
759

By the way, I had to use LC_ALL=C due to
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=206470
#206470: LC_CTYPE=C speeds 'grep a' 800 times!
which is the GNU bug of the century in terms of impact on my daily life.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: half of emacs lisp files tested positive for trailing whitespace
  2003-12-23 20:43 half of emacs lisp files tested positive for trailing whitespace Dan Jacobson
@ 2003-12-24  6:01 ` Eli Zaretskii
  2003-12-25 21:05   ` Reiner Steib
       [not found] ` <mailman.562.1072249331.868.bug-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2003-12-24  6:01 UTC (permalink / raw)
  Cc: bug-gnu-emacs

> From: Dan Jacobson <jidanni@jidanni.org>
> Date: Wed, 24 Dec 2003 04:43:03 +0800
> 
> Gentlemen, wearing my show-trailing-whitespace xray-specs all day long
> has made me acutely aware of the waste current these days.  Indeed,
> emacs authors should be required to wear them too, as half of the
> files on this quick sample returned positive results when tested for
> trailing whitespace:

How about sending patches to remove all that slack?

TIA

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: half of emacs lisp files tested positive for trailing whitespace
       [not found] ` <mailman.562.1072249331.868.bug-gnu-emacs@gnu.org>
@ 2003-12-24 14:25   ` Alexander Pohoyda
  2003-12-24 14:47     ` Sam Steingold
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Pohoyda @ 2003-12-24 14:25 UTC (permalink / raw)


Eli Zaretskii <eliz@elta.co.il> writes:

> > Gentlemen, wearing my show-trailing-whitespace xray-specs all day long
> > has made me acutely aware of the waste current these days.  Indeed,
> > emacs authors should be required to wear them too, as half of the
> > files on this quick sample returned positive results when tested for
> > trailing whitespace:
> 
> How about sending patches to remove all that slack?

This might be not extra performant, but works:

find ./ -name "*.el" -exec emacs -batch {} --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;

I think that Dan is right and developers should take care about this
before they commit changes.


-- 
Alexander Pohoyda <alexander.pohoyda@gmx.net>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72  15 54 5F 62 20 23 C6 44

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: half of emacs lisp files tested positive for trailing whitespace
  2003-12-24 14:25   ` Alexander Pohoyda
@ 2003-12-24 14:47     ` Sam Steingold
  0 siblings, 0 replies; 5+ messages in thread
From: Sam Steingold @ 2003-12-24 14:47 UTC (permalink / raw)


> * Alexander Pohoyda <nyrknaqre.cbublqn@tzk.arg> [2003-12-24 15:25:35 +0100]:
>
> Eli Zaretskii <eliz@elta.co.il> writes:
>
>> > Gentlemen, wearing my show-trailing-whitespace xray-specs all day long
>> > has made me acutely aware of the waste current these days.  Indeed,
>> > emacs authors should be required to wear them too, as half of the
>> > files on this quick sample returned positive results when tested for
>> > trailing whitespace:
>> 
>> How about sending patches to remove all that slack?
>
> I think that Dan is right and developers should take care about this
> before they commit changes.

(add-hook 'write-file-functions 'delete-trailing-whitespace)

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
As a computer, I find your faith in technology amusing.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: half of emacs lisp files tested positive for trailing whitespace
  2003-12-24  6:01 ` Eli Zaretskii
@ 2003-12-25 21:05   ` Reiner Steib
  0 siblings, 0 replies; 5+ messages in thread
From: Reiner Steib @ 2003-12-25 21:05 UTC (permalink / raw)


On Wed, Dec 24 2003, Eli Zaretskii wrote:

[ trailing whitespace in Emacs 21.3 files ] 

> How about sending patches to remove all that slack?

Is it worth to consider this for Emacs 21.3?  IIRC such a clean-up has
already happened for CVS HEAD some months ago.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-12-25 21:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-23 20:43 half of emacs lisp files tested positive for trailing whitespace Dan Jacobson
2003-12-24  6:01 ` Eli Zaretskii
2003-12-25 21:05   ` Reiner Steib
     [not found] ` <mailman.562.1072249331.868.bug-gnu-emacs@gnu.org>
2003-12-24 14:25   ` Alexander Pohoyda
2003-12-24 14:47     ` Sam Steingold

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).