Make config src blocks silent output by default

Move python hook setting to python use-package block

Use locate-user-emacs-file for resolving paths inside
user-emacs-directory

Update my/open-init-file (was my/open-config-file) for new config structure
This commit is contained in:
Evie Litherland-Smith 2024-02-15 08:45:37 +00:00
parent f44c767eea
commit 5611ea77ff
10 changed files with 17 additions and 9 deletions

View file

@ -2,8 +2,9 @@
#+author: Evie Litherland-Smith #+author: Evie Litherland-Smith
#+email: evie@xenia.me.uk #+email: evie@xenia.me.uk
#+filetags: :emacs:config:org: #+filetags: :emacs:config:org:
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
* Common defaults * Common defaults
#+begin_src emacs-lisp :results output silent #+begin_src emacs-lisp
(setq custom-file (locate-user-emacs-file "custom.el")) (setq custom-file (locate-user-emacs-file "custom.el"))
(when (and custom-file (file-exists-p custom-file)) (when (and custom-file (file-exists-p custom-file))
(load custom-file nil 'nomessage)) (load custom-file nil 'nomessage))
@ -29,11 +30,11 @@
scroll-preserve-screen-position 1) scroll-preserve-screen-position 1)
;; Config file shortcut ;; Config file shortcut
(defun my/open-config-file () (defun my/open-init-file ()
"Open my literate config file" "Open emacs init file"
(interactive) (interactive)
(find-file "~/.emacs/README.org")) (locate-user-emacs-file "init.el"))
(keymap-global-set "C-c w c" #'my/open-config-file) (keymap-global-set "C-c w c" #'my/open-init-file)
;; Scratch buffer shortcut ;; Scratch buffer shortcut

View file

@ -2,6 +2,7 @@
#+author: Evie Litherland-Smith #+author: Evie Litherland-Smith
#+email: evie@xenia.me.uk #+email: evie@xenia.me.uk
#+filetags: :emacs:config:org: #+filetags: :emacs:config:org:
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
* Development Environment * Development Environment
** Miscellaneous ** Miscellaneous
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -38,8 +39,6 @@ Set treesit to fontify all elements, default was 3 (out of 4)
(treesit-auto-add-to-auto-mode-alist) (treesit-auto-add-to-auto-mode-alist)
(global-treesit-auto-mode +1)) (global-treesit-auto-mode +1))
(setq python-ts-mode-hook python-mode-hook)
(with-eval-after-load 'rust-mode (with-eval-after-load 'rust-mode
(setq rust-ts-mode-hook rust-mode-hook)) (setq rust-ts-mode-hook rust-mode-hook))
#+end_src #+end_src
@ -391,7 +390,8 @@ Set fill column to 88 and enable display in python buffers
:custom :custom
(python-check-command "mypy") (python-check-command "mypy")
:config :config
(add-hook 'python-base-mode-hook (lambda () (my/enable-fill-column 88)))) (add-hook 'python-base-mode-hook (lambda () (my/enable-fill-column 88)))
(setq python-ts-mode-hook python-mode-hook))
#+end_src #+end_src
*** Rust *** Rust

View file

@ -2,6 +2,7 @@
#+author: Evie Litherland-Smith #+author: Evie Litherland-Smith
#+email: evie@xenia.me.uk #+email: evie@xenia.me.uk
#+filetags: :emacs:config:org: #+filetags: :emacs:config:org:
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
* Internet * Internet
** Gnus ** Gnus
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes

View file

@ -2,6 +2,7 @@
#+author: Evie Litherland-Smith #+author: Evie Litherland-Smith
#+email: evie@xenia.me.uk #+email: evie@xenia.me.uk
#+filetags: :emacs:config:org: #+filetags: :emacs:config:org:
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
* Media * Media
** EMMS ** EMMS
#+begin_src emacs-lisp #+begin_src emacs-lisp

View file

@ -2,6 +2,7 @@
#+author: Evie Litherland-Smith #+author: Evie Litherland-Smith
#+email: evie@xenia.me.uk #+email: evie@xenia.me.uk
#+filetags: :emacs:config:org: #+filetags: :emacs:config:org:
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
* Org-mode * Org-mode
For reference information, see [[https://orgmode.com][Org-mode website]] For reference information, see [[https://orgmode.com][Org-mode website]]

View file

@ -2,6 +2,7 @@
#+author: Evie Litherland-Smith #+author: Evie Litherland-Smith
#+email: evie@xenia.me.uk #+email: evie@xenia.me.uk
#+filetags: :emacs:config:org: #+filetags: :emacs:config:org:
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
* Password Store * Password Store
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package password-store (use-package password-store

View file

@ -2,6 +2,7 @@
#+author: Evie Litherland-Smith #+author: Evie Litherland-Smith
#+email: evie@xenia.me.uk #+email: evie@xenia.me.uk
#+filetags: :emacs:config:org: #+filetags: :emacs:config:org:
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
* Remote Editing * Remote Editing
** TRAMP ** TRAMP
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes

View file

@ -2,6 +2,7 @@
#+author: Evie Litherland-Smith #+author: Evie Litherland-Smith
#+email: evie@xenia.me.uk #+email: evie@xenia.me.uk
#+filetags: :emacs:config:org: #+filetags: :emacs:config:org:
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
* UI * UI
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq use-dialog-box nil (setq use-dialog-box nil

View file

@ -2,6 +2,7 @@
#+author: Evie Litherland-Smith #+author: Evie Litherland-Smith
#+email: evie@xenia.me.uk #+email: evie@xenia.me.uk
#+filetags: :emacs:config:org: #+filetags: :emacs:config:org:
#+property: header-args:emacs-lisp :tangle yes :mkdirp yes :results output silent
* Doc-view * Doc-view
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(use-package doc-view (use-package doc-view

View file

@ -18,7 +18,7 @@
"config/media.org" ;Music player using `emms' "config/media.org" ;Music player using `emms'
)) ))
(org-babel-load-file (org-babel-load-file
(expand-file-name fname user-emacs-directory))) (locate-user-emacs-file fname)))
(provide 'init) (provide 'init)
;;; init.el ends here ;;; init.el ends here