emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connection specific settings and proxies


From: Daniel McClanahan
Subject: Re: Connection specific settings and proxies
Date: Thu, 2 Feb 2017 17:58:34 -0600

On Wed, Feb 1, 2017 at 9:43 PM, Lars Ingebrigtsen <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]