#+BEGIN_SRC emacs-lisp
(setq org-agenda-custom-commands '((" " "Agenda"
((agenda "" nil)
- (todo "APPT"
- ((org-agenda-overriding-header "Appointments")))
(tags "need"
((org-agenda-overriding-header "Needed Items")))
+ (tags-todo "TODO=\"IN-PROGRESS\"-standard-REFILE"
+ ((org-agenda-overriding-header "In Progress")))
(tags "REFILE"
((org-agenda-overriding-header "Tasks to Refile")))
- (tags-todo "TODO=\"IN-PROGRESS\"-REFILE"
- ((org-agenda-overriding-header "In Progress")))
+ (tags-todo "-TODO=\"WAITING\"-TODO=\"IN-PROGRESS\"-standard-REFILE"
+ ((org-agenda-overriding-header "Filed Tasks")))
(tags-todo "TODO=\"WAITING\"-REFILE"
- ((org-agenda-overriding-header "Halted")))
- (tags-todo "-TODO=\"WAITING\"-TODO=\"IN-PROGRESS\"-REFILE-JOURNAL"
- ((org-agenda-overriding-header "Filed Tasks")))))))
+ ((org-agenda-overriding-header "Holding")))
+ (tags-todo "standard"
+ ((org-agenda-overriding-header "Changes to Standard")))))))
#+END_SRC
Tag filtering
#+BEGIN_SRC emacs-lisp
(setq org-tag-alist '((:startgroup . nil)
- ("@errand" . ?e)
- ("@office" . ?o)
- ("need" . ?n)
- (:endgroup . nil)))
+ ("need" . ?n)
+ ("standard" . ?s)
+ (:endgroup . nil)))
#+END_SRC
*** Templates
#+END_SRC
**** Skeletons
-***** =Emacs Lisp= source Block
+***** Emacs Lisp source Block
#+BEGIN_SRC emacs-lisp
(define-skeleton skel-org-block-elisp
"Insert an org emacs lisp block"
#+BEGIN_SRC emacs-lisp
(add-hook 'eshell-mode-hook (lambda ()
- (setq-local corfu-auto nil)
+ ;; (setq-local corfu-auto nil)
(corfu-mode)))
#+END_SRC
#+END_SRC
**** Line opening
-The default behavior of =open-line= is ridiculous. It acheives the same function as hitting =RET=. I don't want to split the current line, I want to OPEN a new one, and usually go to it. These wrappers remedy that, and allow me to choose whether I want to go to the line or just add it.
+The default behavior of =open-line= is ridiculous. It acheives the same function as hitting =RET=. I don't want to split the current line, I want to OPEN a new one, and usually go to it. These wrappers remedy that.
#+BEGIN_SRC emacs-lisp
(defun open-line-below (n)
(keymap-global-set "M-s M-." 'isearch-forward-symbol-at-point)
(keymap-global-set "M-%" 'replace-regexp)
(keymap-global-set "C-%" 'replace-string)
-(keymap-global-set "C-S-R" 'isearch-backward-regexp)
-(keymap-global-set "C-S-S" 'isearch-forward-regexp)
+(keymap-global-set "C-s" 'isearch-forward-regexp)
+(keymap-global-set "C-S-S" 'isearch-forward)
+(keymap-global-set "C-r" 'isearch-backward-regexp)
+(keymap-global-set "C-S-R" 'isearch-backward)
#+END_SRC
*** Elisp/Eval bindings
#+END_SRC
*** Electrical
-These defuns are all about electronics. Effective impedance, amps to volts and back again.
+These defuns are all about electronics. Effective impedance, amps to volts, and back again.
#+BEGIN_SRC emacs-lisp
(defun eff-imp (r1 &optional r2)
"Calculate the effective input impedance, given two resistances.
(list (amps->counts vmax upper resolution r1 r2)
(amps->counts vmax lower resolution r1 r2))))
-(defun div-ofst (raw-max raw-min scaled-max scaled-min)
- "Calculate 1/slope and offset given PLC Max/Min and Eng. Max/Min."
- (let* ((divisor (/ (float (- raw-max raw-min)) (- scaled-max scaled-min)))
- (offset (- scaled-min (/ raw-min divisor))))
- (list divisor offset)))
+(defun divisor (raw-max raw-min scaled-max scaled-min)
+ "Calculate 1/slope given PLC Max/Min and Eng. Max/Min."
+ (/ (float (- raw-max raw-min)) (- scaled-max scaled-min)))
+
+(defun offset (raw-max raw-min scaled-max scaled-min)
+ "Calculate offset given PLC Max/Min and Eng. Max/Min."
+ (- scaled-min (/ raw-min (divisor raw-max raw-min scaled-max scaled-min))))
-(defun fincalc (analog-input divisor offset)
+(defun final (analog-input divisor offset)
"Calculate the scaled value of an input."
(+ (/ analog-input divisor) offset))
-(defun final (analog-input divisor &optional offset)
- "Calculate the scaled value of an input, by calling `fincalc'.
-Get values of divisor and offset if from a list, as returned by `div-ofst',
-otherwise take two separate values"
- (if (listp divisor)
- (let ((div (car divisor))
- (os (car (cdr divisor))))
- (fincalc analog-input div os))
- (fincalc analog-input divisor offset)))
-
-(defun scale (analog-input raw-max raw-min scaled-max scaled-min)
- "Calculate the divisor, offset, and final value, given the parameters."
- (list (div-ofst raw-max raw-min scaled-max scaled-min)
- (final analog-input (div-ofst raw-max raw-min scaled-max scaled-min))))
+(defun scale (raw-max raw-min scaled-max scaled-min &optional analog-input)
+ "Calculate the divisor, offset, and maybe final value, given the parameters."
+ (let* ((div (divisor raw-max raw-min scaled-max scaled-min))
+ (os (offset raw-max raw-min scaled-max scaled-min)))
+ (if (eq nil analog-input)
+ (list div os)
+ (list div os (final analog-input div os)))))
#+END_SRC
*** Refrigeration