summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-01-10 18:52:50 -0500
committerKyle Meyer <kyle@kyleam.com>2014-01-10 18:52:50 -0500
commit2c6c5a4fc9066a8ce994164b15495548912075e7 (patch)
tree9c56a5de71b24496f929a7bf948fa96aee4f231b /init
parent0874c1048f9fb5fb56b542860c92778fe5230364 (diff)
downloademacs.d-2c6c5a4fc9066a8ce994164b15495548912075e7.tar.gz
Insert github patch in buffer not temp file
Diffstat (limited to 'init')
-rw-r--r--init/km-gnus.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/init/km-gnus.el b/init/km-gnus.el
index b88f6d5..dd794a7 100644
--- a/init/km-gnus.el
+++ b/init/km-gnus.el
@@ -112,9 +112,10 @@ another window."
(km/gnus-end-of-article-buffer)
(search-backward "patch")
(let ((url (thing-at-point 'url))
- (patch-file (make-temp-file "gnus-github-" nil ".patch")))
- (url-copy-file url patch-file t)
- (find-file-other-window patch-file)
+ (patch-buffer (get-buffer-create "*gnus-github-patch*")))
+ (switch-to-buffer-other-window patch-buffer)
+ (url-insert-file-contents url)
+ (diff-mode)
(view-mode 1)))
(defun km/gnus-end-of-article-buffer ()