#+TITLE: Emacs Configuratione
#+OPTIONS: toc:4
-#+PROPERTY: header-args:emacs-lisp :tangle yes :results silent :export code
+#+PROPERTY: header-args:emacs-lisp :tangle yes :results silent :export code :comments org
* Introduction
This is my emacs configuration. It is meant to be used across linux, windows, and BSD. I use windows only at work (Industrial Controls). I use emacs often as an advanced programmable calculator.
frame-resize-pixelwise t)
#+END_SRC
-I am no longer using the default theme, so that config is no longer here, but [[*eink-emacs][here]]. Make every frame open full-screen, and re-emphasize the desire for no scroll-bars.
+I am now using the default theme. Make every frame open full-screen.
#+BEGIN_SRC emacs-lisp :tangle ./early-init.el
-(setq default-frame-alist '(;;(background-color . "#d8f2b0")
- (fullscreen . maximized)))
+(setq default-frame-alist '((fullscreen . maximized)))
#+END_SRC
** Misc/odd issues
#+END_SRC
*** eink-emacs
-I want a minimal (mostly b+w) theme.
+I wanted a minimal (mostly b+w) theme. Now I just use the default theme.
#+BEGIN_SRC emacs-lisp
;; (use-package eink-theme
;; :ensure t
#+END_SRC
*** org-transclusion
-Awesome package - adds transclusions, don't know how similar to Xanadu it is, but sounds basically the same.
+Awesome package - adds transclusions.
#+BEGIN_SRC emacs-lisp
(use-package org-transclusion
*** acme-mouse
Not a package in the strict sense, just a .el file - pulled from [[https://github.com/akrito/acme-mouse/]] and modified to meet changes to the old =cl= package.
-Disabled for now - causes issues with the [[*centered-cursor-mode][centered-cursor-mode]]
#+BEGIN_SRC emacs-lisp
-;; (load (concat user-emacs-directory "acme-mouse.el"))
+(load (concat user-emacs-directory "acme-mouse.el"))
#+END_SRC
*** AUCTeX
*** Backup/Autosave
I originally had some autosave items in here, but the defaults appeared to be doing basically what I wanted anyway.
-
**** Backups
Make backups for vc-controlled files, don't clobber symlinks, and put everything into =~/emacs-backups/=.
-
#+BEGIN_SRC emacs-lisp
(setq vc-make-backup-files t
backup-by-copying t
**** Old versions
Keep 10 versions, 5 'old' and 5 'new'. Delete anything older.
-
#+BEGIN_SRC emacs-lisp
(setq delete-old-versions t
kept-new-versions 5
#+END_SRC
*** File handling
+**** Final Newline
I want to avoid ever seeing an error about missing newlines at the end of a file.
-
#+BEGIN_SRC emacs-lisp
(setq require-final-newline t)
#+END_SRC
-
+**** Auto Revert
When files change on disk, and there are no changes in the open buffer, revert to the on-disk version.
#+BEGIN_SRC emacs-lisp
(global-auto-revert-mode t)
#+END_SRC
-
+**** Segfault recovery
These are directly from [[https://depp.brause.cc/dotemacs/][depp.brause.cc/dotemacs/]]. They are intended to make Emacs drop changes and die when a segfault happens, rather than attempt to save potentially corrupted data.
-
#+BEGIN_SRC emacs-lisp
(setq attempt-stack-overflow-recovery nil
attempt-orderly-shutdown-on-fatal-signal nil)
#+END_SRC
-
+**** Whitespace and chmod on save
I want to strip all trailing whitespace on save, and I want to make all shell scripts executable at the same time.
#+BEGIN_SRC emacs-lisp
(add-hook 'before-save-hook 'whitespace-cleanup)
**** Windmove
I originally had custom defuns and bindings to do this, but then I found out it was built in...
-
#+BEGIN_SRC emacs-lisp
(windmove-default-keybindings 'control)
(setq windmove-wrap-around t
#+END_SRC
*** Buffer looks
-Highlight current line in all buffers, even if inactive.
-#+BEGIN_SRC emacs-lisp
-(setq global-hl-line-sticky-flag t)
-;; (global-hl-line-mode t)
-#+END_SRC
-
I want nice symbols to look at
#+BEGIN_SRC emacs-lisp
(setq prettify-symbols-alist '(("lambda" . 955)
show-paren-style 'expression)
#+END_SRC
-Make the paren "highlight" the same color as the background, and add underline. This adds some amount of "highlighting", since the background color overrides the color set by =hl-line-mode=.
-
+Make the paren "highlight" the same color as the background, and add underline.
#+BEGIN_SRC emacs-lisp
(set-face-attribute 'show-paren-match nil
:background 'unspecified
** org configuration
I had this in a use-package declaration, but I find this a little nicer.
-
*** Basics
Just some basic/misc stuff. I don't think I've seen too many configs that don't have at least most of these.
#+BEGIN_SRC emacs-lisp
org-agenda-restore-windows-after-quit t
org-use-fast-todo-selection 'expert
org-fast-tag-selection-single-key 'expert
- org-agenda-dim-blocked-tasks 'invisible
org-enforce-todo-dependencies t
org-enforce-todo-checkbox-dependencies t
org-agenda-start-on-weekday nil
"DONE(d!/@)"
"CANCELLED(c@)")))
#+END_SRC
-
+Tag filtering
+#+BEGIN_SRC emacs-lisp
+(setq org-tag-alist '((:startgroup . nil)
+ ("need" . ?n)
+ ("standard" . ?s)
+ (:endgroup . nil)))
+#+END_SRC
+*** Agenda
Set up the agenda view. Access it with =C-c a SPC=.
#+BEGIN_SRC emacs-lisp
(setq org-agenda-custom-commands '((" " "Agenda"
((agenda "" nil)
(tags "need"
((org-agenda-overriding-header "Needed Items")))
- (tags-todo "TODO=\"IN-PROGRESS\"-standard-REFILE"
- ((org-agenda-overriding-header "In Progress")))
+ (tags-todo "-REFILE+TODO=\"IN-PROGRESS\""
+ ((org-agenda-overriding-header "In Progress")))
(tags "REFILE"
((org-agenda-overriding-header "Tasks to Refile")))
(tags-todo "-TODO=\"WAITING\"-TODO=\"IN-PROGRESS\"-standard-REFILE"
- ((org-agenda-overriding-header "Filed Tasks")))
+ ((org-agenda-overriding-header "Filed Tasks")))
(tags-todo "TODO=\"WAITING\"-REFILE"
((org-agenda-overriding-header "Holding")))
(tags-todo "standard"
((org-agenda-overriding-header "Changes to Standard")))))))
#+END_SRC
-Tag filtering
+Set up the format for column view.
#+BEGIN_SRC emacs-lisp
-(setq org-tag-alist '((:startgroup . nil)
- ("need" . ?n)
- ("standard" . ?s)
- (:endgroup . nil)))
+(setq org-columns-default-format "%50ITEM(Task) %10CLOCKSUM %16TIMESTAMP_IA"
+ org-agenda-start-with-log-mode t)
#+END_SRC
+
*** Templates
Capture Templates per my proclivities.
#+BEGIN_SRC emacs-lisp
-(setq org-capture-templates '(("n" "Note" entry (file org-default-notes-file) "* %u %?")
- ("t" "TODO" entry (file org-default-notes-file) "* TODO %?\n%U\n")
- ("a" "Appointment" entry (file+olp+datetree org-journal-file) "* APPT %?\nSCHEDULED: %t" :time-prompt t)
+(setq org-capture-templates '(("n" "Note" entry (file org-default-notes-file)
+ "* %? %u" :clock-in t :clock-resume t)
+ ("t" "TODO" entry (file org-default-notes-file)
+ "* TODO %?\n%U\n" :clock-in t :clock-resume t)
+ ("m" "Meeting" entry (file+olp+datetree org-journal-file)
+ "* MEETING with %? :MEETING:\n%t" :clock-in t :clock-resume t)
+ ("a" "Appointment" entry (file+olp+datetree org-journal-file)
+ "* APPT %?\nSCHEDULED: %t" :time-prompt t)
("j" "Journal" entry (file+olp+datetree org-journal-file) "* %?\n%U\n")))
#+END_SRC