dakra / speed-type

Practice touch/speed typing in emacs
GNU General Public License v3.0
137 stars 19 forks source link

Use with-temp-buffer and with-temp-file #10

Closed dieggsy closed 6 years ago

dieggsy commented 6 years ago

This eliminates the need for opening actual buffers (and leaving them around, which can be tedious to close after many speed-type sessions).

parkouss commented 6 years ago

Thanks for the work, I will give it a try soon and come with feedback. In the meantime, I wonder what was the problem you had and wanted to fix? (maybe by trying your patch I will understand)

dieggsy commented 6 years ago

@parkouss The problem was that the previous implementation kept a bunch of [number].txt buffers open, which was both unnecessary and annoying to close.

parkouss commented 6 years ago

Sorry I am not sure how to use the changes requested feature of github. :)

dieggsy commented 6 years ago

Good catch, make-directory should definitely be before url-copy-file - that was probably a typo :). Also, turns out dr isn't needed at all since it was always exactly the same as speed-type-gb-dir, and I replaced a concat with expand-file-name, since that feels safer.

parkouss commented 6 years ago

Even better! Looks all good to me now, thanks for the patches!