From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pankaj Jangid Newsgroups: gmane.emacs.help Subject: Re: Garbled up html output Date: Sun, 22 Nov 2020 17:00:18 +0530 Organization: Code Is Great Foundation Message-ID: References: <87k0ue1g4y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2806"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: Help Gnu Emacs , "Carl X. Su" To: Partha Pratim Ghosh Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 22 12:31:08 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kgnaG-0000e1-LB for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 22 Nov 2020 12:31:08 +0100 Original-Received: from localhost ([::1]:45900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgnaF-0004n1-Mm for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 22 Nov 2020 06:31:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgnZa-0004lz-KC for help-gnu-emacs@gnu.org; Sun, 22 Nov 2020 06:30:26 -0500 Original-Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]:34398) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kgnZY-00081l-N8 for help-gnu-emacs@gnu.org; Sun, 22 Nov 2020 06:30:26 -0500 Original-Received: by mail-pf1-x435.google.com with SMTP id w6so12238346pfu.1 for ; Sun, 22 Nov 2020 03:30:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:organization:references:mail-followup-to:date :in-reply-to:message-id:user-agent:mime-version; bh=8qpEcuveaONpEEajmisM8QqaSFALXlTRGtyziEfqVWc=; b=O0xM1ppkUbRLKI1zsNdbPZwznzF0lnbxh6Fhxy/BAGiy+7V2yD7ia1Z1FhC+xz356/ 5SGxjCiO2nFToqK2qfVCt2Udm5KOeUMLX7uVkSXPPtNjGyIBCMdUGJnwBqSx+1c6qo6v gN3yN3ZDeqWJ9XagyfnGyVE4Ag+UT3+6TBsYNRk36P5u1Zj7ZiQIPI6P1De7vjjlmUNx 9Lgn/52vsdXLrrScWIpNPRwsQwySJfAJT4NPJTwJDlRHfINJgE3YFFoXqdeV3Tql1afQ 2SKPqbv9j+Iy2Fhj91OEQhgXEedYeunynwbV3NCG1v0Id903zj27re/tm7S3SGH/GFJv cHug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:references :mail-followup-to:date:in-reply-to:message-id:user-agent :mime-version; bh=8qpEcuveaONpEEajmisM8QqaSFALXlTRGtyziEfqVWc=; b=D1Biw8MtUMSuBT0qFmaoBEAx9jck+8oCz0fKM/t9dJZSF7HGmqIp71qnHAOo30seQa 5D+vovWP04SaesdmxIs0giSYo3lST1cg7s2dRFH9gXFcIzloC+Hsu2cZVJ2ArapqHbNO bpxqItRChiTXwBkYsSq+BF7Db5m0sLAIgEQ7xTA0xy2uDq0tpFsNTpnMu7raCbe7Vyxe 1XFjeVoXSyVoZzvWjfSbOmRCK+PV9rJXpLNHNwFGm1VxOd3/rLWR8RxrPe0wV6u1JwG5 OujLOMjr+PJXayMz+6Kd8hSvZ2TbOkT+0wjL9UqN9alrM72dcmWmZTggfrjLufgFfR+R ClrQ== X-Gm-Message-State: AOAM530Y9neiYPUbEPtaSuhtq9PVZXZTtyTe7a/LpLLzfMh7/31ygiuV S0lkP3A9QCO9abV2xH7epgbUsw== X-Google-Smtp-Source: ABdhPJzymUrLiFXIeiwrMbP+zUY+1umAi97EzOdtNDM/ln/YHu0T4beAacZWoziemmC+pS7nhT/BCQ== X-Received: by 2002:a05:6a00:8ca:b029:196:6dcb:14a4 with SMTP id s10-20020a056a0008cab02901966dcb14a4mr21595536pfu.12.1606044622757; Sun, 22 Nov 2020 03:30:22 -0800 (PST) Original-Received: from mb2.local ([49.36.146.175]) by smtp.gmail.com with ESMTPSA id u14sm9251199pfc.87.2020.11.22.03.30.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Nov 2020 03:30:22 -0800 (PST) Mail-Followup-To: Partha Pratim Ghosh , Help Gnu Emacs , Carl X. Su In-Reply-To: <87k0ue1g4y.fsf@gmail.com> (Partha Pratim Ghosh's message of "Sun, 22 Nov 2020 00:47:41 +0200") Received-SPF: none client-ip=2607:f8b0:4864:20::435; envelope-from=pankaj.jangid@codeisgreat.com; helo=mail-pf1-x435.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125467 Archived-At: 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 "http://wttr.in/" query) (lambda (status) (switch-to-buffer (current-buffer)))) (decode-coding-string (buffer-string) 'utf-8)))) #+end_src