Commit c22baa29 authored by maliky's avatar maliky
Browse files

supprime some

parent 7c088ceb
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<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>
<li><a href="#orgheadline7">7.1. Org Babel</a></li>
<li><a href="#orgheadline10">8. Modes</a>
<li><a href="#orgheadline9">8.1. EIN</a></li>
<li><a href="#orgheadline11">9. Emacs customization</a></li>
<li><a href="#orgheadline17">10. Keyboard shortcuts</a>
<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. file</a></li>
<li><a href="#orgheadline19">11. Fonts</a>
<li><a href="#orgheadline18">11.1. Custom-set-faces</a></li>
# 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" . "")
("melpa" . "")
("org" . "")))
# 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))
(unless (and (bolp) (org-on-heading-p))
(error "Boundary reached"))
(org-reveal t)
;;;; 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 <>
;;;; set code langages
'((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"
% added packages
\\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>
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.
'(tool-bar-mode nil) ;; pour ne pas voir s'afficher la tool bar
[default default default italic underline success warning error])
["#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")
"from IPython.core.completerlib import module_completion")
'(python-shell-prompt-detect-failure-warning nil)
'(send-mail-function (quote smtpmail-send-it))
'(smtpmail-smtp-server "")
'(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)
## file<a id="orgheadline16"></a>
(defun ff-abstract ()
"format abstract. Need the point at the beggining of the region"
(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 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))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment