Open the =matplotlibrc= file and add a =#= at the beginning of the line
Open the =matplotlibrc= file and add a =#= at the beginning of the line
starting with =backend=, which amounts to use the default =Agg= value.
starting with =backend=, which amounts to use the default =Agg= value.
** All platforms: pretty code in HTML export
To have code pretty printing when exporting to HTML, you should
install the =htmlize= package, which is done by opening emacs and
typing the following command:
#+BEGIN_EXAMPLE
M-x package-install RET htmlize RET # where M-x means pressing the "Esc" key then the "x" key
#+END_EXAMPLE
* A simple "/reproducible research/" emacs configuration
* A simple "/reproducible research/" emacs configuration
This section is illustrated in a [[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4][video tutorial]] (/"Mise en place
This section is illustrated in a [[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4][video tutorial]] (/"Mise en place
Emacs/Orgmode"/ in French). Watching it before following the
Emacs/Orgmode"/ in French). Watching it before following the
...
@@ -157,10 +158,10 @@ minimalist one that is rather "/reproducible research/" oriented by
...
@@ -157,10 +158,10 @@ minimalist one that is rather "/reproducible research/" oriented by
adding a few org-mode specific configurations.
adding a few org-mode specific configurations.
** Step 0: Backup and download our configuration
** Step 0: Backup and download our configuration
The procedure we propose will wipe your already existing custom emacs
The procedure we propose will wipe your already existing custom Emacs
configuration if you already have one. *You should thus beforehand make
configuration if you have one. *You should thus beforehand make
a backup of =~/.emacs= and of =~/.emacs.d/init.el=* (if these file
a backup of =~/.emacs= and of =~/.emacs.d/init.el=* (if these files
Then copy =rr_org/journal.org= file in your =~/org/= directory. This
Then copy =rr_org/journal.org= file in your =~/org/= directory. This
file will be your laboratory notebook and all the notes you will
file will be your laboratory notebook and all the notes you will
capture with =C-c c= will go automatically go in this file. The first
capture with =C-c c= will go automatically go in this file. The first
entry of this notebook is populated with [[https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org][many emacs shortcuts]] that you
entry of this notebook is populated with [[https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org][many Emacs shortcuts]] that you
should give a try.
should give a try.
** Step 2: Set up Emacs configuration
** Step 2: Set up Emacs configuration
Copy =rr_org/init.el= in your =~/.emacs.d/= directory.
Copy =rr_org/init.el= in your =~/.emacs.d/= directory.
...
@@ -231,10 +232,10 @@ is demonstrated in the [[https://app-learninglab.inria.fr/gitlab/learning-lab/mo
...
@@ -231,10 +232,10 @@ is demonstrated in the [[https://app-learninglab.inria.fr/gitlab/learning-lab/mo
** Step 5: Open and play with your journal:
** Step 5: Open and play with your journal:
In step 1, you were told to create an journal in
In step 1, you were told to create an journal in
=~org/journal.org=. First you probably want to make sure this file is
=~org/journal.org=. First you probably want to make sure this file is
backed up in a revision control system like git. We leave it up to you
stored in a version control system like git. We leave it up to you
to set this up but if you have any trouble, feel free to ask on the
to set this up but if you have any trouble, feel free to ask on the
FUN forums.
FUN forums.
* A stub of replicable article
* A stub of a replicable article
This section is illustrated in a [[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4][video tutorial]] (/"Écrire un article
This section is illustrated in a [[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4][video tutorial]] (/"Écrire un article
réplicable avec Emacs/Orgmode"/ in French). Watching it before
réplicable avec Emacs/Orgmode"/ in French). Watching it before
following the instructions given in this section may help.
following the instructions given in this section may help.
...
@@ -262,7 +263,7 @@ tar zxf replicable_article.tgz; cd replicable_article; make ; evince article.pdf
...
@@ -262,7 +263,7 @@ tar zxf replicable_article.tgz; cd replicable_article; make ; evince article.pdf
*Possible issues*:
*Possible issues*:
- If the =make= command fails (especially on Mac), it may be because
- If the =make= command fails (especially on Mac), it may be because
emacs or something else is not correctly installed. In that case,
Emacs or something else is not correctly installed. In that case,
open the article directly with the following command:
open the article directly with the following command:
@@ -282,16 +283,16 @@ If you remove the =# = in the beginning of the line, it will not be a
...
@@ -282,16 +283,16 @@ If you remove the =# = in the beginning of the line, it will not be a
comment anymore and will indicate org-mode to stop evaluating every
comment anymore and will indicate org-mode to stop evaluating every
chunk of code when exporting.
chunk of code when exporting.
* Emacs Tips and tricks
* Emacs tips and tricks
** Cheat-sheets
** Cheat-sheets
Learning emacs and org-mode can be difficult as there is an inordinate
Learning Emacs and Org-Mode can be difficult as there is an inordinate
amount of shortcuts. Many people have thus come up with
amount of shortcuts. Many people have thus come up with
cheat-sheats. Here is a selection in case it helps:
cheat-sheats. Here is a selection in case it helps:
*** Emacs
*** Emacs
- [[https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org][Common and step-by-step emacs shortcuts for our /reproducible research/ configuration]]
- [[https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org][Common and step-by-step Emacs shortcuts for our /reproducible research/ configuration]]
- [[https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf][The official GNU emacs refcard]]
- [[https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf][The official GNU emacs refcard]]
- Two graphical cheat-sheats by Sacha Hua on [[http://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png][how to learn emacs]] and on
- Two graphical cheat-sheats by Sacha Chua on [[http://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png][how to learn Emacs]] and on
[[http://sachachua.com/blog/wp-content/uploads/2013/08/20130830-Emacs-Newbie-How-to-Learn-Emacs-Keyboard-Shortcuts.png][how to learn emacs shortcuts]].
[[http://sachachua.com/blog/wp-content/uploads/2013/08/20130830-Emacs-Newbie-How-to-Learn-Emacs-Keyboard-Shortcuts.png][how to learn Emacs shortcuts]].
*** Org-mode
*** Org-mode
- [[https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org][Common and step-by-step org-mode shortcuts for our /reproducible research/ configuration]]
- [[https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org][Common and step-by-step org-mode shortcuts for our /reproducible research/ configuration]]
- [[https://orgmode.org/worg/orgcard.html][The official org-mode refcard]]
- [[https://orgmode.org/worg/orgcard.html][The official org-mode refcard]]
...
@@ -306,12 +307,12 @@ have smart completion in emacs for the most common languages. If you
...
@@ -306,12 +307,12 @@ have smart completion in emacs for the most common languages. If you
feel this is needed, you should follow the instructions from the
feel this is needed, you should follow the instructions from the
official Web page: http://company-mode.github.io/
official Web page: http://company-mode.github.io/
*** Magit
*** Magit
[[https://magit.vc/][Magit]] is an emacs interface for Git. Its usage is briefly illustrated
[[https://magit.vc/][Magit]] is an Emacs interface for Git. Its usage is briefly illustrated
in the context of this MOOC in a [[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4][video tutorial]] (/"Utilisation
in the context of this MOOC in a [[https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4][video tutorial]] (/"Utilisation
Emacs/git"/ in French).
Emacs/git"/ in French).
It is very powerful and we use it on a daily basis but you should
It is very powerful and we use it on a daily basis but you should
definitely understand what git does behind the scene beforehand. If
definitely understand what git does behind the scenes beforehand. If
you feel this would be useful for you, you should follow [[https://magit.vc/screenshots/][this visual
you feel this would be useful for you, you should follow [[https://magit.vc/screenshots/][this visual
walk-through]] or [[https://www.emacswiki.org/emacs/Magit][this really short "crash course"]]. If you installed the
walk-through]] or [[https://www.emacswiki.org/emacs/Magit][this really short "crash course"]]. If you installed the
previous "/reproducible research/" emacs configuration, you can easily
previous "/reproducible research/" emacs configuration, you can easily