diff options
| author | Carl X. Su <bcbcarl@gmail.com> | 2016-03-06 01:16:39 +0800 |
|---|---|---|
| committer | Carl X. Su <bcbcarl@gmail.com> | 2016-03-06 01:16:39 +0800 |
| commit | 6d555045977fc362a7f0da68fa9ff5d81625b10f (patch) | |
| tree | b4cb7995ee82ad8398c582188d5ae3806a4278a2 | |
| parent | 99ba22f0333e9ff72cf1803af49225a99273bca1 (diff) | |
| parent | ba9c2c89ae0daf52001e61c21cbeb20be00ecf00 (diff) | |
Merge pull request #1 from kuanyui/master
Remove HTTP header
| -rw-r--r-- | wttrin.el | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) @@ -40,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) |
