Compare commits

..

1 Commits

Author SHA1 Message Date
9a20b487c8 Remove journal files config
Don't use these anymore, instead I use my e-ink tablet like a fucking
hipster.
2025-01-08 13:12:58 +00:00
3 changed files with 26 additions and 114 deletions

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "fasm-mode"]
path = fasm-mode
url = https://github.com/GabrielFrigo4/fasm-mode

View File

@@ -399,18 +399,6 @@
(setq org-adapt-indentation t)
#+end_src
* Multiple Cursors
I have been converted by Tsoding.
#+begin_src emacs-lisp
(use-package multiple-cursors
:config
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this))
#+end_src
* Language Integrations
** Generic
Generally, 8-character-wide tabs are not my thing.
@@ -553,6 +541,12 @@
(use-package rust-mode)
#+end_src
Then =rust-analyzer= via LSP does the rest :)
#+begin_src emacs-lisp
(add-hook 'rust-mode-hook #'lsp-deferred)
#+end_src
** Lisps
*** Common Lisp
Use SLIME and Quicklisp for Common Lisp (SBCL).
@@ -797,6 +791,13 @@
(use-package crontab-mode)
#+end_src
** Python
Going to use LSP for Python:
#+begin_src emacs-lisp
(add-hook 'python-mode-hook #'lsp-deferred)
#+end_src
** Ada
*** Old ada-mode
Unfortunately, the =ada-mode= on ELPA is hot garbage. It requires
@@ -1048,55 +1049,6 @@
(add-hook 'before-save-hook 'gofmt-before-save)))
#+end_src
** Forth
#+begin_src emacs-lisp
(use-package forth-mode)
#+end_src
** Fasm
The =fasm-mode= package wasn't on MELPA or ELPA, so I've instead
added it as a submodule of this repo. We therefore need to add it
to the load path:
#+begin_src emacs-lisp
(let* ((home (getenv "HOME"))
(path (concat home "/.emacs.d/fasm-mode")))
(add-to-list 'load-path path))
(autoload 'fasm-mode "fasm-mode")
#+end_src
And then use it for =.asm= files:
#+begin_src emacs-lisp
(add-to-list 'auto-mode-alist '("\\.asm\\'" . fasm-mode))
#+end_src
** OCaml
For some reason the OCaml support package is called =tuareg=??
#+begin_src emacs-lisp
(use-package tuareg)
#+end_src
OCaml also has its own build system, Dune. There's also a mode for
Dune's files:
#+begin_src emacs-lisp
(use-package dune)
#+end_src
** Vala
=vala-mode= provides everything I need:
#+begin_src emacs-lisp
(use-package vala-mode)
#+end_src
** ASN.1
#+begin_src emacs-lisp
(use-package asn1-mode)
#+end_src
* Tool Integrations
** Git
=magit= is truly a wonderful creation! Add keybinding for
@@ -1137,16 +1089,6 @@
leave it at that for now as I'm not sure precisely what behaviour
I'd want.
Magit also doesn't seem to provide a means of specifying the =-S=
flag for commit signing (only =--gpg-sign==) so I need to add that:
#+begin_src emacs-lisp
(eval-after-load 'magit
'(progn
(transient-append-suffix 'magit-commit "-C"
'("-S" "Sign commit" "-S"))))
#+end_src
** Docker
I use docker quite a lot, unfortunately, so it's nice to be able to
spawn containers etc from Emacs. The =docker= package provides a
@@ -1243,7 +1185,7 @@
(setq Man-notify-method 'pushy)
#+end_src
** Script-Fu
** Script-Fu Mode
GIMP has a scheme-based language -- Script-Fu -- built into it that
you can use to script things (based). Sadly, the built-in console
is rather lackluster as a coding environment. Happily, there /is/
@@ -1253,12 +1195,12 @@
It's things like this that make me really glad I switched to Emacs
because this is ridiculously cool. By my definition of "cool"
anyway (what can I say, I'm a massive nerd).
anyway -- what can I say, I'm a massive nerd.
I should probably extract this and make a standalone package out of
it and stick it on Melpa at some point.
*** REPL
*** REPL Mode
The Script-Fu server request format is very simple:
| Bytes | Description |
@@ -1313,7 +1255,7 @@
The response format is similarly simple:
| Bytes | Description |
| Bytes | Content |
|-------+-----------------------------------------|
| 0 | 'G' magic byte (47h) |
| 1 | Status code -- 0 on success, 1 on error |
@@ -1370,8 +1312,8 @@
(interactive)
(let ((buffer (get-buffer-create "*Script-Fu REPL*")))
(when (not (comint-check-proc buffer))
(make-comint-in-buffer "Script-Fu REPL"
buffer script-fu-repl-server)
(make-comint-in-buffer "Script-Fu REPL" buffer
script-fu-repl-server)
(with-current-buffer buffer (script-fu-repl-mode)))
(pop-to-buffer buffer '((display-buffer-in-direction)
(direction . below)
@@ -1379,7 +1321,7 @@
buffer))
#+end_src
*** Code Editing
*** Code Editing Mode
With the client stuff done, we can define the code editing mode:
#+begin_src emacs-lisp
@@ -1387,9 +1329,7 @@
#+end_src
Now to define something to send an expression or region to the
REPL. Since =script-fu-repl= returns the buffer we can use that
to transparently start a REPL or get the existing one if one's
already running.
REPL:
#+begin_src emacs-lisp
(defun script-fu-mode-send-region-or-sexp ()
@@ -1400,19 +1340,21 @@
(buffer-substring-no-properties start end))
(thing-at-point 'sexp t))))
(if (not code) (message "No code to send.")
(let* ((repl-proc (get-buffer-process (script-fu-repl))))
(let* ((repl-buffer (script-fu-repl))
(repl-proc (get-buffer-process repl-buffer)))
(script-fu-repl-send repl-proc code)))))
(define-key script-fu-mode-map (kbd "C-c C-c")
'script-fu-mode-send-region-or-sexp)
#+end_src
And finally, a similar thing for the whole file:
And finally a similar thing for the whole file:
#+begin_src emacs-lisp
(defun script-fu-mode-send-file ()
(interactive)
(let* ((repl-proc (get-buffer-process (script-fu-repl)))
(let* ((repl-buffer (script-fu-repl))
(repl-proc (get-buffer-process repl-buffer))
(buffer-contents
(buffer-substring-no-properties (point-min)
(point-max))))
@@ -1423,23 +1365,6 @@
I think that's all I need for now!
** Maxima
Maxima is an absolutely amazing tool for mathematical symbolic
processing. And to make matters better, it's lispy. It's giving
old school expert system but make it actually astonishingly useful
type shit.
The =maxima= package provides good Emacs integration, with syntax
highlighting for the DSL and a nice inferior process mode for the
interpreter. Files for the DSL conventionally have the ".mac"
extension, so want to open those files in =maxima-mode=.
#+begin_src emacs-lisp
(use-package maxima
:mode ("\\.mac\\'" . maxima-mode)
:interpreter ("maxima" . maxima-mode))
#+end_src
* Backup and Autosave
** Keep $PWD Tidy
Emacs' default behaviour of dumping temporary files in the current
@@ -1504,15 +1429,6 @@
#+end_src
* Misc
** Global key for [[help:align-regexp][align-regexp]]
I didn't know it was a thing but now that I do, I need a
keybinding. Hopefully it doesn't conflict with too many things
haha.
#+begin_src emacs-lisp
(global-set-key (kbd "C-c a") 'align-regexp)
#+end_src
** God mode
God mode essentially makes Emacs a bit more VI-like by introducing
a mode where modifier keys are implicitly held down, thereby

Submodule fasm-mode deleted from d6578064bc