ccr/.dir-locals.el

27 lines
1.0 KiB
EmacsLisp

;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((org-mode
.
((eval . (progn
(require 'ox-latex)
(setq-local
org-latex-classes
'(("chapter-code"
"\\documentclass{chapter-code}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}"))))))
(eval . (keymap-local-set
"C-c C-t"
(lambda nil
(interactive)
(save-match-data
(let ((string (buffer-string))
(pos 0)
(tag 0))
(while (string-match "<<tag:\\([0-9]+\\)>>" string pos)
(setq tag (max tag
(string-to-number (match-string 1 string)))
pos (match-end 0)))
(insert "<<tag:" (number-to-string (1+ tag)) ">>")))))))))