From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel McClanahan Newsgroups: gmane.emacs.devel Subject: Re: Connection specific settings and proxies Date: Thu, 2 Feb 2017 17:58:34 -0600 Message-ID: References: <86wqjnwa9u.fsf@somewhere.org> <871u1s38m3.fsf@flea.lifelogs.com> <877f5j2i67.fsf@gnus.org> <87a8a8paru.fsf@lifelogs.com> <87r33jnvn1.fsf@lifelogs.com> <87h94fqjq7.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1486079982 15316 195.159.176.226 (2 Feb 2017 23:59:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Feb 2017 23:59:42 +0000 (UTC) Cc: 16026@debbugs.gnu.org, Ted Zlatanov , Michael Albinus , Stefan Monnier , Emacs developers To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 03 00:59:38 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZRHu-0003ma-0c for ged-emacs-devel@m.gmane.org; Fri, 03 Feb 2017 00:59:38 +0100 Original-Received: from localhost ([::1]:59504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZRHz-0000EP-EE for ged-emacs-devel@m.gmane.org; Thu, 02 Feb 2017 18:59:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZRHJ-00009t-G7 for emacs-devel@gnu.org; Thu, 02 Feb 2017 18:59:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZRHD-00025m-Tr for emacs-devel@gnu.org; Thu, 02 Feb 2017 18:59:01 -0500 Original-Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:34719) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZRHD-00025W-OG for emacs-devel@gnu.org; Thu, 02 Feb 2017 18:58:55 -0500 Original-Received: by mail-oi0-x235.google.com with SMTP id s203so2307987oie.1 for ; Thu, 02 Feb 2017 15:58:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=v6etIGUIIxDKTstuLS2m0OxswM0rwLtIQ5HBc4oabeU=; b=db0LH+9EyClCPjqqiS56MUNw8rh+iTbH17ZB5WJGUHdro/zqpxr+y7DNeRHhqR8Flm 0sy29GzB7DOhYzYYo+L/a4gLnPxgPP6gqGw0/J5IegpViKSDa6VOTH+47J4Z/gTRskcH Eli+eR4qXl4fbrRtdGK0Z6gG/agQimLjqQXLMdmZCG9+uc/E+c+k8VP9+AefLN/+R6AT Fbksucxm+ABCBK8eFJ/QW45I+QMaGaCV/807Fthn25cz+VFBPUxdQxUV4FFZO/FHyHpJ oMbRhSNnvKUedD4+TflCZRurHrt7aB6uA5DNc84UAX8skl2i1T8bymjzebICt9HiuXGj lKEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=v6etIGUIIxDKTstuLS2m0OxswM0rwLtIQ5HBc4oabeU=; b=c5ydtIkWELT0dU4HG11mT4/p3ZyEuYNkfSdJPLMcw19VQ6w3J6U1u/5otWvxhmb2zN 5qGgyC33rlmmpf4YiiLG4EQSHNGGunofKttjhFq+QXhSI6VaLUZKfeuAA7pwRX+d4K+p RGbNad85ZCxbuXEx487MMMIDE6/4TOyO21uUB9ErLYwbmdm337aUacTptWh7weHMvHpc SzKGMmVt1B/tKtT0TQFC/Rjt9NqIzPZd4IJHyls2l5GOx6wjAg3o/k2bU1ypkfnwOUIS KYT4dE9+VmchbFWxkmMy0D0N3blGjRdd1BTA4MNVU5QQHYXgvCqo5+9y9YGTlRgGnxAp 6lzQ== X-Gm-Message-State: AIkVDXK4MwULC9mxgb8i7zanHu+Hx6ZUBwVThcxox5xkYhuOKpCikaBUU3p2douUq+N/Iy6d4OtWJ4UhJsSwZw== X-Received: by 10.202.80.77 with SMTP id e74mr5954483oib.156.1486079934733; Thu, 02 Feb 2017 15:58:54 -0800 (PST) Original-Received: by 10.157.23.239 with HTTP; Thu, 2 Feb 2017 15:58:34 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:211901 Archived-At: On Wed, Feb 1, 2017 at 9:43 PM, Lars Ingebrigtsen wrote: > And, like I said, I don't know whether it's the right design choice to have > these settings be global, or whether they should be passed in explicitly from > each application. Would users want to use one set of proxies while reading > HTML news from Gnus and another when reading from eww? Perhaps? Perhaps not? I'm no expert, but I've often been frustrated by configuration options that aren't exposed as defcustoms. I think a defcustom of an alist mapping the match domain to a list/plist of proxy settings would work. If `open-network-stream' only accepts proxy settings as an argument and Gnus/eww/etc wants to allow user-specified proxies, it seems each would have to implement its own defcustom (or some other method) to handle that anyway; configuring these for each package seems annoying. Callers can use a let binding if they want to override it, which is about as easy as an argument. A single global value would make it difficult to have different settings for different callers. One potential solution is to have an optional "tag" symbol as part of the proxy settings, which would only use the proxy if the caller specified the same tag, maybe as a buffer-local variable. So Gnus could set the tag to 'gnus or something in its mode, and a user could add a proxy entry with the 'gnus tag. This might be confusing, though. I don't use proxies too extensively, but something like that would have removed the need for some hacky defadvice I used to configure my ssh connections on a corporate network last summer. Just a thought.