From c79d4ae321e5253506782443dc2a1eae3d1c3172 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 25 Jul 2025 20:32:07 -0700 Subject: [PATCH] Categorize all of the uncategorized sections --- emacs_el/configuration/don-configuration.org | 64 ++++++++++++++------ 1 file changed, 46 insertions(+), 18 deletions(-) diff --git a/emacs_el/configuration/don-configuration.org b/emacs_el/configuration/don-configuration.org index 848dad2..8db5c66 100644 --- a/emacs_el/configuration/don-configuration.org +++ b/emacs_el/configuration/don-configuration.org @@ -1509,6 +1509,19 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori :mode "\\.go" ) #+END_SRC +** C Programming +#+BEGIN_SRC emacs-lisp +(use-package c-mode + :delight + :config + (setq-default c-indent-level 4) + (setq-default c-brace-imaginary-offset 0) + (setq-default c-brace-offset -4) + (setq-default c-argdecl-indent 4) + (setq-default c-label-offset -4) + (setq-default c-continued-statement-offset 4) + ) +#+END_SRC ** Expand region #+BEGIN_SRC emacs-lisp @@ -1565,6 +1578,15 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori (add-hook 'terraform-mode-hook 'my-terraform-mode-init) ) #+END_SRC +** Calendar +#+BEGIN_SRC emacs-lisp +(use-package calendar + :delight 📅 + :config + (setq calendar-latitude 38.6) + (setq calendar-longitude -121.5) + ) +#+END_SRC * Email ** Mutt @@ -2657,13 +2679,14 @@ same directory as the org-buffer and insert a link to this file." :mode ("^/usr/share/doc/.*/README.*Debian.*$" . readme-debian-mode) ) #+END_SRC -* Misc (uncharacterized) +* Emacs defaults +** Search case insensitive by default #+BEGIN_SRC emacs-lisp - (setq calendar-latitude 38.6) - (setq calendar-longitude -121.5) (setq case-fold-search t) +#+END_SRC +** Prompt when killing emacs +#+BEGIN_SRC emacs-lisp (setq confirm-kill-emacs (quote y-or-n-p)) - #+END_SRC ** Turn on fontlock #+BEGIN_SRC emacs-lisp @@ -2695,7 +2718,6 @@ same directory as the org-buffer and insert a link to this file." ** My Username #+BEGIN_SRC emacs-lisp (setq user-mail-address "don@donarmstrong.com") - #+END_SRC ** Use primary selection on unix machines #+BEGIN_SRC emacs-lisp @@ -2712,32 +2734,34 @@ same directory as the org-buffer and insert a link to this file." (setq select-enable-primary t) )) ; (setq mouse-drag-copy-region t) - -(setq-default c-indent-level 4) -(setq-default c-brace-imaginary-offset 0) -(setq-default c-brace-offset -4) -(setq-default c-argdecl-indent 4) -(setq-default c-label-offset -4) -(setq-default c-continued-statement-offset 4) +#+END_SRC +** Tabs as spaces, default tab width +#+BEGIN_SRC emacs-lisp ; tabs are annoying (setq-default indent-tabs-mode nil) (setq-default tab-width 4) +#+END_SRC +** Insert date function (M-d) +#+BEGIN_SRC emacs-lisp (defun insert-date () "Insert date at point." (interactive) (insert (format-time-string "%A, %B %e, %Y %k:%M:%S %Z"))) (global-set-key "\C-[d" 'insert-date) - +#+END_SRC +** Unfill Paragraph Function +#+BEGIN_SRC emacs-lisp (defun unfill-paragraph (arg) "Pull this whole paragraph up onto one line." (interactive "*p") (let ((fill-column 10000)) (fill-paragraph arg)) ) - +#+END_SRC +** Turn on column number mode +#+BEGIN_SRC emacs-lisp (column-number-mode t) - #+END_SRC ** Desktop-save-mode If the envvar EMACS_SERVER_NAME is set, consider this a separate @@ -2764,13 +2788,15 @@ emacs, and use a different desktop file to restore history ; (desktop-read) ) #+END_SRC -** Misc (Uncharacterized) +** Enable upcase/downcase and narrow to region #+BEGIN_SRC emacs-lisp (put 'upcase-region 'disabled nil) (put 'downcase-region 'disabled nil) (put 'narrow-to-region 'disabled nil) - +#+END_SRC +** Fix up tmux xterm keys +#+BEGIN_SRC emacs-lisp ; fix up tmux xterm keys ; stolen from http://unix.stackexchange.com/questions/24414/shift-arrow-not-working-in-emacs-within-tmux (defun fix-up-tmux-keys () @@ -2865,7 +2891,9 @@ emacs, and use a different desktop file to restore history ) ) ; (add-hook 'tty-setup-hook 'fix-up-tmux-keys) - +#+END_SRC +** Only ask me about a obsolete buffer if the buffer is actually obsolete +#+BEGIN_SRC emacs-lisp (defadvice ask-user-about-supersession-threat (around ask-user-about-supersession-threat-if-necessary) "Call ask-user-about-supersession-threat only if the buffer is actually obsolete." (if (or (buffer-modified-p) -- 2.39.5