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: Mon, 23 Nov 2020 08:14:16 +0530 Organization: Code Is Great Foundation Message-ID: References: <87k0ue1g4y.fsf@gmail.com> <87sg915cdx.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="33819"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: Help Gnu Emacs To: Partha Pratim Ghosh Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 23 03:45:17 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 1kh1qu-0008fO-Qq for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 03:45:16 +0100 Original-Received: from localhost ([::1]:46630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kh1qt-0001rT-TI for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 22 Nov 2020 21:45:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kh1q4-0001qv-6r for help-gnu-emacs@gnu.org; Sun, 22 Nov 2020 21:44:24 -0500 Original-Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:43200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kh1q1-0001KF-Hz for help-gnu-emacs@gnu.org; Sun, 22 Nov 2020 21:44:23 -0500 Original-Received: by mail-pg1-x52a.google.com with SMTP id 34so12869931pgp.10 for ; Sun, 22 Nov 2020 18:44:21 -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=wmhG+YHApAmanAMYZ/EfXmc9K8otgGXbSnADhkbsQMk=; b=kRgCfBNRyQsh5dvwQr4z/hjqTNKnQSm84XAwWCf7ZG9sB4/fKTlrdxQ5VYOWQIv8Gr CemGHoggUxfWIOnSBpCI+FQZ8x5+sNb/E1+vgEIuXZUE4zxyHz9Ju+IFI5MDydmLCTxv XMjbf8pO05ywUN+Lypnpq6QJjaNtr1CwPqNgXxnqbf/420cZBCnk6W/2igTD6DcgYxHX 4LNMIuiIakOA5ZordYXtAR+bLsOltmOV1APyfdap/9pFt+ioTjTiyaWFDoENldBrtkQ3 DrKsXS8paF9E1MmSq1p+da1tVMDjU+tDuktWHQQSmnPJ1+ihhq3qT/4/D/UaoBwszwR4 Xv7A== 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=wmhG+YHApAmanAMYZ/EfXmc9K8otgGXbSnADhkbsQMk=; b=XBYBwbJYq1sJlTXcbqxRqLQnnV621ScWucqKmABN/iSkmc3OWO7w9SBdmdrnIy6Irx HQow1InOx3ZUDnEqSapsKo6+L+02uqHBSSHN1zjavbBULi4ZxmCWzSKpIYkaox2Zgz3k iJUNA2NSZrXHjgsb0qpy8gQg2UUKIrzOzr3xEp4aGNaudMPccv1wlVreRm9AHN2eJZcX peatyX7T4qCpbHKNzQIda0W9FxLOCc5rgmMErKN0efI0waynB7ljppIKLGilxi4Emp9/ lPsV5A0cF3gVD8NmMFCXmBsm9uMc/HMIYEodqXSBfBV2mYloY/hc+gWv+9BK8oUBvijC 1mPg== X-Gm-Message-State: AOAM533Z4AF2Bczahx3aamno8U0gMwM8ljcVohFIR4hwobgEAI9utSTo bcweWJE8hMQ7IMEZwukHHyvyp9cXY+hL1w== X-Google-Smtp-Source: ABdhPJzmGYInJfmrEnQgxmaaZq48QriEJGpby8iRaayKkZeVrGJkO8EGr699cDd3pb+QGcxPwVvx/A== X-Received: by 2002:a63:658:: with SMTP id 85mr23961190pgg.315.1606099459910; Sun, 22 Nov 2020 18:44:19 -0800 (PST) Original-Received: from mb2.local ([2405:201:5c06:7812:89df:c7c7:ebfb:8da4]) by smtp.gmail.com with ESMTPSA id c19sm10213127pfp.1.2020.11.22.18.44.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Nov 2020 18:44:19 -0800 (PST) Mail-Followup-To: Partha Pratim Ghosh , Help Gnu Emacs In-Reply-To: <87sg915cdx.fsf@gmail.com> (Partha Pratim Ghosh's message of "Sun, 22 Nov 2020 23:07:22 +0200") Received-SPF: none client-ip=2607:f8b0:4864:20::52a; envelope-from=pankaj.jangid@codeisgreat.com; helo=mail-pg1-x52a.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:125499 Archived-At: Partha Pratim Ghosh writes: > 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" My changes were not for .emacs file. You will have to replace functions in the package. Somewhere in your **/elpa/wttrin.el. And remove the compiled version (.elc). This is just a workaround till you get update from MELPA. > Please can you suugest further changes and/help... The below var and func are already defined in wttrin.el. You just have to replace them with the code below. >> #+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