aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-net.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-net.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-net.el13
1 files changed, 2 insertions, 11 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-net.el b/emacs/.emacs.d/lisp/my/my-net.el
index 0eafb7a..1f1cbc6 100644
--- a/emacs/.emacs.d/lisp/my/my-net.el
+++ b/emacs/.emacs.d/lisp/my/my-net.el
@@ -80,18 +80,9 @@ It checks the STATUS, and if it is ok, saves the payload to FILE-NAME."
(when (plist-get status :error)
(error "My fetch failed: %s" (plist-get status :error)))
(my-delete-http-header)
- (let ((to-insert (buffer-string))
- (buffer (find-file-noselect file-name))
- (coding-system-for-write 'utf-8))
+ (let ((to-insert (buffer-string)))
(kill-buffer)
- (with-current-buffer buffer
- (let ((inhibit-read-only t))
- (erase-buffer)
- (insert to-insert))
- (goto-char (point-min))
- (save-buffer)
- (revert-buffer t t))
- (switch-to-buffer buffer))
+ (my-save-text-and-switch-to-buffer to-insert file-name))
)
(defun my-kill-http-header ()