emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/ws-butler e6c6454c16 05/64: readme update


From: Stefan Kangas
Subject: [nongnu] elpa/ws-butler e6c6454c16 05/64: readme update
Date: Fri, 31 Dec 2021 11:09:28 -0500 (EST)

branch: elpa/ws-butler
commit e6c6454c16365c8d25575e2fd2b1ad4647ae95f0
Author: Le Wang <le.wang@agworld.com.au>
Commit: Le Wang <le.wang@agworld.com.au>

    readme update
---
 README.md | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 42a050b313..9f551f1505 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,28 @@
-ws-butler
-=========
+## ws-butler -- an unobtrusive way to trim spaces from end of line
 
-Trim spaces of lines you touch, but don't be the white space police.
+Only lines touched get trimmed.  
 
+Trimming only happens when saving.
+
+## history
+
+1. I started by to trim all spaces at EOL in source code in a
+   "write-file-hook", when I started programming.  It seemed like a great idea.
+   
+2. Then I got a job working on a code base where no one else trimmed spaces,
+   so my commits became super noisy.  I wanted to stop being the "white space"
+   police, so switched to [ws-trim][].
+    * ws-trim works in a `post-command-hook` and trims white space while you
+      edit.
+    * This was too eager for me, for example I would stop scroll away to look
+      at some code and when I get back to continue, my indentation is gone.  
+    * It caused some problems with other customizations which also rely on
+      `post-command-hook`.
+      
+3. I started experimenting with using `highlight-changes-mode` to trim only
+   lines I touch on save.  
+   
+   
+## This is the result
+
+[ws-trim]: ftp://ftp.lysator.liu.se/pub/emacs/ws-trim.el



reply via email to

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