From c187b60141fb730f88983c5225c2774a89208b59 Mon Sep 17 00:00:00 2001 From: kuanyui Date: Sun, 6 Mar 2016 01:10:01 +0800 Subject: Fix require --- wttrin.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wttrin.el b/wttrin.el index b2a3d97..c42c874 100644 --- a/wttrin.el +++ b/wttrin.el @@ -12,6 +12,8 @@ ;; Provides the weather information from wttr.in based on your query condition. ;;; Code: +(require 'url) +(require 'xterm-color) (defgroup wttrin nil "Emacs frontend for weather web service wttr.in." @@ -32,7 +34,7 @@ (lambda (status) (switch-to-buffer (current-buffer)))) (decode-coding-string (buffer-string) 'utf-8)))) -(require 'xterm-color) + (defun wttrin-exec () "Display weather information." (interactive) -- cgit v1.2.3 From ba9c2c89ae0daf52001e61c21cbeb20be00ecf00 Mon Sep 17 00:00:00 2001 From: kuanyui Date: Sun, 6 Mar 2016 01:12:58 +0800 Subject: Remove HTTP header --- wttrin.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wttrin.el b/wttrin.el index c42c874..199ade6 100644 --- a/wttrin.el +++ b/wttrin.el @@ -42,6 +42,9 @@ (buf (get-buffer-create name))) (switch-to-buffer buf)) (insert (xterm-color-filter (wttrin-fetch wttrin-query))) + (goto-char (point-min)) + (re-search-forward "^$") + (delete-region (point-min) (1+ (point))) (setq buffer-read-only t)) (provide 'wttrin) -- cgit v1.2.3