On Apr 13, 2015, at 2:29 AM, Jon Zeppieri <zeppi...@gmail.com> wrote:

> Robby,
> 
> This is my first crack at a DrRacket tool (not to mention an uncommon
> foray into Racket's class system), so what I'm doing may not be...
> sane. But if you're willing to take a look:
> [https://github.com/97jaz/drwhitespace]. At any rate, it isn't a lot
> of code. I based the general structure on Asumu Takikawa's
> drracket-vim-tool.
> 
> It's supposed to have the same effect as emacs's `delete-trailing-whitespace`.
> I still need to add a preference setting to turn it on or off. (Maybe
> that should be based on the editor's mode?)

I’d really like to use this tool.

Here’s one problem that I see: there’s a hidden invariant in DrRacket (and all 
editors) that when a buffer is unchanged, saving it won’t change the file on 
disk. Actually, I think you can state this in a bunch of different ways. I 
forsee hard-to-understand errors arising from a silent change-on-save (unless 
I’m misreading your code?). Personally, I think I’d be more likely to use a 
tool that requests permission to scrub trailing whitespace when saving a file.  
I also think that this should probably be limited to racket and scribble files, 
and I’m guessing that the easiest way to distinguish these would be to use the 
filename extension.

Please don’t let me stop you from doing this, though, this is something I’ve 
wanted for quite a while!

Many thanks,

John
 
> 
> -Jon
> 
> 
> On Sun, Apr 12, 2015 at 6:14 PM, Robby Findler
> <ro...@eecs.northwestern.edu> wrote:
>> No but Max changed the way return works so there should be less whitespace
>> added going forward.
>> 
>> Writing a script to trim whitespace from line-endings would work well if it
>> were to use text% IMO. Use load-file to get a file and then the paragraph
>> methods to find line endings and then delete stuff and ace the file again.
>> 
>> Robby
>> 
>> On Sunday, April 12, 2015, Jon Zeppieri <zeppi...@gmail.com> wrote:
>>> 
>>> Does such a think already exist?
>>> 
>>> -Jon
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Racket Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to racket-users+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to