\n\n"))
+(rrmooc/add-org-template
+ '("RR" "#+begin_src R :results output graphics :file (org-babel-temp-file (concat (file-name-directory (or load-file-name buffer-file-name)) \"figure-\") \".png\") :exports both :width 600 :height 400 :session *R* \n\n#+end_src" "\n\n"))
#+end_src
*** Python code
To use this type \n\n"))
+(rrmooc/add-org-template
+ '("p" "#+begin_src python :results output :exports both\n\n#+end_src" "\n\n"))
#+end_src
#+begin_src emacs-lisp :tangle init.el
-(add-to-list 'org-structure-template-alist
- '("P" "#+begin_src python :results output :session :exports both\n\n#+end_src" "\n\n"))
+(rrmooc/add-org-template
+ '("P" "#+begin_src python :results output :session :exports both\n\n#+end_src" "\n\n"))
#+end_src
#+begin_src emacs-lisp :tangle init.el
-(add-to-list 'org-structure-template-alist
- '("PP" "#+begin_src python :results file :session :var matplot_lib_filename=(org-babel-temp-file \"figure\" \".png\") :exports both\nimport matplotlib.pyplot as plt\n\nimport numpy\nx=numpy.linspace(-15,15)\nplt.figure(figsize=(10,5))\nplt.plot(x,numpy.cos(x)/x)\nplt.tight_layout()\n\nplt.savefig(matplot_lib_filename)\nmatplot_lib_filename\n#+end_src" "\n\n"))
+(rrmooc/add-org-template
+ '("PP" "#+begin_src python :results file :session :var matplot_lib_filename=(org-babel-temp-file \"figure\" \".png\") :exports both\nimport matplotlib.pyplot as plt\n\nimport numpy\nx=numpy.linspace(-15,15)\nplt.figure(figsize=(10,5))\nplt.plot(x,numpy.cos(x)/x)\nplt.tight_layout()\n\nplt.savefig(matplot_lib_filename)\nmatplot_lib_filename\n#+end_src" "\n\n"))
#+end_src
*** Bash "sh" code:
To use this type \n\n"))
- (add-to-list 'org-structure-template-alist
- '("b" "#+begin_src shell :results output :exports both\n\n#+end_src" "\n\n")))
+ (rrmooc/add-org-template
+ '("b" "#+begin_src shell :session session :results output :exports both\n\n#+end_src" "\n\n"))
+ (rrmooc/add-org-template
+ '("b" "#+begin_src shell :results output :exports both\n\n#+end_src" "\n\n")))
#+end_src
To use this type \n\n"))
+(rrmooc/add-org-template
+ '("B" "#+begin_src shell :session *shell* :results output :exports both \n\n#+end_src" "\n\n"))
#+end_src
*** Graphviz
#+begin_src emacs-lisp :tangle init.el
-(add-to-list 'org-structure-template-alist
- '("g" "#+begin_src dot :results output graphics :file \"/tmp/graph.pdf\" :exports both
- digraph G {
- node [color=black,fillcolor=white,shape=rectangle,style=filled,fontname=\"Helvetica\"];
- A[label=\"A\"]
- B[label=\"B\"]
- A->B
- }\n#+end_src" "\n\n"))
+(rrmooc/add-org-template
+ '("g" "#+begin_src dot :results output graphics :file \"/tmp/graph.pdf\" :exports both
+digraph G {
+node [color=black,fillcolor=white,shape=rectangle,style=filled,fontname=\"Helvetica\"];
+A[label=\"A\"]
+B[label=\"B\"]
+A->B
+}\n#+end_src" "\n\n"))
#+end_src
** Evaluating whole subtree: :LUKA:
#+begin_src emacs-lisp :tangle init.el
diff --git a/module2/ressources/rstudio.org b/module2/ressources/rstudio.org
index 902180717257390fa64293bb10f6ef911a8ddd0f..33a3c71e4dd305370d6ae1c78800a37b447e3071 100644
--- a/module2/ressources/rstudio.org
+++ b/module2/ressources/rstudio.org
@@ -89,8 +89,8 @@ of these documents:
* Using Git from RStudio
If you have never used git with RStudio, *we strongly advise that you
follow [[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session02/jump_to_id/d132a854b0464ad29085cedaded23136][our tutorial on using git from RStudio]]* (/"RStudio et Gitlab"/
-in French). Before proceeding, make sure you also have followed the
-*[[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session02/jump_to_id/7508aece244548349424dfd61ee3ba85]["git/GitLab configuration" tutorial]]* (in French).
+). Before proceeding, make sure you also have followed the
+*[[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session02/jump_to_id/7508aece244548349424dfd61ee3ba85]["git/GitLab configuration" tutorial]]*.
Alternatively, you may want to watch [[https://www.youtube.com/embed/uHYcDQDbMY8][this video]] (in English). If you
do not like videos, you should have a look at the [[https://swcarpentry.github.io/git-novice/14-supplemental-rstudio/index.html][step-by-step
diff --git a/module2/ressources/rstudio_fr.org b/module2/ressources/rstudio_fr.org
index 09ea1d0abdce6fd996e7ce3b1f6d700dfc55f931..b510eea237d2c065371adf67fe8ea4169bcd6b3b 100644
--- a/module2/ressources/rstudio_fr.org
+++ b/module2/ressources/rstudio_fr.org
@@ -93,11 +93,11 @@ ne sont pas toujours à jour :
* Utiliser Git avec RStudio
La première chose à faire est de configurer Git sur votre
ordinateur. Pour ce faire, vous pouvez suivre la vidéo
-[[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session02/jump_to_id/7508aece244548349424dfd61ee3ba85][configurer Git pour Gitlab]] (en français) et le document
-[[https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/blob/master/module2/ressources/gitlab_fr.org][Git et Gitlab]] correspondant (en français).
+[[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session02/jump_to_id/7508aece244548349424dfd61ee3ba85][configurer Git pour Gitlab]] et le document
+[[https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/blob/master/module2/ressources/gitlab_fr.org][Git et Gitlab]] correspondant.
Vous pourrez alors utiliser Git avec RStudio. Pour ce faire, vous
-pouvez suivre la vidéo [[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session02/jump_to_id/d132a854b0464ad29085cedaded23136][RStudio - Gitlab]] (en français) dont les étapes
+pouvez suivre la vidéo [[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session02/jump_to_id/d132a854b0464ad29085cedaded23136][RStudio - Gitlab]] dont les étapes
sont reprises ci-dessous.
/(Nous vous signalons aussi cette/ [[https://www.youtube.com/embed/uHYcDQDbMY8][vidéo]] /(en anglais) ainsi que le/ [[https://swcarpentry.github.io/git-novice/14-supplemental-rstudio/index.html][tuto