From 101d74779a7f64d2927a5632c3edfbceb5648078 Mon Sep 17 00:00:00 2001 From: contrapunctus Date: Mon, 22 Feb 2021 14:26:57 +0530 Subject: [PATCH] [tex] fix error, move config to init.org --- contrapunctus/cp-tex.el | 35 -------------------------------- init.org | 44 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 36 deletions(-) delete mode 100644 contrapunctus/cp-tex.el diff --git a/contrapunctus/cp-tex.el b/contrapunctus/cp-tex.el deleted file mode 100644 index d8160e9..0000000 --- a/contrapunctus/cp-tex.el +++ /dev/null @@ -1,35 +0,0 @@ -(setq TeX-auto-save t - TeX-parse-self t - TeX-engine 'xetex - ;; 2017-10-14T18:55:05+0530 - TeX-view-program-selection '(((output-dvi has-no-display-manager) - "dvi2tty") - ((output-dvi style-pstricks) - "dvips and gv") - (output-dvi "xdvi") - (output-pdf "Zathura") - (output-html "xdg-open"))) -(add-hook 'tex-mode-hook 'TeX-source-correlate-mode) - -;; 2017-10-19T09:19:34+0530 - these should be merged with -;; cp-forward-def/cp-backward-def in cp-lily... -(defun cp-backward-def () - (interactive) - (push-mark) - (re-search-backward "\\\\scene" nil t) - (beginning-of-line) - (recenter)) - -(defun cp-forward-def () - (interactive) - (push-mark) - (if (not (re-search-forward "\\\\scene" nil t 2)) - (re-search-forward "\\end{document}" nil t)) - (beginning-of-line) - (recenter)) - -(cp-set-keys - :keymap LaTeX-mode-map - :bindings - `((,(kbd "M-p") cp-backward-def) - (,(kbd "M-n") cp-forward-def))) diff --git a/init.org b/init.org index 4ee5b5e..3a98f22 100644 --- a/init.org +++ b/init.org @@ -45,7 +45,12 @@ At first I decided to remap all Emacs, Boon, and Hydra bindings, but it turned o "C-n" 'forward-char "C-t" 'backward-char) (bind-keys - ("C-h" . backward-delete-char)) ;; see also ivy, company + ("C-h" . backward-delete-char) ;; see also ivy, company + :map text-mode-map + ;; Boon already binds xref-find-definitions to f + ;; see also latex-mode + ("M-." forward-sentence) +) ;; ;; The old C-n/C-p/M-n/M-p were not the most comfortable to begin with, so I take this opportunity to bind them to something consistent with Boon (general-def minibuffer-local-map "C-c" 'previous-line @@ -1296,6 +1301,43 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol #+END_SRC +** TODO LaTeX +1. [ ] merge personal commands with those in Lilypond mode +#+BEGIN_SRC emacs-lisp +(use-package auctex + :hook ((tex-mode . TeX-source-correlate-mode)) + :bind (:map LaTeX-mode-map + ("M-c" . cp-backward-def) + ("M-r" . cp-forward-def) + ("M-." forward-sentence)) + :config + (setq TeX-auto-save t + TeX-parse-self t + TeX-engine 'xetex + ;; 2017-10-14T18:55:05+0530 + TeX-view-program-selection '(((output-dvi has-no-display-manager) + "dvi2tty") + ((output-dvi style-pstricks) + "dvips and gv") + (output-dvi "xdvi") + (output-pdf "Zathura") + (output-html "xdg-open"))) + ;; 2017-10-19T09:19:34+0530 - these should be merged with + ;; cp-forward-def/cp-backward-def in cp-lily... + (defun cp-backward-def () + (interactive) + (push-mark) + (re-search-backward "\\\\scene" nil t) + (beginning-of-line) + (recenter)) + (defun cp-forward-def () + (interactive) + (push-mark) + (if (not (re-search-forward "\\\\scene" nil t 2)) + (re-search-forward "\\end{document}" nil t)) + (beginning-of-line) + (recenter))) +#+END_SRC ** Org #+BEGIN_SRC emacs-lisp (use-package org