From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add support for custom user agent strings in url.el Date: Sun, 19 Jan 2014 11:12:13 +0200 Message-ID: References: <87k3dw5r44.fsf@cthulhu-p5kpl.lan> <87iotg5pw5.fsf@cthulhu-p5kpl.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bd6afccbb69fb04f04f2b22 X-Trace: ger.gmane.org 1390122733 14920 80.91.229.3 (19 Jan 2014 09:12:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Jan 2014 09:12:13 +0000 (UTC) Cc: emacs-devel To: Vibhav Pant Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 19 10:12:20 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W4oQU-0005T4-JI for ged-emacs-devel@m.gmane.org; Sun, 19 Jan 2014 10:12:18 +0100 Original-Received: from localhost ([::1]:45567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4oQT-0006I2-UX for ged-emacs-devel@m.gmane.org; Sun, 19 Jan 2014 04:12:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4oQR-0006Hw-Ai for emacs-devel@gnu.org; Sun, 19 Jan 2014 04:12:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4oQQ-0008T8-C9 for emacs-devel@gnu.org; Sun, 19 Jan 2014 04:12:15 -0500 Original-Received: from mail-oa0-x231.google.com ([2607:f8b0:4003:c02::231]:50554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4oQQ-0008T4-6H for emacs-devel@gnu.org; Sun, 19 Jan 2014 04:12:14 -0500 Original-Received: by mail-oa0-f49.google.com with SMTP id i7so4073622oag.8 for ; Sun, 19 Jan 2014 01:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=XNXYo491uV3SY6FACtj1rQTd8FZUjGfPWUX9OXphGSM=; b=t55ZAByKJBM8neBdNmQb2Gs8V2yTVxP55zsHcoxUjsHl9yxloAQA9SCRNfu4i3QupE 1GM7W+5cFIm3fChPh9UHHJnWA+iRokmODqJ1R72XFqy/n8BNoFWFL3eX/+NvkVWSKfxA YACFOo5O9n+GIm8mtHd/H1q2aKEYam/Gl7DyVkSGTmwTWTWGUDaq+LQxhlKofYwkAeR+ vwFE6zJDBQTE+GdK7BL80K+kGDnNjCJwudDjA8iUrRjqDKtdnw00C5vWrEjhZns0RGXZ yctiy2txG5mzvQIiNDv654Kc1nZdgm21bt7DBbdkaRX97p3fvRtsVh5kM+UIXLWV61pp acgQ== X-Received: by 10.60.157.130 with SMTP id wm2mr10150771oeb.31.1390122733624; Sun, 19 Jan 2014 01:12:13 -0800 (PST) Original-Received: by 10.76.79.102 with HTTP; Sun, 19 Jan 2014 01:12:13 -0800 (PST) In-Reply-To: <87iotg5pw5.fsf@cthulhu-p5kpl.lan> X-Google-Sender-Auth: NmYoUHydaTM6y3pxXpzJkUclasE X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c02::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:168727 Archived-At: --047d7bd6afccbb69fb04f04f2b22 Content-Type: text/plain; charset=UTF-8 The default of the defcustom can also be the result of a function call (like `format', etc). Basically everything that returns a string will do. On 19 January 2014 10:36, Vibhav Pant wrote: > > Bozhidar Batsov writes: > > > Seems to me that there should be just a defcustom `url-user-agent' and it > > should be used always. By default it should have whatever value it > > currently has and users will be able to customise it. > The function url-http-user-agent-string generates a user agent by > concatinating url-package-name and url-package-version. So the defcustom > would have to be a function or a sexp, making things a little confusing > for new users. > > -- > Vibhav Pant > vibhavp@gmail.com > --047d7bd6afccbb69fb04f04f2b22 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The default of the defcustom can also be the result of a f= unction call (like `format', etc). Basically everything that returns a = string will do.=C2=A0


On 19 January 2014 10:36, Vibhav Pant <vibhavp@gmail.com> wr= ote:

Bozhidar Batsov writes:

> Seems to me that there should be just a defcustom `url-user-agent'= and it
> should be used always. By default it should have whatever value it
> currently has and users will be able to customise it.
The function url-http-user-agent-string generates a user agent by
concatinating url-package-name and url-package-version. So the defcustom would have to be a function or a sexp, making things a little confusing
for new users.

--
Vibhav Pant
vibhavp@gmail.com

--047d7bd6afccbb69fb04f04f2b22--