From a5c9bbaf7f944bdb550638be7bd6b32e37a57f9f Mon Sep 17 00:00:00 2001 From: Konrad Hinsen Date: Fri, 24 Aug 2018 17:21:35 +0200 Subject: [PATCH] Instructions for proxy configuration in init.[el|org] --- module2/ressources/rr_org/init.el | 31 ++++++++++++++++++++++++++++-- module2/ressources/rr_org/init.org | 29 +++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/module2/ressources/rr_org/init.el b/module2/ressources/rr_org/init.el index 4503d3a..12a552d 100644 --- a/module2/ressources/rr_org/init.el +++ b/module2/ressources/rr_org/init.el @@ -1,7 +1,13 @@ ;; Machine-dependent configuration - adapt as required for your computer! -;; Executables for Python and R - +;; There are two kinds of settings that might have to be adapted to the +;; specific environment of a computer: +;; 1. Telling Emacs which executables to use for Python and R +;; 2. Telling Emacs to use a Web proxy + +;; +;; 1. Telling Emacs which executables to use for Python and R +;; ;; Default setting: Use "python3" under Linux and macOS, but "Python" under Windows. ;; The default for R is "R" for all platforms (predefined by Emacs). (setq org-babel-python-command @@ -23,6 +29,27 @@ ;; R ;; (setq inferior-R-program-name "C:/Program Files/R/R-3.5.1/bin/x64/Rterm.exe") +;; +;; 2. Telling Emacs to use a Web proxy +;; +;; If your local network imposes the use of a Web proxy, you must uncomment and adapt +;; the following lines. Emacs does NOT use system-wide proxy settings. In most +;; cases, only the first two lines (proxy-name and proxy-port) need to be changed, +;; but sometimes the fifth line (no_proxy) also requires modifications. If you are +;; unsure what the right settings are, ask your local network administrator for help. + +;; (let* ((proxy-name "proxy.mynetwork.org") +;; (proxy-port "8080") +;; (proxy-name-port (concat proxy-name ":" proxy-port)) +;; (proxy-url (concat "http://" proxy-name-port "/"))) +;; (setq url-proxy-services (list (cons "no_proxy" "127.0.0.1") +;; (cons "http" proxy-name-port) +;; (cons "https" proxy-name-port))) +;; (setenv "http_proxy" proxy-url) +;; (setenv "https_proxy" proxy-url) +;; (setenv "JVM_OPTS" (concat "-Dhttp.proxyHost=" proxy-name +;; " -Dhttp.proxyPort=" proxy-port))) + (require 'org) (require 'ess-site) diff --git a/module2/ressources/rr_org/init.org b/module2/ressources/rr_org/init.org index 19aa9f6..3e94a68 100644 --- a/module2/ressources/rr_org/init.org +++ b/module2/ressources/rr_org/init.org @@ -23,8 +23,14 @@ document, simply =M-x org-babel-tangle=. #+begin_src emacs-lisp :tangle init.el ;; Machine-dependent configuration - adapt as required for your computer! -;; Executables for Python and R +;; There are two kinds of settings that might have to be adapted to the +;; specific environment of a computer: +;; 1. Telling Emacs which executables to use for Python and R +;; 2. Telling Emacs to use a Web proxy +;; +;; 1. Telling Emacs which executables to use for Python and R +;; ;; Default setting: Use "python3" under Linux and macOS, but "Python" under Windows. ;; The default for R is "R" for all platforms (predefined by Emacs). (setq org-babel-python-command @@ -45,6 +51,27 @@ document, simply =M-x org-babel-tangle=. ;; R ;; (setq inferior-R-program-name "C:/Program Files/R/R-3.5.1/bin/x64/Rterm.exe") + +;; +;; 2. Telling Emacs to use a Web proxy +;; +;; If your local network imposes the use of a Web proxy, you must uncomment and adapt +;; the following lines. Emacs does NOT use system-wide proxy settings. In most +;; cases, only the first two lines (proxy-name and proxy-port) need to be changed, +;; but sometimes the fifth line (no_proxy) also requires modifications. If you are +;; unsure what the right settings are, ask your local network administrator for help. + +;; (let* ((proxy-name "proxy.mynetwork.org") +;; (proxy-port "8080") +;; (proxy-name-port (concat proxy-name ":" proxy-port)) +;; (proxy-url (concat "http://" proxy-name-port "/"))) +;; (setq url-proxy-services (list (cons "no_proxy" "127.0.0.1") +;; (cons "http" proxy-name-port) +;; (cons "https" proxy-name-port))) +;; (setenv "http_proxy" proxy-url) +;; (setenv "https_proxy" proxy-url) +;; (setenv "JVM_OPTS" (concat "-Dhttp.proxyHost=" proxy-name +;; " -Dhttp.proxyPort=" proxy-port))) #+end_src * Loading files: -- 2.18.1