From 64b698633c8503562d1a1c66d6dd3d28037e04b5 Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Fri, 2 Aug 2024 13:23:26 +0200 Subject: [PATCH] fix the size of popup buffers to 10 lines. Fit window was often too small and that makes the window irritating. --- init.org | 192 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 109 insertions(+), 83 deletions(-) diff --git a/init.org b/init.org index bda569c..e53fb01 100644 --- a/init.org +++ b/init.org @@ -96,7 +96,7 @@ then load it. (load custom-file nil :nomessage)) #+END_SRC -** Crafted Emacs +* Crafted Emacs When I could not solve the persistent slowness I experienced on Windows using Doom Emacs, I wanted to switch to a more hands-on @@ -107,7 +107,7 @@ August '22 it was renamed to Crafted Emacs which prompted a I used for a quite a long term Doom on Linux and Rational/Crafted on Windows till I was comfortable enough and not started Doom anymore. -*** Initialize Crafted Emacs +** Initialize Crafted Emacs Loads the Crafted Emacs initialization configuration: @@ -118,7 +118,7 @@ Loads the Crafted Emacs initialization configuration: #+END_SRC -*** Add and configure packages and load crafted and custom modules +** Add and configure packages and load crafted and custom modules Lists and installs a variety of packages and includes custom configurations for them: #+BEGIN_SRC emacs-lisp @@ -144,8 +144,8 @@ Lists and installs a variety of packages and includes custom configurations for #+RESULTS: : pti-org-config -** Integration with Environment -*** Set default Coding System to Use UTF-8 Everywhere +* Integration with Environment +** Set default Coding System to Use UTF-8 Everywhere Ensures UTF-8 is the default coding system everywhere. @@ -195,7 +195,7 @@ Here’s a breakdown of what each line does: etc... . -*** Set Path from shell configuration +** Set Path from shell configuration In order to get the paths in Emacs to be consistent with the ones in the terminals we get them from a started shell instead of the current environment which can be considerably different in X, Wayland or on @@ -209,7 +209,7 @@ Mac because the shell initialization scripts have not run yet. :if (or (daemonp) (memq window-system '(mac ns x))) :config (exec-path-from-shell-initialize)) #+END_SRC -*** Setup backup directories +** Setup backup directories Configures where backup files are stored: #+BEGIN_SRC emacs-lisp ;; setup backup directories @@ -218,7 +218,7 @@ Configures where backup files are stored: `(("." . ,(file-name-concat user-emacs-directory "backups")))) #+END_SRC -*** Enable integration with the Unix Password Store aka *pass* +** Enable integration with the Unix Password Store aka *pass* The *pass* command gives a super practical way to store secrets encrypted using *gpg* and use them in *.envrc* files, batch scripts on the command line and, of course, in *Emacs*. @@ -237,7 +237,7 @@ some finagling to map the parts on the name in the pass system. - [[https://www.passwordstore.org/][Pass Website]] - [[info:auth#The Unix password store][auth#The Unix password store in the info pages]] -**** Use of Pass Secrets in ELisp +*** Use of Pass Secrets in ELisp It is very convenient to get secrets from this store (once gpg is set up, which a totally different can of worms). A function @@ -250,7 +250,7 @@ up, which a totally different can of worms). A function #+RESULTS: : shht!secret -*** GUIX support +** GUIX support [[https://gitlab.com/emacs-guix/emacs-guix][Emacs-guix]] is a module to interact with the guix system and help manage packages and profiles. It also offers support for creating @@ -266,8 +266,8 @@ I find it a bit a confusing module. It provides a minor-mode -** Editor Features -*** Evil Vim Keybindings +* Editor Features +** Evil Vim Keybindings I configure all my apps to use vim keybindings if possible to maximise muscle memory. @@ -329,8 +329,8 @@ muscle memory. (evil-define-key 'normal 'global (kbd "h") (pti-harpoon-map)))) #+END_SRC -*** User Interface -**** Do not show default splash screen +** User Interface +*** Do not show default splash screen #+BEGIN_SRC emacs-lisp ;; Show splash screen (unless crafted-startup-inhibit-splash @@ -346,7 +346,7 @@ muscle memory. (message "Emacs started in %s." (emacs-init-time)))) #+END_SRC -**** Configure Fonts with Fontaine +*** Configure Fonts with Fontaine #+BEGIN_SRC emacs-lisp ;; @@ -402,7 +402,7 @@ muscle memory. (add-hook 'after-make-frame-functions #'pti-configure-fonts))) #+END_SRC -**** Update configuration of each created frame +*** Update configuration of each created frame When running as daemon there is no graphical context. This means that all graphical related settings cannot be set properly at initial @@ -432,7 +432,7 @@ screen. (pti-display-tweaks) #+END_SRC -**** Set Theme +*** Set Theme #+BEGIN_SRC emacs-lisp ;; Set theme (use-package modus-themes @@ -469,36 +469,46 @@ There is a keybinding on ** to toggle between light and dark mode. #+RESULTS: : modus-themes-toggle -**** Limit Height of Selected Popup Windows +*** Limit Height of Selected Popup Windows #+BEGIN_SRC emacs-lisp - (push '("\\*Occur\\*" ;; display-buffer functions, first one that succeeds is used (display-buffer-reuse-mode-window display-buffer-below-selected) ;; Parameters - (window-height . (lambda (window) (fit-window-to-buffer window 12)))) ;; fit window, max 12 lines + (window-height . 10)) display-buffer-alist) (push '("\\*Warnings\\*" ;; display-buffer functions, first one that succeeds is used (display-buffer-reuse-mode-window display-buffer-below-selected) ;; Parameters - (window-height . (lambda (window) (fit-window-to-buffer window 12)))) ;; fit window, max 12 lines + (window-height . 10)) display-buffer-alist) (push '("\\*Geiser Debug\\*" ;; display-buffer functions, first one that succeeds is used (display-buffer-reuse-mode-window display-buffer-below-selected) ;; Parameters - (window-height . (lambda (window) (fit-window-to-buffer window 12)))) ;; fit window, max 12 lines + (window-height . 10)) display-buffer-alist) ;; set custom info folder (add-to-list 'Info-default-directory-list "~/.local/share/info/") #+END_SRC -*** Yasnippet configuration +#+RESULTS: +| ~/.local/share/info/ | + +a quick way to test this it to generate a warning with +#+BEGIN_SRC emacs-lisp :tangle no + (warn "This is a warning") +#+END_SRC + +#+RESULTS: +: t + +** Yasnippet configuration Enables and configures Yasnippet, a template system for Emacs: #+BEGIN_SRC emacs-lisp ;; configure yasnippet @@ -509,7 +519,7 @@ Enables and configures Yasnippet, a template system for Emacs: (yas-global-mode 1)) #+END_SRC -*** Enable LLM access with Ellama +** Enable LLM access with Ellama Configures access to language models using Ellama. I don't know whether to put it under writing, comms or programming as it is equally /useful(?)/ for either activity. So I promoted it to an Editor feature. @@ -540,12 +550,12 @@ whether to put it under writing, comms or programming as it is equally It seems the *gpt-4o* model provides better responses. I should investigate local models more. -*** Dired Configuration +** Dired Configuration Enables an alternative file navigation behavior in Dired, Emacs' directory editor: #+BEGIN_SRC emacs-lisp (put 'dired-find-alternate-file 'disabled nil) #+END_SRC -*** Use Magit for version control +** Use Magit for version control #+BEGIN_SRC emacs-lisp ;; default to magit for version control (use-package magit @@ -556,7 +566,7 @@ Enables an alternative file navigation behavior in Dired, Emacs' directory edito (" p v" . magit-status))) #+END_SRC -*** Better EDiff support +** Better EDiff support #+BEGIN_SRC emacs-lisp ;; better ediff setting suggested by cwebber (use-package ediff @@ -570,7 +580,7 @@ Enables an alternative file navigation behavior in Dired, Emacs' directory edito #+RESULTS: : t -*** Replace normal Buffer Support with IBuffer +** Replace normal Buffer Support with IBuffer #+BEGIN_SRC emacs-lisp ;;; enhance ibuffer with ibuffer-project if it is available. (defun crafted-ide-enhance-ibuffer-with-ibuffer-project () @@ -585,7 +595,7 @@ Enables an alternative file navigation behavior in Dired, Emacs' directory edito (ibuffer-mode . crafted-ide-enhance-ibuffer-with-ibuffer-project) :bind (("C-x C-b" . #'ibuffer))) #+END_SRC -*** Enable EditorConfig Standard Support +** Enable EditorConfig Standard Support #+BEGIN_SRC emacs-lisp ;;; load editorconfig support (use-package editorconfig @@ -596,7 +606,7 @@ Enables an alternative file navigation behavior in Dired, Emacs' directory edito #+RESULTS: | editorconfig-mode | -*** Enable Direnv Integration +** Enable Direnv Integration Direnv is the key to have isolated project folders which maintain their own bubble to support whatever is done in that folder. - set environment variables @@ -615,10 +625,10 @@ Emacs' direnv module gives first class support to Emacs projects so they use the This enables direnv globally. -** Writing -*** Org Mode +* Writing +** Org Mode -**** Mixed Pitch Support by Default in Org +*** Mixed Pitch Support by Default in Org #+BEGIN_SRC emacs-lisp (defun pti-org-mode-config () "Set options for better writing in org buffers." @@ -641,7 +651,7 @@ This enables direnv globally. #+RESULTS: : [nil 26279 36119 854408 nil elpaca-process-queues nil nil 376000 nil] -**** Org Configuration +*** Org Configuration #+BEGIN_SRC emacs-lisp (use-package org :ensure nil @@ -678,7 +688,7 @@ This enables direnv globally. #+RESULTS: : ((\.org\' . org) (\.rs\' . rust-mode) (\.ya?ml\' . yaml-ts-mode) (\.ts\' . typescript-ts-mode) (\.tsx\' . tsx-ts-mode) (\.toml\' . toml-ts-mode) (\.rs\' . rust-ts-mode) (\(?:\.\(?:rbw?\|ru\|rake\|thor\|jbuilder\|rabl\|gemspec\|podspec\)\|/\(?:Gem\|Rake\|Cap\|Thor\|Puppet\|Berks\|Brew\|Vagrant\|Guard\|Pod\)file\)\' . ruby-ts-mode) (\.py[iw]?\' . python-ts-mode) (\.lua\' . lua-ts-mode) (\.json\' . json-ts-mode) (\.js\' . js-ts-mode) (\.java\' . java-ts-mode) (\.html\' . html-ts-mode) (\.heex\' . heex-ts-mode) (go\.mod\' . go-mod-ts-mode) (\.go\' . go-ts-mode) (\.ex\' . elixir-ts-mode) ([/\]\(?:Containerfile\|Dockerfile\)\(?:\.[^/\]*\)?\' . dockerfile-ts-mode) (\.css\' . css-ts-mode) (\.cpp\' . c++-ts-mode) (\.cmake\' . cmake-ts-mode) (\.cs\' . csharp-ts-mode) (\.c\' . c-ts-mode) (\.sh\' . bash-ts-mode) (\.tf\(vars\)?\' . terraform-mode) (\.nomad\' . hcl-mode) (\.hcl\' . hcl-mode) ([./]opam_?\' . tuareg-opam-mode) (\.mly\' . tuareg-menhir-mode) (\.eliomi?\' . tuareg-mode) (\.ml[ip]?\' . tuareg-mode) (\.rs\' . rustic-mode) (\.envrc\' . direnv-envrc-mode) (/git-rebase-todo\' . git-rebase-mode) (/guix/drvs/[[:alnum:]]\{2\}/[[:alnum:]]\{30\}-\(?:[+._[:alnum:]-]+\)\.drv\' . guix-build-log-mode) (/gnu/store/\(?:[+._[:alnum:]-]+\)\.drv\' . guix-derivation-mode) (/etc/profile\' . guix-env-var-mode) (/tmp/guix-build-\(?:[+._[:alnum:]-]+\)\.drv-[[:digit:]]+/environment-variables\' . guix-env-var-mode) (/guix/profiles/system\(?:[+._[:alnum:]-]+\)*/\(?:boot\|parameters\)\' . guix-scheme-mode) (/gnu/store/\(?:[0-9a-df-np-sv-z]\{32\}\)-\(?:activate\|activate-service\|boot\|parameters\|shepherd\.conf\|shepherd\(?:[+._[:alnum:]-]+\)\.scm\|\(?:[+._[:alnum:]-]+\)-builder\)\' . guix-scheme-mode) (\(?:build\|profile\)\.boot\' . clojure-mode) (\.cljs\' . clojurescript-mode) (\.cljc\' . clojurec-mode) (\.\(clj\|cljd\|dtm\|edn\|lpy\)\' . clojure-mode) (\.\(?:md\|markdown\|mkd\|mdown\|mkdn\|mdwn\)\' . markdown-mode) (\.hva\' . LaTeX-mode) (\.gpg\(~\|\.~[0-9]+~\)?\' nil epa-file) (\.elc\' . elisp-byte-code-mode) (\.zst\' nil jka-compr) (\.dz\' nil jka-compr) (\.xz\' nil jka-compr) (\.lzma\' nil jka-compr) (\.lz\' nil jka-compr) (\.g?z\' nil jka-compr) (\.bz2\' nil jka-compr) (\.Z\' nil jka-compr) (\.editorconfig\' . editorconfig-conf-mode) (\.vr[hi]?\' . vera-mode) (\(?:\.\(?:rbw?\|ru\|rake\|thor\|axlsx\|jbuilder\|rabl\|gemspec\|podspec\)\|/\(?:Gem\|Rake\|Cap\|Thor\|Puppet\|Berks\|Brew\|Fast\|Vagrant\|Guard\|Pod\)file\)\' . ruby-mode) (\.re?st\' . rst-mode) (/\(?:Pipfile\|\.?flake8\)\' . conf-mode) (\.py[iw]?\' . python-mode) (\.m\' . octave-maybe-mode) (\.less\' . less-css-mode) (\.scss\' . scss-mode) (\.cs\' . csharp-mode) (\.awk\' . awk-mode) (\.\(u?lpc\|pike\|pmod\(\.in\)?\)\' . pike-mode) (\.idl\' . idl-mode) (\.java\' . java-mode) (\.m\' . objc-mode) (\.ii\' . c++-mode) (\.i\' . c-mode) (\.lex\' . c-mode) (\.y\(acc\)?\' . c-mode) (\.h\' . c-or-c++-mode) (\.c\' . c-mode) (\.\(CC?\|HH?\)\' . c++-mode) (\.[ch]\(pp\|xx\|\+\+\)\' . c++-mode) (\.\(cc\|hh\)\' . c++-mode) (\.\(bat\|cmd\)\' . bat-mode) (\.[sx]?html?\(\.[a-zA-Z_]+\)?\' . mhtml-mode) (\.svgz?\' . image-mode) (\.svgz?\' . xml-mode) (\.x[bp]m\' . image-mode) (\.x[bp]m\' . c-mode) (\.p[bpgn]m\' . image-mode) (\.tiff?\' . image-mode) (\.gif\' . image-mode) (\.png\' . image-mode) (\.jpe?g\' . image-mode) (\.webp\' . image-mode) (\.te?xt\' . text-mode) (\.[tT]e[xX]\' . tex-mode) (\.ins\' . tex-mode) (\.ltx\' . latex-mode) (\.dtx\' . doctex-mode) (\.org\' . org-mode) (\.dir-locals\(?:-2\)?\.el\' . lisp-data-mode) (\.eld\' . lisp-data-mode) (eww-bookmarks\' . lisp-data-mode) (tramp\' . lisp-data-mode) (/archive-contents\' . lisp-data-mode) (places\' . lisp-data-mode) (\.emacs-places\' . lisp-data-mode) (\.el\' . emacs-lisp-mode) (Project\.ede\' . emacs-lisp-mode) (\(?:\.\(?:scm\|sls\|sld\|stk\|ss\|sch\)\|/\.guile\)\' . scheme-mode) (\.l\' . lisp-mode) (\.li?sp\' . lisp-mode) (\.[fF]\' . fortran-mode) (\.for\' . fortran-mode) (\.p\' . pascal-mode) (\.pas\' . pascal-mode) (\.\(dpr\|DPR\)\' . delphi-mode) (\.\([pP]\([Llm]\|erl\|od\)\|al\)\' . perl-mode) (Imakefile\' . makefile-imake-mode) (Makeppfile\(?:\.mk\)?\' . makefile-makepp-mode) (\.makepp\' . makefile-makepp-mode) (\.mk\' . makefile-gmake-mode) (\.make\' . makefile-gmake-mode) ([Mm]akefile\' . makefile-gmake-mode) (\.am\' . makefile-automake-mode) (\.texinfo\' . texinfo-mode) (\.te?xi\' . texinfo-mode) (\.[sS]\' . asm-mode) (\.asm\' . asm-mode) (\.css\' . css-mode) (\.mixal\' . mixal-mode) (\.gcov\' . compilation-mode) (/\.[a-z0-9-]*gdbinit . gdb-script-mode) (-gdb\.gdb . gdb-script-mode) ([cC]hange\.?[lL]og?\' . change-log-mode) ([cC]hange[lL]og[-.][0-9]+\' . change-log-mode) (\$CHANGE_LOG\$\.TXT . change-log-mode) (\.scm\.[0-9]*\' . scheme-mode) (\.[ckz]?sh\'\|\.shar\'\|/\.z?profile\' . sh-mode) (\.bash\' . sh-mode) (/PKGBUILD\' . sh-mode) (\(/\|\`\)\.\(bash_\(profile\|history\|log\(in\|out\)\)\|z?log\(in\|out\)\)\' . sh-mode) (\(/\|\`\)\.\(shrc\|zshrc\|m?kshrc\|bashrc\|t?cshrc\|esrc\)\' . sh-mode) (\(/\|\`\)\.\([kz]shenv\|xinitrc\|startxrc\|xsession\)\' . sh-mode) (\.m?spec\' . sh-mode) (\.m[mes]\' . nroff-mode) (\.man\' . nroff-mode) (\.sty\' . latex-mode) (\.cl[so]\' . latex-mode) (\.bbl\' . latex-mode) (\.bib\' . bibtex-mode) (\.bst\' . bibtex-style-mode) (\.sql\' . sql-mode) (\(acinclude\|aclocal\|acsite\)\.m4\' . autoconf-mode) (\.m[4c]\' . m4-mode) (\.mf\' . metafont-mode) (\.mp\' . metapost-mode) (\.vhdl?\' . vhdl-mode) (\.article\' . text-mode) (\.letter\' . text-mode) (\.i?tcl\' . tcl-mode) (\.exp\' . tcl-mode) (\.itk\' . tcl-mode) (\.icn\' . icon-mode) (\.sim\' . simula-mode) (\.mss\' . scribe-mode) (\.f9[05]\' . f90-mode) (\.f0[38]\' . f90-mode) (\.indent\.pro\' . fundamental-mode) (\.\(pro\|PRO\)\' . idlwave-mode) (\.srt\' . srecode-template-mode) (\.prolog\' . prolog-mode) (\.tar\' . tar-mode) (\.\(arc\|zip\|lzh\|lha\|zoo\|[jew]ar\|xpi\|rar\|cbr\|7z\|squashfs\|ARC\|ZIP\|LZH\|LHA\|ZOO\|[JEW]AR\|XPI\|RAR\|CBR\|7Z\|SQUASHFS\)\' . archive-mode) (\.oxt\' . archive-mode) (\.\(deb\|[oi]pk\)\' . archive-mode) (\`/tmp/Re . text-mode) (/Message[0-9]*\' . text-mode) (\`/tmp/fol/ . text-mode) (\.oak\' . scheme-mode) (\.sgml?\' . sgml-mode) (\.x[ms]l\' . xml-mode) (\.dbk\' . xml-mode) (\.dtd\' . sgml-mode) (\.ds\(ss\)?l\' . dsssl-mode) (\.js[mx]?\' . javascript-mode) (\.har\' . javascript-mode) (\.json\' . js-json-mode) (\.[ds]?va?h?\' . verilog-mode) (\.by\' . bovine-grammar-mode) (\.wy\' . wisent-grammar-mode) (\.erts\' . erts-mode) ([:/\]\..*\(emacs\|gnus\|viper\)\' . emacs-lisp-mode) (\`\..*emacs\' . emacs-lisp-mode) ([:/]_emacs\' . emacs-lisp-mode) (/crontab\.X*[0-9]+\' . shell-script-mode) (\.ml\' . lisp-mode) (\.ld[si]?\' . ld-script-mode) (ld\.?script\' . ld-script-mode) (\.xs\' . c-mode) (\.x[abdsru]?[cnw]?\' . ld-script-mode) (\.zone\' . dns-mode) (\.soa\' . dns-mode) (\.asd\' . lisp-mode) (\.\(asn\|mib\|smi\)\' . snmp-mode) (\.\(as\|mi\|sm\)2\' . snmpv2-mode) (\.\(diffs?\|patch\|rej\)\' . diff-mode) (\.\(dif\|pat\)\' . diff-mode) (\.[eE]?[pP][sS]\' . ps-mode) (\.\(?:PDF\|EPUB\|CBZ\|FB2\|O?XPS\|DVI\|OD[FGPST]\|DOCX\|XLSX?\|PPTX?\|pdf\|epub\|cbz\|fb2\|o?xps\|djvu\|dvi\|od[fgpst]\|docx\|xlsx?\|pptx?\)\' . doc-view-mode-maybe) (configure\.\(ac\|in\)\' . autoconf-mode) (\.s\(v\|iv\|ieve\)\' . sieve-mode) (BROWSE\' . ebrowse-tree-mode) (\.ebrowse\' . ebrowse-tree-mode) (#\*mail\* . mail-mode) (\.g\' . antlr-mode) (\.mod\' . m2-mode) (\.ses\' . ses-mode) (\.docbook\' . sgml-mode) (\.com\' . dcl-mode) (/config\.\(?:bat\|log\)\' . fundamental-mode) (/\.?\(authinfo\|netrc\)\' . authinfo-mode) (\.\(?:[iI][nN][iI]\|[lL][sS][tT]\|[rR][eE][gG]\|[sS][yY][sS]\)\' . conf-mode) (\.la\' . conf-unix-mode) (\.ppd\' . conf-ppd-mode) (java.+\.conf\' . conf-javaprop-mode) (\.properties\(?:\.[a-zA-Z0-9._-]+\)?\' . conf-javaprop-mode) (\.toml\' . conf-toml-mode) (\.desktop\' . conf-desktop-mode) (/\.redshift\.conf\' . conf-windows-mode) (\`/etc/\(?:DIR_COLORS\|ethers\|.?fstab\|.*hosts\|lesskey\|login\.?de\(?:fs\|vperm\)\|magic\|mtab\|pam\.d/.*\|permissions\(?:\.d/.+\)?\|protocols\|rpc\|services\)\' . conf-space-mode) (\`/etc/\(?:acpid?/.+\|aliases\(?:\.d/.+\)?\|default/.+\|group-?\|hosts\..+\|inittab\|ksysguarddrc\|opera6rc\|passwd-?\|shadow-?\|sysconfig/.+\)\' . conf-mode) ([cC]hange[lL]og[-.][-0-9a-z]+\' . change-log-mode) (/\.?\(?:gitconfig\|gnokiirc\|hgrc\|kde.*rc\|mime\.types\|wgetrc\)\' . conf-mode) (/\.mailmap\' . conf-unix-mode) (/\.\(?:asound\|enigma\|fetchmail\|gltron\|gtk\|hxplayer\|mairix\|mbsync\|msmtp\|net\|neverball\|nvidia-settings-\|offlineimap\|qt/.+\|realplayer\|reportbug\|rtorrent\.\|screen\|scummvm\|sversion\|sylpheed/.+\|xmp\)rc\' . conf-mode) (/\.\(?:gdbtkinit\|grip\|mpdconf\|notmuch-config\|orbital/.+txt\|rhosts\|tuxracer/options\)\' . conf-mode) (/\.?X\(?:default\|resource\|re\)s\> . conf-xdefaults-mode) (/X11.+app-defaults/\|\.ad\' . conf-xdefaults-mode) (/X11.+locale/.+/Compose\' . conf-colon-mode) (/X11.+locale/compose\.dir\' . conf-javaprop-mode) (\.~?[0-9]+\.[0-9][-.0-9]*~?\' nil t) (\.\(?:orig\|in\|[bB][aA][kK]\)\' nil t) ([/.]c\(?:on\)?f\(?:i?g\)?\(?:\.[a-zA-Z0-9._-]+\)?\' . conf-mode-maybe) (\.[1-9]\' . nroff-mode) (\.art\' . image-mode) (\.avs\' . image-mode) (\.bmp\' . image-mode) (\.cmyk\' . image-mode) (\.cmyka\' . image-mode) (\.crw\' . image-mode) (\.dcr\' . image-mode) (\.dcx\' . image-mode) (\.dng\' . image-mode) (\.dpx\' . image-mode) (\.fax\' . image-mode) (\.heic\' . image-mode) (\.hrz\' . image-mode) (\.icb\' . image-mode) (\.icc\' . image-mode) (\.icm\' . image-mode) (\.ico\' . image-mode) (\.icon\' . image-mode) (\.jbg\' . image-mode) (\.jbig\' . image-mode) (\.jng\' . image-mode) (\.jnx\' . image-mode) (\.miff\' . image-mode) (\.mng\' . image-mode) (\.mvg\' . image-mode) (\.otb\' . image-mode) (\.p7\' . image-mode) (\.pcx\' . image-mode) (\.pdb\' . image-mode) (\.pfa\' . image-mode) (\.pfb\' . image-mode) (\.picon\' . image-mode) (\.pict\' . image-mode) (\.rgb\' . image-mode) (\.rgba\' . image-mode) (\.tga\' . image-mode) (\.wbmp\' . image-mode) (\.webp\' . image-mode) (\.wmf\' . image-mode) (\.wpg\' . image-mode) (\.xcf\' . image-mode) (\.xmp\' . image-mode) (\.xwd\' . image-mode) (\.yuv\' . image-mode) (\.tgz\' . tar-mode) (\.tbz2?\' . tar-mode) (\.txz\' . tar-mode) (\.tzst\' . tar-mode) (\.drv\' . LaTeX-mode)) -**** Org Babel Support +*** Org Babel Support #+BEGIN_SRC emacs-lisp ;; enable verb package to do REST calls (use-package verb @@ -727,22 +737,22 @@ This enables direnv globally. #+RESULTS: : org-babel-scheme--table-or-string -**** Org Export +*** Org Export #+BEGIN_SRC emacs-lisp (use-package ox :ensure nil) #+END_SRC -***** Org Export to Markdown +**** Org Export to Markdown #+BEGIN_SRC emacs-lisp (use-package ox-md :ensure nil :after ox ) #+END_SRC -***** Org Latex Export -****** Syntax Highlighting requires Multiple Passes +**** Org Latex Export +***** Syntax Highlighting requires Multiple Passes #+BEGIN_SRC emacs-lisp ;; support for minted in LaTeX for code highlighting (use-package ox-latex @@ -756,7 +766,7 @@ This enables direnv globally. "%latex -interaction nonstopmode -output-directory %o %f")) ) #+END_SRC -****** Load Customer Latex Classes +***** Load Customer Latex Classes #+BEGIN_SRC emacs-lisp ;; Customer LaTeX classes (setq mlx-latex-classes @@ -801,7 +811,7 @@ This enables direnv globally. ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) #+END_SRC -****** Load My Latex Classes +***** Load My Latex Classes #+BEGIN_SRC emacs-lisp (setq snm-latex-classes '( @@ -849,7 +859,7 @@ This enables direnv globally. (class (append mlx-latex-classes snm-latex-classes)) (add-to-list 'org-latex-classes class))) #+END_SRC -**** Org Blogging +*** Org Blogging #+BEGIN_SRC emacs-lisp @@ -865,7 +875,7 @@ This enables direnv globally. (format-time-string "%Y-%m-%d" (current-time)) slug))) #+END_SRC -**** Org Capture Customization +*** Org Capture Customization #+BEGIN_SRC emacs-lisp (use-package org-capture :ensure nil @@ -899,7 +909,7 @@ This enables direnv globally. #+RESULTS: : t -**** Evil Support for Org +*** Evil Support for Org Better keybinding for evil mode from [[https://github.com/Somelauw/evil-org-mode][the evil-org github repo]]. #+BEGIN_SRC emacs-lisp @@ -915,7 +925,7 @@ Better keybinding for evil mode from [[https://github.com/Somelauw/evil-org-mode Here is a snapshot of the keybindings dd <2024-07-30 Tue>. -***** Quick overview +**** Quick overview |----------------+---------------------------| | key | explanation | @@ -924,7 +934,7 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>. | vae | select an element | |----------------+---------------------------| -***** Headings and items +**** Headings and items |--------------+------------------------| | key | explanation | @@ -940,7 +950,7 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>. | vaR | select a subtree | |--------------+------------------------| -***** Tables +**** Tables |-----------+--------------------------------| | key | explanation | @@ -956,7 +966,7 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>. | var | select whole table | |-----------+--------------------------------| -***** Agenda +**** Agenda |-------------------------+-------------------------+-----------------------------------------------------------------------------------| | Evil key | Emacs key | explanation | @@ -1019,7 +1029,7 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>. | +, - | [, ] | manipulate the query by adding a search term with positive or negative selection | |-------------------------+-------------------------+-----------------------------------------------------------------------------------| -**** Org GCal Support +*** Org GCal Support #+BEGIN_SRC emacs-lisp ;; configure support for google calendar @@ -1034,7 +1044,7 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>. #+RESULTS: -**** Org Jira Integration +*** Org Jira Integration #+BEGIN_SRC emacs-lisp ;; configure org-jira @@ -1051,7 +1061,7 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>. (auth-source-pass-get 'secret "customer/jira"))) #+END_SRC -*** Denote +** Denote #+BEGIN_SRC emacs-lisp ;; configure denote @@ -1080,11 +1090,11 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>. (" n f" . (lambda () (interactive) (consult-find denote-directory))))) #+END_SRC -***** TODO explain what denote-dired-mode-in-directories does. +**** TODO explain what denote-dired-mode-in-directories does. -** Programming -*** Programming Support Infrastructure -**** Integration with LSP Servers for language support +* Programming +** Programming Support Infrastructure +*** Integration with LSP Servers for language support #+BEGIN_SRC emacs-lisp ;; configure eglot-mode (use-package eglot @@ -1123,7 +1133,7 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>. #+END_SRC -**** Use Treesitter parser support +*** Use Treesitter parser support #+BEGIN_SRC emacs-lisp ;; set locations for treesitter grammars @@ -1158,12 +1168,28 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>. :defer 5 :custom (treesit-auto-install 'prompt) + (treesit-auto-langs '(awk bash c c-sharp clojure cmake commonlisp cpp css + dart dockerfile elixir go gomod html java + javascript json julia kotlin lua make markdown nix nu + org perl proto python r ruby rust scala sql toml tsx + typescript vue yaml)) ; reduced langs list somewhat :config (treesit-auto-add-to-auto-mode-alist 'all) (global-treesit-auto-mode)) #+END_SRC -***** Recompiling all Treesitter Grammars +#+RESULTS: +: [nil 26284 45426 709595 nil elpaca-process-queues nil nil 734000 nil] + +I always get errors compiling support for *janet* so I pruned the +`treesit-auto-langs` to exclude it and other things I don't use. + + +***** TODO figure out why Latex does not want to install + +***** TODO decide whether to keep using treesitter-auto at all or just plain treesit with some support functions. + +**** Recompiling all Treesitter Grammars To recompile all treesitter grammars, execute following block with *C-c C-c*. #+BEGIN_SRC emacs-lisp :tangle no @@ -1173,7 +1199,7 @@ To recompile all treesitter grammars, execute following block with #+RESULTS: | bash | cmake | css | elisp | go | gomod | haskell | html | java | javascript | json | lua | make | markdown | ocaml | python | toml | tsx | typescript | yaml | -***** Treesitter Grammars for Windows +**** Treesitter Grammars for Windows Windows does not come with a handy-dandy C-compiler available as *cc* or *gcc* or even *c99* and treesitter does not have a handy dandy feature to remap that to *zig cc* and similar. However we can download it from the release page of the tree-sitter-langs repo or even better install the *tree-sitter-langs* package. @@ -1195,15 +1221,15 @@ Normally that should work for other OSes too, but there is no real need for it. see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter][How to get started with tree sitter]] . -**** Create a folder to store downloaded LSP servers +*** Create a folder to store downloaded LSP servers #+BEGIN_SRC emacs-lisp ;; LSP support (let ((lsp_dir (file-name-concat user-emacs-directory "lsp"))) (if (not (file-exists-p lsp_dir)) (mkdir lsp_dir t))) #+END_SRC -*** Configure Selected Languages -**** Rust Support +** Configure Selected Languages +*** Rust Support #+BEGIN_SRC emacs-lisp ;; configure rust support @@ -1234,7 +1260,7 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter :init (setq rustic-lsp-client 'eglot)) #+END_SRC -**** OCaml Support +*** OCaml Support #+BEGIN_SRC emacs-lisp ;; configure Ocaml support (setq opam-emacs-dir (file-name-concat (expand-file-name "~") "/.opam/default/share/emacs/site-lisp")) @@ -1247,7 +1273,7 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter :hook (tuareg-mode . eglot-ensure)) #+END_SRC -**** Go Support +*** Go Support #+BEGIN_SRC emacs-lisp :tangle no ;; configure go support (use-package go-ts-mode @@ -1256,7 +1282,7 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter :hook (go-ts-mode . eglot-ensure)) #+END_SRC -**** Javascript, Typescript, TSC, etc... +*** Javascript, Typescript, TSC, etc... #+BEGIN_SRC emacs-lisp :tangle no ;; configure typescript support (use-package typescript-ts-mode @@ -1279,7 +1305,7 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter :hook (tsx-ts-mode . eglot-ensure)) #+END_SRC -**** Java and other JVM languages +*** Java and other JVM languages #+BEGIN_SRC emacs-lisp ;; configure java support (use-package java-ts-mode @@ -1305,8 +1331,8 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter (add-to-list 'eglot-server-programs `((java-mode java-ts-mode) ,jdtls-prog)))))) #+END_SRC -**** Lisp and Scheme Support -***** Enable ParEdit in lispy modes +*** Lisp and Scheme Support +**** Enable ParEdit in lispy modes #+BEGIN_SRC emacs-lisp ;; Lisp support @@ -1332,7 +1358,7 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter #+END_SRC #+RESULTS: -****** TODO FIx paredit bug related to obsolete macro +***** TODO FIx paredit bug related to obsolete macro evil-paredit relies on an obsolete (and no longer available method) `evil-called-interactively-p`. So I define it here till evil-paredit @@ -1350,7 +1376,7 @@ no arguments. In Emacs 23.2 and newer, it takes one argument." #+END_SRC -***** Enable Geiser Mode in Scheme Mode +**** Enable Geiser Mode in Scheme Mode Configure Geiser and Scheme - map .scm file by default to Guile @@ -1373,7 +1399,7 @@ Configure Geiser and Scheme #+RESULTS: | evil-paredit-mode | geiser-mode | enable-paredit-mode | aggressive-indent-mode | geiser-mode--maybe-activate | -**** Terraform Support +*** Terraform Support #+BEGIN_SRC emacs-lisp ;; configure terraform support (use-package terraform-mode @@ -1396,7 +1422,7 @@ Configure Geiser and Scheme #+RESULTS: : pti-ide-config -*** Debugger Support +** Debugger Support #+BEGIN_SRC emacs-lisp ;; install DAP servers (setq snam-vscode-js-debug-dir (file-name-concat user-emacs-directory "dape/vscode-js-debug")) @@ -1517,7 +1543,7 @@ Configure Geiser and Scheme #+RESULTS: -*** Copilot Support +** Copilot Support #+BEGIN_SRC emacs-lisp (use-package copilot :ensure (:host github :repo "zerolfx/copilot.el" @@ -1538,10 +1564,10 @@ Configure Geiser and Scheme #+RESULTS: : [nil 26280 62042 380168 nil elpaca-process-queues nil nil 930000 nil] -**** TODO move scheme configuration to the scheme section +*** TODO move scheme configuration to the scheme section or leave it here but move it to config, whatever makes most sense at the moment. -*** Flymake Error Diagnostics +** Flymake Error Diagnostics #+BEGIN_SRC emacs-lisp (evil-define-key 'normal #'eglot-mode-map (kbd "]d") #'flymake-goto-next-error @@ -1549,7 +1575,7 @@ the moment. ) #+END_SRC -*** Electric Return +** Electric Return #+BEGIN_SRC emacs-lisp ;; enable electric return to automatically indent code (defvar electrify-return-match @@ -1576,10 +1602,10 @@ the moment. #+END_SRC -**** TODO Evaluate if Electric Return is still useful +*** TODO Evaluate if Electric Return is still useful -** Communication and Interwebs -*** ERC configuration +* Communication and Interwebs +** ERC configuration Set up ERC, an IRC client for Emacs, to automatically join specific channels and log in: #+BEGIN_SRC emacs-lisp (use-package erc @@ -1601,7 +1627,7 @@ Set up ERC, an IRC client for Emacs, to automatically join specific channels and Setup all channels which are joined by default. -**** ERC connect function +*** ERC connect function Define a function to login to ERC when needed. In principle ERC reconnects after suspend, and sometimes it even works, but mostly I @@ -1626,14 +1652,14 @@ with the rooms I joined. In practice this has proven to be a very useful function to reconnect in all kind of weird situation. -***** TODO Figure out how to make ERC reconnect more reliably +**** TODO Figure out how to make ERC reconnect more reliably Although running `snam-erc` is not a big deal, it should not be needed so much. I should figure out in what cases reconnects fail or dropping connections fail to be recognized. I often see that ERC is _reconnecting_ however this seems to silently fail. I dunno, there is something fishy here... -**** Integrate ERC with i3 Desktops +*** Integrate ERC with i3 Desktops I like to have my IRC channels on workspace 5 in *i3*. @@ -1658,7 +1684,7 @@ I like to have my IRC channels on workspace 5 in *i3*. : my-erc -*** Elfeed configuration +** Elfeed configuration Configures Elfeed, an RSS feed reader for Emacs: #+BEGIN_SRC emacs-lisp ;; configure elfeed @@ -1685,7 +1711,7 @@ Configures Elfeed, an RSS feed reader for Emacs: : [nil 26279 35504 577569 nil elpaca-process-queues nil nil 161000 nil] -*** Enable 0x0 to share snippets and files easily +** Enable 0x0 to share snippets and files easily Configures the ~0x0~ package for easily sharing code snippets and files: #+BEGIN_SRC emacs-lisp ;; configure 0x0