diff options
| -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) |
