From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel McClanahan Newsgroups: gmane.emacs.bugs Subject: bug#16026: 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 1486080018 19704 195.159.176.226 (3 Feb 2017 00:00:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 3 Feb 2017 00:00:18 +0000 (UTC) Cc: Michael Albinus , Ted Zlatanov , 16026@debbugs.gnu.org, Stefan Monnier , Emacs developers To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 03 01:00:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1cZRIT-0004yC-JQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Feb 2017 01:00:13 +0100 Original-Received: from localhost ([::1]:59513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZRIZ-0000no-4u for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Feb 2017 19:00:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZRIN-0000hf-Hy for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 19:00:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZRIJ-0002sM-JP for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 19:00:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56112) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZRIJ-0002sE-Gg for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 19:00:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cZRII-0002Ce-JN; Thu, 02 Feb 2017 19:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel McClanahan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Fri, 03 Feb 2017 00:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16026 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: Original-Received: via spool by 16026-submit@debbugs.gnu.org id=B16026.14860799498373 (code B ref 16026); Fri, 03 Feb 2017 00:00:02 +0000 Original-Received: (at 16026) by debbugs.gnu.org; 2 Feb 2017 23:59:09 +0000 Original-Received: from localhost ([127.0.0.1]:54309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZRHN-0002Av-00 for submit@debbugs.gnu.org; Thu, 02 Feb 2017 18:59:08 -0500 Original-Received: from mail-oi0-f48.google.com ([209.85.218.48]:35647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZRHI-0002AO-Ck for 16026@debbugs.gnu.org; Thu, 02 Feb 2017 18:59:04 -0500 Original-Received: by mail-oi0-f48.google.com with SMTP id j15so2282896oih.2 for <16026@debbugs.gnu.org>; Thu, 02 Feb 2017 15:59:00 -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=fokhI1uPJJ8RfAU4+PrJxAIUux26uQbfYgsEcQvQnLZDoUoZIujOOWhQGNZ1jV1GTH m7i5F9fJqzeCKqzY5v5zzkbkg4Z7ixiEjNVvmnWX+xyvMIIL6YlUfkDxsRn7mZaaxktB g0MuEkYUS663mfAvzaxyOpZtBoj+EVKRsGlpqhtWAsWMOd3/9lJYx5tnstlB4PNtJ9DE NIoOlAkd69M18uaSjFkxT13HqNnxtJXRWeDRRcQ2OUNNUgfh219CM8ZLZWbe8Xn5qrw9 v0kRbRd0hAQKjWr37SlZD+5D3zL/VgImik9OGn/KkrSjXfz3neiVhQ7rRHzOaiMqHNV1 KyAA== X-Gm-Message-State: AIkVDXJUh7isOTG/n1hoAARdIc2vKm40qgCfYpeVaPYCWiBLWnegpyiMRpgYY594RSsL0WymFIwH9Ov3ibyRqA== 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128896 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.