Commit 7c088ceb authored by maliky's avatar maliky
Browse files

md format

parent e95ece79
Comment sauvegarder son historique de commande lorsque l'on utilise plusieurs terminaux. Par défaut seul l'historique du dernier terminal fermé est sauvegardé.
Tout d'abord définissons les variables classique de l'historique dans notre fichier \`.bashrc\`
# don't put duplicate lines or lines starting with space in the history, and erase duplicates
HISTCONTROL=ignoreboth:erasedups
HISTSIZE=5000
HISTFILESIZE=10000
HISTTIMEFORMAT="%Y-%m-%d %H:%M "
# append to the history file, don't overwrite it
shopt -s histappend
Ensuite appelons le script \`script log_persistent__history.sh_\` sauvegarder quelque par où votre \`PATH\` peut le trouver.
ph_file="$HOME/.persistent_history"
if [ -f ~/bin/log_persistent_history.sh ]; then
. ~/bin/log_persistent_history.sh
PROMPT_COMMAND="log_persistent_history"
else
PROMPT_COMMAND=
fi
Ce script utilise un deuxième d'historique pour y sauvegarder toutes les commandes exécutées dans n'importe quel terminal, en veillant à ne pas avoir deux fois la même commande.
Si une commande présente dans l'historique est re-exécutée, on met à jour sa date de dernière exécution.
################ activate persistant history accross terminals
hid_pat='[[:digit:]]+' #history id
date_pat='[0-9]+-[0-9]+-[0-9]+ [0-9]+:[0-9]+' # a factoriser
history_pat="^ *$hid_pat *($date_pat) *(.*)"
log_persistent_history() {
# Save the last history command to ph_file independently of terminal
if [ ! -f $ph_file ]; then touch $ph_file; fi
# extract parts of the last history
[[ $(history 1) =~ $history_pat ]]
date_time_part="${BASH_REMATCH[1]}"
cmd_part="${BASH_REMATCH[2]}"
# if the commande was used previously, remove the line and create one with an updated timestamp
saving_check_pat="$date_pat *$cmd_part *"
if egrep -q "$saving_check_pat" "$ph_file"; then
sed_check_pat=${saving_check_pat/\//\\\/}
sed -rie "/$sed_check_pat/d" "$ph_file"
fi
echo "$date_time_part $cmd_part" >> $ph_file
}
#### history alias
alias hgrep="history | egrep "
alias phgrep="cat $ph_file | egrep"
Add this to your .bashrc file
#+BEGIN_SRC bash
# don't put duplicate lines or lines starting with space in the history, and erase duplicates
HISTCONTROL=ignoreboth:erasedups
HISTSIZE=5000
HISTFILESIZE=10000
HISTTIMEFORMAT="%Y-%m-%d %H:%M "
# append to the history file, don't overwrite it
shopt -s histappend
#+END_SRC
With a call to the script log_persistent_history.sh
The scripts use a second history file to save your history accross terminals
#+BEGIN_SRC bash
ph_file="$HOME/.persistent_history"
if [ -f ~/bin/log_persistent_history.sh ]; then
. ~/bin/log_persistent_history.sh
PROMPT_COMMAND="log_persistent_history"
else
PROMPT_COMMAND=
fi
#+END_SRC
Add this to your .bashrc file
# don't put duplicate lines or lines starting with space in the history, and erase duplicates
HISTCONTROL=ignoreboth:erasedups
HISTSIZE=5000
HISTFILESIZE=10000
HISTTIMEFORMAT="%Y-%m-%d %H:%M "
# append to the history file, don't overwrite it
shopt -s histappend
With a call to the script log<sub>persistent</sub><sub>history.sh</sub>
The scripts use a second history file to save your history accross terminals
ph_file="$HOME/.persistent_history"
if [ -f ~/bin/log_persistent_history.sh ]; then
. ~/bin/log_persistent_history.sh
PROMPT_COMMAND="log_persistent_history"
else
PROMPT_COMMAND=
fi
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgheadline1">1. update load path</a></li>
<li><a href="#orgheadline2">2. Emacs package system</a></li>
<li><a href="#orgheadline3">3. Requirements</a></li>
<li><a href="#orgheadline4">4. Backup and autosave</a></li>
<li><a href="#orgheadline5">5. AUCTex et lacheck</a></li>
<li><a href="#orgheadline6">6. Yasnippet</a></li>
<li><a href="#orgheadline8">7. Org Mode</a>
<ul>
<li><a href="#orgheadline7">7.1. Org Babel</a></li>
</ul>
</li>
<li><a href="#orgheadline10">8. Modes</a>
<ul>
<li><a href="#orgheadline9">8.1. EIN</a></li>
</ul>
</li>
<li><a href="#orgheadline11">9. Emacs customization</a></li>
<li><a href="#orgheadline17">10. Keyboard shortcuts</a>
<ul>
<li><a href="#orgheadline12">10.1. web-beautify</a></li>
<li><a href="#orgheadline13">10.2. EIN-key</a></li>
<li><a href="#orgheadline14">10.3. Yas-key</a></li>
<li><a href="#orgheadline15">10.4. Ispell</a></li>
<li><a href="#orgheadline16">10.5. notes.org file</a></li>
</ul>
</li>
<li><a href="#orgheadline19">11. Fonts</a>
<ul>
<li><a href="#orgheadline18">11.1. Custom-set-faces</a></li>
</ul>
</li>
</ul>
</div>
</div>
# update load path<a id="orgheadline1"></a>
;;;; Update load path
(add-to-list 'load-path "~/.emacs.d/elpa")
(add-to-list 'load-path "~/.emacs.d/plugins/auctex")
(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet")
(add-to-list 'load-path "~/.emacs.d/elpa/org-mode")
(add-to-list 'load-path "~/.emacs.d/elpa/org-plus-contrib")
(add-to-list 'load-path "~/.emacs.d/elpa/ob-ipython")
(add-to-list 'load-path "~/.emacs.d/elpa/s") ;; ess related
(add-to-list 'load-path "~/.emacs.d/elpa/dash")
(add-to-list 'load-path "~/.emacs.d/elpa/f")
(add-to-list 'load-path "~/.emacs.d/elpa/dash-functional")
; (add-to-list 'load-path "~/.emacs.d/plugins/ESS/lisp/")
; (add-to-list 'load-path "~/.emacs.d/plugins")
(load-file "~/.emacs.d/elpa/graphviz-dot-mode-20171103.127/graphviz-dot-mode.el")
# Emacs package system<a id="orgheadline2"></a>
;;;; emacs package system
(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")
("org" . "http://orgmode.org/elpa/")))
(package-initialize)
# Requirements<a id="orgheadline3"></a>
;;;; Requirements
(require 'iso-transl)
(require 'package)
; (require 'hide-comnt) ; to hide comment in hs mode ?
;;;; org-exporter
(require 'ox-beamer)
(require 'ox-freemind)
(require 'ob-ipython)
(require 'ein)
(require 'ein-loaddefs)
(require 'ein-notebook)
(require 'ein-subpackages)
; (require 'ess-site)
;(load "ess-site")
# Backup and autosave<a id="orgheadline4"></a>
(defvar backup-dir (expand-file-name "~/.emacs.d/backup/"))
(defvar autosave-dir (expand-file-name "~/.emacs.d/auto-save-list/"))
(setq backup-directory-alist (list (cons ".*" backup-dir)))
(setq auto-save-list-file-prefix autosave-dir)
(setq auto-save-file-name-transforms `((".*" ,autosave-dir t)))
# AUCTex et lacheck<a id="orgheadline5"></a>
;;;; AUCTex et lacheck
(setq TeX-PDF-mode t) ; will compile pdf by default.
(setq TeX-auto-local (expand-file-name "~/.emacs.d/plugins/auctex/style-auto-parse/"))
(setq TeX-auto-save t)
(setq TeX-parse-self t)
; (setq-default TeX-master nil)
; bind C-c = to the toc of my latex document
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
# Yasnippet<a id="orgheadline6"></a>
;;;; Yasnippet
(add-hook 'asy-mode
#'(lambda ()
(yas-activate-extra-mode 'asy-mode)))
(add-hook 'graphviz-dot-mode
#'(lambda ()
(yas-activate-extra-mode graphviz-dot-mode)))
# Org Mode<a id="orgheadline8"></a>
;;;; Org Mode
(defun org-show-current-heading-tidily ()
(interactive) ; Interactive
"Show next entry, keeping other entries closed."
(if (save-excursion (end-of-line) (outline-invisible-p))
(progn (org-show-entry) (show-children))
(outline-back-to-heading)
(unless (and (bolp) (org-on-heading-p))
(org-up-heading-safe)
(hide-subtree)
(error "Boundary reached"))
(org-overview)
(org-reveal t)
(org-show-entry)
(show-children)))
;;;; Making sure org basic cmd are accessible everywhere
;; (global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
;; (global-set-key "\C-cc" 'org-capture)
;; (global-set-key "\C-cb" 'org-iswitchb)
Dans la fonction suivante, il faut vérifier les \\ dans l'expression régulière
;; (defun mlk-latex-filter-nobreaks (text backend info) "Ensure \"~\"
;; are properly handled in LaTeX export." (when
;; (org-export-derived-backend-p backend 'latex)
;; (replace-regexp-in-string "\\textasciitilde{}" "~" text)))
;; (add-to-list 'org-export-filter-plain-text-functions
;; 'my-latex-filter-nobreaks)
## Org Babel<a id="orgheadline7"></a>
Check the guy at <https://github.com/gregsexton/ob-ipython>
;;;; set code langages
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(ipython . t)
(asymptote . t)
(R . t)
(latex . t)
(ein . t)
(dot . t)
))
; don't prompt me to confirm everytime I want to evaluate a block
(setq org-confirm-babel-evaluate nil)
; display/update images in the buffer after I evaluate
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
(add-to-list 'org-latex-classes '("csedu"
"\\documentclass[a4paper,twoside]{article}
[NO-DEFAULT-PACKAGES]
\\usepackage{subfigureThen}
\\usepackage{calc}
\\usepackage{amssymb}
\\usepackage{amstext}
\\usepackage{amsmath}
\\usepackage{amsthm}
\\usepackage{multicol}
\\usepackage{pslatex}
% added packages
\\usepackage{natbib}
\\usepackage[T1]{fontenc}
\\usepackage[utf8]{inputenc}
\\usepackage[english]{babel}
\\usepackage[xindy,acronym]{glossaries}
\\usepackage{graphicx}
[EXTRA]
\\usepackage{SCITEPRESS} % Please add other packages that you may need BEFORE the SCITEPRESS.sty package.
"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
# Modes<a id="orgheadline10"></a>
electric-pair-mode is a minor mode shiped with emacs
;;;; More Modes
; (add-hook 'text-mode-hook 'hs-minor-mode)
(electric-pair-mode 1)
## EIN<a id="orgheadline9"></a>
(setq
ein:jupyter-default-server-command "/usr/local/bin/jupyter")
(setq ein:jupyter-server-args (list "--no-browser"))
# Emacs customization<a id="orgheadline11"></a>
;; If there is more than one, they won't work right.
(custom-set-variables
'(tool-bar-mode nil) ;; pour ne pas voir s'afficher la tool bar
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
["#212526" "#ff4b4b" "#b4fa70" "#fce94f" "#729fcf" "#e090d7" "#8cc4ff" "#eeeeec"])
'(custom-enabled-themes '(tsdh-dark))
'(erc-hide-list (quote ("JOIN" "KICK" "PART" "QUIT")))
'(inhibit-startup-screen t)
'(org-beamer-frame-level 2)
'(org-hide-leading-stars t)
'(org-odd-levels-only nil)
'(org-startup-truncated nil)
'(outline-regexp "[% ]+" t)
; check the shell interpreter below
'(python-shell-interpreter "/usr/local/bin/ipython3")
;; '(python-shell-prompt-regexp "In \\[[0-9]+\\]: ")
;; '(python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: ")
;; '(python-shell-completion-string-code)
'(python-shell-interpreter-args "--simple-prompt -i")
'(python-shell-completion-setup-code
"from IPython.core.completerlib import module_completion")
'(python-shell-completion-module-string-code
"';'.join(module_completion('''%s'''))\n")
'(python-shell-completion-string-code
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
'(python-shell-prompt-detect-failure-warning nil)
'(send-mail-function (quote smtpmail-send-it))
'(smtpmail-smtp-server "mail.kone.ci")
'(smtpmail-smtp-service 25)
'(yas-snippet-dirs (quote ("~/.emacs.d/plugins/yasnippet/snippets")) nil (yasnippet))
; graphviz customization
'(graphviz-dot-auto-indent-on-braces t)
'(graphviz-dot-auto-indent-on-newline t)
'(graphviz-dot-auto-indent-on-semi t)
'(graphviz-dot-delete-completions t)
'(graphviz-dot-toggle-completions nil)
'(graphviz-dot-view-edit-command t)
)
# Keyboard shortcuts<a id="orgheadline17"></a>
mettre de l'ordre ici
;;;; raccourcis pour les remplacements
(global-set-key (kbd "C-c r") 'replace-regexp)
(global-set-key (kbd "C-c s") 'replace-string)
## web-beautify<a id="orgheadline12"></a>
;;;; web-beautify
(eval-after-load 'js2-mode
'(define-key js2-mode-map (kbd "C-c b") 'web-beautify-js))
(eval-after-load 'json-mode
'(define-key json-mode-map (kbd "C-c b") 'web-beautify-js))
(eval-after-load 'sgml-mode
'(define-key html-mode-map (kbd "C-c b") 'web-beautify-html))
(eval-after-load 'css-mode
'(define-key css-mode-map (kbd "C-c b") 'web-beautify-css))
;;;; Org-key
(global-set-key "\M-=" 'org-show-current-heading-tidily)
(global-set-key (kbd "C-c C-S-o") 'org-odt-export-to-odt)
## EIN-key<a id="orgheadline13"></a>
;;;; pour EIN mode
(global-set-key (kbd "C-c e p") 'ein:jupyter-server-stop)
(global-set-key (kbd "C-c e r") 'ein:jupyter-server-start)
(define-key ein:notebook-mode-map "\C-c\C-d" 'ein:worksheet-delete-cell)
## Yas-key<a id="orgheadline14"></a>
;;;; Yasnipet
(global-set-key (kbd "C-c & C-l") 'yas-load-directory)
(global-set-key (kbd "C-c & C-a") 'yas-reload-all)
## Ispell<a id="orgheadline15"></a>
;;;; Ispell
(global-set-key (kbd "C-$") 'ispell-complete-word)
## notes.org file<a id="orgheadline16"></a>
(defun ff-abstract ()
"format abstract. Need the point at the beggining of the region"
(interactive)
(while (search-forward "
" (region-end) t)
(replace-match " " nil t))
(while (search-forward "- " (region-end) t)
(replace-match "" nil t))
(while (search-forward "." (region-end) t)
(replace-match ". " nil t))
)
(global-set-key (kbd "C-c f") 'ff-abstract)
# Fonts<a id="orgheadline19"></a>
I tried to set font size by hand not sure if it work because other setting done previously
;;;;;;;;;;;;;;;; Fonts
; (add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-12"))
(put 'downcase-region 'disabled nil)
(put 'upcase-region 'disabled nil)
## Custom-set-faces<a id="orgheadline18"></a>
(custom-set-faces
; ; custom-set-faces was added by Custom.
; ; If you edit it by hand, you could mess it up, so be careful.
; ; Your init file should contain only one such instance.
; ; If there is more than one, they won't work right.
'(default ((t (:family "DejaVu Sans" :foundry "PfEd" :slant normal :weight normal :height 128 :width normal))))
'(org-table ((t (:foreground "LightSkyBlue" :family "Ubuntu Mono")))))
;(add-to-list 'default-frame-alist '(font . "Monospace-10"))
;(add-to-list 'default-frame- '(font . "DejaVu Sans Mono-10"))
; '(default ((t (:family "Ubuntu Mono" :foundry "DAMA" :slant normal :weight normal :height 143 :width normal))))
#+PROPERTY: header-args :tangle yes :results silent :session init
# C-c C-v t --> to tangle
* update load path
#+BEGIN_SRC emacs-lisp
;;;; Update load path
(add-to-list 'load-path "~/.emacs.d/elpa")
(add-to-list 'load-path "~/.emacs.d/plugins/auctex")
(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet")
(add-to-list 'load-path "~/.emacs.d/elpa/org-mode")
(add-to-list 'load-path "~/.emacs.d/elpa/org-plus-contrib")
(add-to-list 'load-path "~/.emacs.d/elpa/ob-ipython")
(add-to-list 'load-path "~/.emacs.d/elpa/s") ;; ess related
(add-to-list 'load-path "~/.emacs.d/elpa/dash")
(add-to-list 'load-path "~/.emacs.d/elpa/f")
(add-to-list 'load-path "~/.emacs.d/elpa/dash-functional")
; (add-to-list 'load-path "~/.emacs.d/plugins/ESS/lisp/")
; (add-to-list 'load-path "~/.emacs.d/plugins")
(load-file "~/.emacs.d/elpa/graphviz-dot-mode-20171103.127/graphviz-dot-mode.el")
#+END_SRC
* Emacs package system
#+BEGIN_SRC emacs-lisp
;;;; emacs package system
(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")
("org" . "http://orgmode.org/elpa/")))
(package-initialize)
#+END_SRC
* Requirements
#+BEGIN_SRC emacs-lisp
;;;; Requirements
(require 'iso-transl)
(require 'package)
; (require 'hide-comnt) ; to hide comment in hs mode ?
;;;; org-exporter
(require 'ox-beamer)
(require 'ox-freemind)
(require 'ob-ipython)
(require 'ein)
(require 'ein-loaddefs)
(require 'ein-notebook)
(require 'ein-subpackages)
; (require 'ess-site)
;(load "ess-site")
#+END_SRC
* Backup and autosave
#+BEGIN_SRC emacs-lisp
(defvar backup-dir (expand-file-name "~/.emacs.d/backup/"))
(defvar autosave-dir (expand-file-name "~/.emacs.d/auto-save-list/"))
(setq backup-directory-alist (list (cons ".*" backup-dir)))
(setq auto-save-list-file-prefix autosave-dir)
(setq auto-save-file-name-transforms `((".*" ,autosave-dir t)))
#+END_SRC
* AUCTex et lacheck
#+BEGIN_SRC emacs-lisp
;;;; AUCTex et lacheck
(setq TeX-PDF-mode t) ; will compile pdf by default.
(setq TeX-auto-local (expand-file-name "~/.emacs.d/plugins/auctex/style-auto-parse/"))
(setq TeX-auto-save t)
(setq TeX-parse-self t)
; (setq-default TeX-master nil)
; bind C-c = to the toc of my latex document
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
#+END_SRC
* Yasnippet
#+BEGIN_SRC emacs-lisp
;;;; Yasnippet
(add-hook 'asy-mode
#'(lambda ()
(yas-activate-extra-mode 'asy-mode)))
(add-hook 'graphviz-dot-mode
#'(lambda ()
(yas-activate-extra-mode graphviz-dot-mode)))
#+END_SRC
* Org Mode
#+BEGIN_SRC emacs-lisp
;;;; Org Mode
(defun org-show-current-heading-tidily ()
(interactive) ; Interactive
"Show next entry, keeping other entries closed."
(if (save-excursion (end-of-line) (outline-invisible-p))
(progn (org-show-entry) (show-children))
(outline-back-to-heading)
(unless (and (bolp) (org-on-heading-p))
(org-up-heading-safe)
(hide-subtree)
(error "Boundary reached"))
(org-overview)
(org-reveal t)
(org-show-entry)
(show-children)))
;;;; Making sure org basic cmd are accessible everywhere
;; (global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
;; (global-set-key "\C-cc" 'org-capture)
;; (global-set-key "\C-cb" 'org-iswitchb)
#+END_SRC
Dans la fonction suivante, il faut vérifier les \ dans l'expression régulière
#+BEGIN_SRC emacs-lisp
;; (defun mlk-latex-filter-nobreaks (text backend info) "Ensure \"~\"
;; are properly handled in LaTeX export." (when
;; (org-export-derived-backend-p backend 'latex)
;; (replace-regexp-in-string "\\textasciitilde{}" "~" text)))
;; (add-to-list 'org-export-filter-plain-text-functions
;; 'my-latex-filter-nobreaks)
#+END_SRC
** Org Babel
Check the guy at https://github.com/gregsexton/ob-ipython
#+BEGIN_SRC emacs-lisp
;;;; set code langages
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(ipython . t)
(asymptote . t)
(R . t)
(latex . t)
(ein . t)
(dot . t)
))
; don't prompt me to confirm everytime I want to evaluate a block
(setq org-confirm-babel-evaluate nil)
; display/update images in the buffer after I evaluate
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
#+END_SRC
#+RESULTS:
| org-display-inline-images |
*** Latex-export for csedu class (ox-latex export)
#+BEGIN_SRC emacs-lisp
(add-to-list 'org-latex-classes '("csedu"
"\\documentclass[a4paper,twoside]{article}
[NO-DEFAULT-PACKAGES]
\\usepackage{subfigureThen}
\\usepackage{calc}
\\usepackage{amssymb}
\\usepackage{amstext}
\\usepackage{amsmath}
\\usepackage{amsthm}
\\usepackage{multicol}
\\usepackage{pslatex}
% added packages
\\usepackage{natbib}
\\usepackage[T1]{fontenc}
\\usepackage[utf8]{inputenc}
\\usepackage[english]{babel}
\\usepackage[xindy,acronym]{glossaries}
\\usepackage{graphicx}
[EXTRA]
\\usepackage{SCITEPRESS} % Please add other packages that you may need BEFORE the SCITEPRESS.sty package.
"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
#+END_SRC
* Modes
electric-pair-mode is a minor mode shiped with emacs
#+BEGIN_SRC emacs-lisp
;;;; More Modes
; (add-hook 'text-mode-hook 'hs-minor-mode)
(electric-pair-mode 1)
#+END_SRC
** EIN
#+BEGIN_SRC emacs-lisp
(setq
ein:jupyter-default-server-command "/usr/local/bin/jupyter")
(setq ein:jupyter-server-args (list "--no-browser"))
#+END_SRC
* Emacs customization
#+BEGIN_SRC emacs-lisp
;; If there is more than one, they won't work right.
(custom-set-variables
'(tool-bar-mode nil) ;; pour ne pas voir s'afficher la tool bar
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
["#212526" "#ff4b4b" "#b4fa70" "#fce94f" "#729fcf" "#e090d7" "#8cc4ff" "#eeeeec"])
'(custom-enabled-themes (quote (tsdh-dark)))
'(erc-hide-list (quote ("JOIN" "KICK" "PART" "QUIT")))
'(inhibit-startup-screen t)
'(org-beamer-frame-level 2)
'(org-hide-leading-stars t)
'(org-odd-levels-only nil)
'(org-startup-truncated nil)
'(outline-regexp "[% ]+" t)
; check the shell interpreter below
'(python-shell-interpreter "/usr/local/bin/ipython3")
;; '(python-shell-prompt-regexp "In \\[[0-9]+\\]: ")
;; '(python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: ")
;; '(python-shell-completion-string-code)
'(python-shell-interpreter-args "--simple-prompt -i")
'(python-shell-completion-setup-code
"from IPython.core.completerlib import module_completion")
'(python-shell-completion-module-string-code
"';'.join(module_completion('''%s'''))\n")
'(python-shell-completion-string-code
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
'(python-shell-prompt-detect-failure-warning nil)
'(send-mail-function (quote smtpmail-send-it))
'(smtpmail-smtp-server "mail.kone.ci")
'(smtpmail-smtp-service 25)
'(yas-snippet-dirs (quote ("~/.emacs.d/plugins/yasnippet/snippets")) nil (yasnippet))
; graphviz customization
'(graphviz-dot-auto-indent-on-braces t)
'(graphviz-dot-auto-indent-on-newline t)
'(graphviz-dot-auto-indent-on-semi t)
'(graphviz-dot-delete-completions t)
'(graphviz-dot-toggle-completions nil)
'(graphviz-dot-view-edit-command t)
)
#+END_SRC
** Testing
#+BEGIN_SRC emacs-lisp :tangle no
;; write a function to toggle between light and dark themes
(enable-theme 'tsdh-dark)
;;(enable-theme 'tsdh-light)
(custom-ena