From 6f1eb587b3abbb005b1f6cf0e9ac6281f0a89002 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Mon, 28 Oct 2019 18:36:21 +0000 Subject: Add to paths and set visual lines mode --- emacs/loader.org | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) (limited to 'emacs') diff --git a/emacs/loader.org b/emacs/loader.org index 3ebff75..8f5e39b 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -37,20 +37,22 @@ be manually set inside emacs. #+BEGIN_SRC emacs-lisp (setenv "PATH" (concat - "/home/yannherklotz/.local/bin" ":" - "/home/yannherklotz/.yarn/bin" ":" + "/home/ymherklotz/.local/bin" ":" + "/home/ymherklotz/.yarn/bin" ":" "/usr/bin/vendor_perl" ":" - "/home/yannherklotz/.opam/4.09.0/bin" ":" + "/home/ymherklotz/.opam/ocaml-base-compiler.4.09.0/bin" ":" + "/home/ymherklotz/.nix-profile/bin" ":" (getenv "PATH"))) (setq exec-path (append - '("/home/yannherklotz/.opam/4.09.0/bin" - "/home/yannherklotz/.local/bin" - "/home/yannherklotz/.yarn/bin") + '("/home/ymherklotz/.opam/ocaml-base-compiler.4.09.0/bin" + "/home/ymherklotz/.local/bin" + "/home/ymherklotz/.yarn/bin" + "/home/ymherklotz/.nix-profile/bin") exec-path)) #+END_SRC #+RESULTS: -| /home/yannherklotz/.opam/4.09.0/bin | /home/yannherklotz/.local/bin | /home/yannherklotz/.yarn/bin | /home/yannherklotz/.opam/4.09.0/bin | /home/yannherklotz/.local/bin | /home/yannherklotz/.yarn/bin | /home/yannherklotz/.opam/4.09.0/bin | /home/yannherklotz/.cargo/bin | /home/yannherklotz/.local/bin | /home/yannherklotz/.yarn/bin | /usr/bin | /home/yannherklotz/.gem/ruby/2.6.0/bin | /usr/local/bin | /home/yannherklotz/.nix-profile/bin | /nix/var/nix/profiles/default/bin | /usr/local/sbin | /usr/local/bin | /usr/bin | /opt/clojurescript/bin | /usr/lib/jvm/default/bin | /usr/bin/site_perl | /usr/bin/vendor_perl | /usr/bin/core_perl | /opt/Xilinx/Vivado/2019.1/bin | /opt/intelFPGA_lite/18.1/quartus/bin | /usr/lib/emacs/26.3/x86_64-pc-linux-gnu | +| /home/ymherklotz/.opam/ocaml-base-compiler.4.09.0/bin | /home/ymherklotz/.local/bin | /home/ymherklotz/.yarn/bin | /home/ymherklotz/.nix-profile/bin | /home/ymherklotz/.opam/ocaml-base-compiler.4.09.0/bin | /home/ymherklotz/.local/bin | /home/ymherklotz/.yarn/bin | /home/ymherklotz/.nix-profile/bin | /home/yannherklotz/.opam/4.09.0/bin | /home/yannherklotz/.local/bin | /home/yannherklotz/.yarn/bin | /home/ymherklotz/.cargo/bin | /home/ymherklotz/.local/bin | /home/ymherklotz/.yarn/bin | /usr/bin | /home/ymherklotz/.gem/ruby/2.6.0/bin | /usr/local/bin | /usr/local/sbin | /usr/local/bin | /usr/bin | /usr/bin/site_perl | /usr/bin/vendor_perl | /usr/bin/core_perl | /opt/Xilinx/Vivado/2019.1/bin | /opt/intelFPGA_lite/18.1/quartus/bin | /usr/lib/emacs/26.3/x86_64-pc-linux-gnu | Define a function to load a user file whenever I want to add configurations that are not pushed as part of this configuration file. This includes a private file @@ -153,6 +155,10 @@ buffer instead. #+RESULTS: : org-capture +#+begin_src emacs-lisp + (global-visual-line-mode t) +#+end_src + *** Custom modeline Editing the modeline. ~%c~ might be a bit slow though, so that could be removed @@ -686,11 +692,6 @@ incrementally selecting more and more of the text. * Writing -#+BEGIN_SRC emacs-lisp - (add-hook 'text-mode-hook (lambda () - (auto-fill-mode 1))) -#+END_SRC - ** Spellcheck in emacs #+BEGIN_SRC emacs-lisp (use-package flyspell @@ -930,8 +931,15 @@ Add org noter #+BEGIN_SRC emacs-lisp (use-package pdf-tools - :hook (doc-view-mode . pdf-view-mode) - :commands pdf-view-mode) + :config + ;; initialise + (pdf-tools-install) + ;; open pdfs scaled to fit page + (setq-default pdf-view-display-size 'fit-page) + ;; automatically annotate highlights + (setq pdf-annot-activate-created-annotations t) + ;; use normal isearch + (define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward)) #+END_SRC #+RESULTS: @@ -1092,7 +1100,9 @@ Adding hook to clojure mode to enable strict parentheses mode. #+begin_src emacs-lisp (use-package proof-general :config - (setq coq-compile-before-require t)) + (setq coq-compile-before-require t) + (defadvice proof-goto-point (after adjust-window-in-proof) + (golden-ratio))) #+end_src #+RESULTS: @@ -1155,8 +1165,8 @@ Haskell mode with company mode completion. (setq haskell-indentation-layout-offset 4 haskell-indentation-starter-offset 4 haskell-indentation-left-offset 4 - haskell-indentation-where-pre-offset 4 - haskell-indentation-where-post-offset 4)) + haskell-indentation-where-pre-offset 2 + haskell-indentation-where-post-offset 2)) (use-package interactive-haskell-mode @@ -1165,7 +1175,7 @@ Haskell mode with company mode completion. #+END_SRC #+RESULTS: -| (lambda nil (local-set-key (kbd C-c v) (quote haskell-add-import))) | (lambda nil (set (make-local-variable (quote projectile-tags-command)) hasktags -Re -f "%s" %s "%s")) | (lambda nil (local-set-key (kbd C-c y a) (quote y/haskell-align-comment))) | haskell-decl-scan-mode | interactive-haskell-mode | +| (lambda nil (set (make-local-variable (quote projectile-tags-command)) hasktags -Re -f "%s" %s "%s")) | (lambda nil (local-set-key (kbd C-c v) (quote haskell-add-import))) | (lambda nil (local-set-key (kbd C-c y a) (quote y/haskell-align-comment))) | haskell-decl-scan-mode | interactive-haskell-mode | *** Python Elpy package for python, which provides an IDE type environment for python. @@ -1312,10 +1322,6 @@ Shamelessly taken from https://github.com/alphapapa/unpackaged.el#hydra. Keybindings #+BEGIN_SRC emacs-lisp - (use-package solarized-theme - :config - (setq solarized-use-variable-pitch nil)) - (defun y/set-theme (theme) (load-theme theme t) (toggle-scroll-bar -1)) -- cgit From 71d5ceacca8ff456a99af122ac4e55bc185d66c2 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 29 Oct 2019 01:46:22 +0000 Subject: Change to loader.org --- emacs/loader.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'emacs') diff --git a/emacs/loader.org b/emacs/loader.org index 8f5e39b..c840641 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -352,8 +352,8 @@ programming and looking at source code. #+END_SRC #+BEGIN_SRC emacs-lisp - (set-default-font "Iosevka Medium-14") - (setq default-frame-alist '((font . "Iosevka Medium-14"))) + (set-default-font "Iosevka Medium-12") + (setq default-frame-alist '((font . "Iosevka Medium-12"))) #+END_SRC #+RESULTS: -- cgit From 1fdb0e5e704277d08e35264d9814de730774769e Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Mon, 11 Nov 2019 16:28:20 +0000 Subject: Remove golden ratio mode and add shell-escape --- emacs/loader.org | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'emacs') diff --git a/emacs/loader.org b/emacs/loader.org index c840641..eccce44 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -504,9 +504,9 @@ Set navigation commands in all the buffers (interactive) (other-window -1)) - (use-package golden-ratio - :config - (golden-ratio-mode)) +;; (use-package golden-ratio +;; :config +;; (golden-ratio-mode)) (defun push-mark-no-activate () "Pushes `point' to `mark-ring' and does not activate the region @@ -725,7 +725,7 @@ incrementally selecting more and more of the text. (setq TeX-engine 'xetex) (setq TeX-auto-save t) (setq TeX-parse-self t) - (setq TeX-command-extra-options "-shell-escape") + (setq-default TeX-command-extra-options "-shell-escape") (setq TeX-save-query nil) (setq-default TeX-master nil) (setq TeX-PDF-mode t) -- cgit From 68be31ef3b5e2ff1a6fac7d20d104b4f114b7050 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 24 Jan 2020 13:22:33 +0000 Subject: Add hol mode if it is there and remove bell --- emacs/loader.org | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'emacs') diff --git a/emacs/loader.org b/emacs/loader.org index eccce44..a6ca782 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -129,6 +129,7 @@ buffer instead. (fset 'yes-or-no-p 'y-or-n-p) (global-hl-line-mode 1) (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/") + (setq ring-bell-function 'ignore) #+END_SRC #+RESULTS: @@ -690,6 +691,12 @@ incrementally selecting more and more of the text. #+RESULTS: +** Tramp + +#+begin_src emacs-lisp + (setq tramp-default-method "ssh") +#+end_src + * Writing ** Spellcheck in emacs @@ -864,7 +871,8 @@ Add org noter #+BEGIN_SRC emacs-lisp (setq org-capture-templates '(("t" "todo" entry (file+headline "~/Dropbox/org/inbox.org" "Tasks") - "* TODO %?\n\n%i\n%a\n\n"))) + "* TODO %?\n\n%i\n%a\n\n") + ())) #+END_SRC *** Agenda @@ -1177,6 +1185,14 @@ Haskell mode with company mode completion. #+RESULTS: | (lambda nil (set (make-local-variable (quote projectile-tags-command)) hasktags -Re -f "%s" %s "%s")) | (lambda nil (local-set-key (kbd C-c v) (quote haskell-add-import))) | (lambda nil (local-set-key (kbd C-c y a) (quote y/haskell-align-comment))) | haskell-decl-scan-mode | interactive-haskell-mode | +*** HOL + +#+begin_src emacs-lisp + (when (file-exists-p "/opt/hol/tools/hol-mode.el") + (setq hol-executable "/opt/hol/bin/hol") + (load "/opt/hol/tools/hol-mode.el")) +#+end_src + *** Python Elpy package for python, which provides an IDE type environment for python. -- cgit From 66f40f2cc76af0f40a9c25c2b142deed9194ae69 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 4 Feb 2020 11:58:10 +0000 Subject: Remove nix and add smt mode --- emacs/loader.org | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'emacs') diff --git a/emacs/loader.org b/emacs/loader.org index a6ca782..6027255 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -129,6 +129,7 @@ buffer instead. (fset 'yes-or-no-p 'y-or-n-p) (global-hl-line-mode 1) (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/") + (add-to-list 'load-path "~/.emacs.d/modes/") (setq ring-bell-function 'ignore) #+END_SRC @@ -680,17 +681,6 @@ incrementally selecting more and more of the text. (use-package yasnippet-snippets) #+END_SRC - -** Nix - -#+BEGIN_SRC emacs-lisp - (use-package direnv - :config - (direnv-mode)) -#+END_SRC - -#+RESULTS: - ** Tramp #+begin_src emacs-lisp @@ -1249,6 +1239,13 @@ JSON files should be opened in js-mode. (setq sh-indentation 2) #+END_SRC +*** SMTLIBv2 + +#+begin_src emacs-lisp + (require 'smtlib-mode) + (add-to-list 'auto-mode-alist '("\\.smt\\'" . smtlib-mode)) +#+end_src + *** Verilog #+begin_src emacs-lisp -- cgit From 23e6b87b41afa7cdbfdc8f9ad99e65306ce686b9 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Mon, 16 Mar 2020 18:22:06 +0000 Subject: Clean config, remove splash-screen --- emacs/loader.org | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'emacs') diff --git a/emacs/loader.org b/emacs/loader.org index 6027255..2808490 100644 --- a/emacs/loader.org +++ b/emacs/loader.org @@ -137,6 +137,8 @@ buffer instead. : t #+BEGIN_SRC emacs-lisp + (global-unset-key (kbd "C-z")) + (global-set-key (kbd "M-u") #'upcase-dwim) (global-set-key (kbd "M-l") #'downcase-dwim) (global-set-key (kbd "M-c") #'capitalize-dwim) @@ -154,9 +156,6 @@ buffer instead. (global-set-key (kbd "C-c c") #'org-capture) #+END_SRC -#+RESULTS: -: org-capture - #+begin_src emacs-lisp (global-visual-line-mode t) #+end_src @@ -498,6 +497,15 @@ Define utility functions to make the reader work. : y/elfeed-save-db-and-bury * Utility +** Zettelkasten + +#+begin_src emacs-lisp + (when (file-directory-p "~/projects/emacs-zettelkasten") + (add-to-list 'load-path "~/projects/emacs-zettelkasten") + (require 'zettelkasten) + (zettelkasten-mode t)) +#+end_src + ** Navigation Set navigation commands in all the buffers @@ -837,7 +845,7 @@ Add org noter (use-package org-noter :after org :config (setq org-noter-default-notes-file-names '("notes.org") - org-noter-notes-search-path '("~/org/research") + org-noter-notes-search-path '("~/org/bibliography") org-noter-separate-notes-from-heading t)) (use-package org-ref @@ -849,14 +857,21 @@ Add org noter :config (setq org-ref-bibliography-notes "~/Dropbox/bibliography/notes.org" org-ref-default-bibliography '("~/Dropbox/bibliography/references.bib") - org-ref-pdf-directory "~/Dropbox/bibliography/bibtex-pdfs/") - (setq org-latex-pdf-process (list "latexmk -shell-escape -bibtex -f -pdf %f")) + org-ref-pdf-directory "~/Dropbox/bibliography/papers/") (setq org-ref-completion-library 'org-ref-ivy-cite)) #+END_SRC #+RESULTS: : org-ref-bibtex-hydra/body +*** Org ID + +#+begin_src emacs-lisp + (use-package org-id + :ensure nil + :after org) +#+end_src + *** Templates #+BEGIN_SRC emacs-lisp (setq org-capture-templates @@ -917,14 +932,12 @@ Add org noter (set-register ?c (cons 'file (format-time-string "~/Dropbox/org/journals/%Y-%m.org"))) #+END_SRC -#+RESULTS: -: (file . ~/Dropbox/org/journals/2019-09.org) - *** Exporting #+BEGIN_SRC emacs-lisp (use-package ox-twbs) - #+EN +#+END_SRC + ** PDF Tools #+BEGIN_SRC emacs-lisp @@ -1099,8 +1112,7 @@ Adding hook to clojure mode to enable strict parentheses mode. (use-package proof-general :config (setq coq-compile-before-require t) - (defadvice proof-goto-point (after adjust-window-in-proof) - (golden-ratio))) + (setq proof-splash-enable nil)) #+end_src #+RESULTS: @@ -1157,7 +1169,6 @@ Haskell mode with company mode completion. (set (make-local-variable 'projectile-tags-command) "hasktags -Re -f \"%s\" %s \"%s\""))) (setq ;;haskell-mode-stylish-haskell-path "brittany" - haskell-stylish-on-save t flycheck-ghc-language-extensions '("OverloadedStrings")) (setq haskell-indentation-layout-offset 4 -- cgit