title: Make Emacs access to HTTPS over Socks proxy
body: <p>This issue drove me crazy. I have a local SOCKSv5 proxy which is a gateway for all application on the system. I'd like to make <code>url-retrieve-synchronously</code> go though the SOCKS. With the following settings:</p>
  
  <pre><code>(setq socks-noproxy '("127.0.0.1"))
  (setq socks-server '("Default server" "127.0.0.1" 8010 5))
  (setq url-gateway-method 'socks)
  </code></pre>
  
  <p>The retrieve over plain HTTP works ok:</p>
  
  <pre><code>(url-retrieve-synchronously "http://gnu.org")
  #&lt;buffer  *http www.gnu.org:80*&gt;
  </code></pre>
  
  <p>But it does not work for <strong>HTTPS</strong>:</p>
  
  <pre><code>(url-retrieve-synchronously "https://gnu.org")
  </code></pre>
  
  <p>It causes:</p>
  
  <pre><code>Debugger entered--Lisp error: (file-error "make client process failed" "connection timed out" :name "gnu.org" :buffer #&lt;buffer  *url-http-temp*&gt; :host "gnu.org" :service 443 :nowait nil)
    make-network-process(:name "gnu.org" :buffer #&lt;buffer  *url-http-temp*&gt; :host    "gnu.org" :service 443 :nowait nil)
    open-network-stream("gnu.org" #&lt;buffer  *url-http-temp*&gt; "gnu.org" 443)
    open-gnutls-stream("gnu.org" #&lt;buffer  *url-http-temp*&gt; "gnu.org" 443)
    network-stream-open-tls("gnu.org" #&lt;buffer  *url-http-temp*&gt; "gnu.org" 443 (:type tls :nowait nil))
    open-network-stream("gnu.org" #&lt;buffer  *url-http-temp*&gt; "gnu.org" 443 :type tls :nowait nil)
    byte-code("\306\211\n\307&gt;\203$
  </code></pre>
  
  <p><strong>Question</strong>: how to make HTTPS work over socks in Emacs? My version is 24.2.50/W32</p>
  
  <p>I understand that for some reason an original <code>open-network-stream</code> is used instead <code>socks-open-network-stream</code>. I tried to breakpoint <code>url-open-stream</code> using <em>edebug</em> but did not manage to understand why the breakpoint is not triggered. Any ideas?</p>
  
  <p>Thanks.</p>