-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemacs.lisp
151 lines (115 loc) · 4.13 KB
/
emacs.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
;; arranque
;; guardamos la sesión
(desktop-save-mode 1)
;; temas
(add-to-list 'custom-theme-load-path "~/ruta/tema")
(add-to-list 'custom-theme-load-path "~/ruta/otro/tema")
(load-theme 'zenburn t)
(add-to-list 'load-path "./emacs.d/elisp/")
;(add-hook 'text-mode-hook 'auto-fill-mode)
;; erc, chat, irc
(require 'erc)
(setq max-specpdl-size 1000) ; default is 1000, reduce the backtrace level
(setq max-specpdl-size 32000) ; http://stackoverflow.com/questions/30736631/ess-produces-variable-binding-depth-exceeds-max-specpdl-size
(setq debug-on-error t) ; now you should get a backtrace
;; LaTeX
(require 'ox-latex)
(add-to-list 'load-path "~/.emacs.d/elisp")
(load-library "latex-templates")
;; wrap código fuente
;(add-to-list 'org-latex-packages-alist '("" "minted"))
;(setq org-latex-listings 'minted)
;
;(setq org-latex-pdf-process
; '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
; "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
; "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")
(setq org-export-latex-listings t)
(add-to-list 'org-latex-packages-alist '("" "listings"))
(add-to-list 'org-latex-packages-alist '("" "color"))
;; melpa
(setq package-archives
'(("gnu" . "http://elpa.gnu.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")))
;; xetex
;(setq-default TeX-engine 'xetex)
;; Babel
;; http://stackoverflow.com/questions/15773354/indent-code-in-org-babel-src-blocks
(setq org-src-tab-acts-natively t)
;; http://stackoverflow.com/questions/10642888/syntax-highlighting-within-begin-src-block-in-emacs-orgmode-not-working
(setq org-src-fontify-natively t)
;; esto lo tenía de antes
;;(require 'calfw)
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(R . t)
; (grel . t)
(sh . t)
(python . t)
(ruby . t)
))
;; http://stackoverflow.com/questions/4711179/auto-expanding-blocks-of-comments-in-emacs
(defun refill-when-in-comment ()
(interactive)
(let ((curr-face (get-char-property (point) 'face)))
(if (member "comment" (split-string (prin1-to-string curr-face) "-"))
(fill-paragraph t)
)
)
)
(defun smart-space (arg)
(interactive "P")
(refill-when-in-comment)
(self-insert-command (prefix-numeric-value arg))
)
(global-set-key " " 'smart-space)
;; Markdown
(eval-after-load "org"
'(require 'ox-md nil t))
;; Reveal
(require 'ox-reveal)
(setq org-reveal-root "~/emacs.d/elisp/org-reveal")
;; Zotelo
(require 'zotelo)
(add-hook 'TeX-mode-hook 'zotelo-minor-mode)
;;
;; org-html5presentation
(add-to-list 'load-path "~/ruta/directorio/org-html5presentation.el/")
(require 'ox-html5presentation)
;;
;; sparql
;;
(add-to-list 'load-path "~/.emacs.d/elisp/sparql-mode/")
(autoload 'sparql-mode "sparql-mode.el"
"Major mode for editing SPARQL files" t)
(add-to-list 'auto-mode-alist '("\\.sparql$" . sparql-mode))
(add-to-list 'auto-mode-alist '("\\.rq$" . sparql-mode))
;; elpy
(require 'package)
(add-to-list 'package-archives
'("elpy" . "http://jorgenschaefer.github.io/packages/"))
(package-initialize)
(elpy-enable)
;; web-mode
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
(custom-set-variables
;; custom-set-variables 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.
'(max-specpdl-size 32000))
(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.
)