rejeep / f.el

Modern API for working with files and directories in Emacs
GNU General Public License v3.0
680 stars 68 forks source link

Simplify f-write-bytes and f-append-bytes #85

Closed phst closed 5 years ago

phst commented 6 years ago

Instead of a temporary buffer, just call write-region with the string itself. write-region always uses coding-system-for-write if set, so we don’t have to set the other coding-related variables. However, we should bind the annotation functions so that they don’t mess with the output.

Use write-region for appending text as well. This simplifies the code and eliminates a race condition. While there, make the operation silent.

phst commented 5 years ago

Friendly ping?