[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Garbled up html output

From: Partha Pratim Ghosh
Subject: Re: Garbled up html output
Date: Sun, 22 Nov 2020 23:07:22 +0200
User-agent: mu4e 1.2.0; emacs 26.3

Dear Pankaj,

Please accept my thanks for replying to the query.

I tried to run your script from .emacs file.

After this I tried _M-x wttrin_ and it returned the error: wrong
argument type listp: "en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4"

Please can you suugest further changes and/help...

With my regards and all the very best wishes,

Pankaj Jangid <> writes:

> Partha Pratim Ghosh <> writes:
>> I used _curl wttr.in_ on a terminal; it produced a nice formatted
>> message.
>> However _M-x wttrin_ inside emacs produces a buffer with html text; the
>> table appears way down, but the output is not formatted.
> The package is not updated. Following two fragments need update. I have
> also created a pull request on github and cc'ing the maintainer here.
> #+begin_src emacs-lisp
> (defcustom wttrin-default-accept-language 
> "en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4"
>   "Specify default HTTP request Header for Accept-Language."
>   :group 'wttrin
>   :type '(list)
>   )
> (defun wttrin-fetch-raw-string (query)
>   "Get the weather information based on your QUERY."
>   (let ((url-user-agent "curl")
>       (url-mime-language-string wttrin-default-accept-language))
>     (with-current-buffer
>         (url-retrieve-synchronously
>          (concat ""; query)
>          (lambda (status) (switch-to-buffer (current-buffer))))
>       (decode-coding-string (buffer-string) 'utf-8))))
> #+end_src

reply via email to

[Prev in Thread] Current Thread [Next in Thread]