diff --git a/module2/ressources/emacs_orgmode.org b/module2/ressources/emacs_orgmode.org index 7c231f246c7474249be59451c0de61a601376d8f..bc286454f6eac150e54a33a3e5a78a74217a9549 100644 --- a/module2/ressources/emacs_orgmode.org +++ b/module2/ressources/emacs_orgmode.org @@ -234,7 +234,9 @@ official webpage: http://company-mode.github.io/ it on a daily basis but you should definitely understand what git does behind the scene beforehand. If you feel this would be useful for you, you should follow the instructions from here: -https://www.emacswiki.org/emacs/Magit +https://www.emacswiki.org/emacs/Magit. If you installed the previous +"/reproducible research/" emacs configuration, you can easily invoke +magit by using ~C-x g~. ** Other resources - [[https://orgmode.org/orgguide.pdf][The compact Org-mode Guide]] - [[https://github.com/dfeich/org-babel-examples][Many examples illustrating the use of different languages in org-mode]] diff --git a/module2/ressources/rr_org/init.el b/module2/ressources/rr_org/init.el index 619e502523fc45b17d439ce76ced2932414a6323..ec1338172bd9a8d2d2799223157328908529355a 100644 --- a/module2/ressources/rr_org/init.el +++ b/module2/ressources/rr_org/init.el @@ -78,6 +78,10 @@ (global-set-key [f5] '(lambda () (interactive) (revert-buffer nil t nil))) +(global-set-key (kbd "C-x g") 'magit-status) +(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup) +;; (global-magit-file-mode 1) + (defun auto-fill-mode-on () (TeX-PDF-mode 1)) (add-hook 'tex-mode-hook 'TeX-PDF-mode-on) (add-hook 'latex-mode-hook 'TeX-PDF-mode-on) diff --git a/module2/ressources/rr_org/init.org b/module2/ressources/rr_org/init.org index 9e264375863c982dc058f01dcf7d9bc68c65c3ee..36c4884baca1342c93e5a68865fc37d95ddbc82c 100644 --- a/module2/ressources/rr_org/init.org +++ b/module2/ressources/rr_org/init.org @@ -144,6 +144,14 @@ my other shortcuts (e.g., the ones for spelling a region). #+begin_src emacs-lisp :tangle init.el (global-set-key [f5] '(lambda () (interactive) (revert-buffer nil t nil))) #+end_src +** Invoke magit (for git) :WEB: +From http://magit.vc/manual/magit.pdf + +#+begin_src emacs-lisp :tangle init.el +(global-set-key (kbd "C-x g") 'magit-status) +(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup) +;; (global-magit-file-mode 1) +#+end_src * Small fixes for LaTeX: ** PDF with LaTeX by default :ARNAUD: #+begin_src emacs-lisp :tangle init.el diff --git a/module2/ressources/rr_org/journal.org b/module2/ressources/rr_org/journal.org index 64d48252f0cf02ccae4966db4ef7e9702345f4d2..4104ff1918f1b1e1ed5a64f035301b7edfd818f9 100644 --- a/module2/ressources/rr_org/journal.org +++ b/module2/ressources/rr_org/journal.org @@ -40,6 +40,9 @@ shortcuts. This can be changed from the Options menu. - =C-x C-h= get the list of emacs shortcuts - =C-c C-h= get the list of emacs shortcuts considering the mode you are currently using (e.g., C, Lisp, org, ...) + - With the "/reproducible research/" emacs configuration, ~C-x g~ allows + you to invoke [[https://magit.vc/][Magit]] (provided you installed it beforehand!) which + is a nice git interface for Emacs. There are a bunch of cheatsheets also available out there (e.g., [[http://www.shortcutworld.com/en/linux/Emacs_23.2.1.html][this one for emacs]] and [[http://orgmode.org/orgcard.txt][this one for org-mode]] or this [[http://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png][graphical one]]). ***** Org-mode