~jakob/.emacs.d

bc30e1601762647d7b068302242b77db59ac1b9b — Jakob L. Kreuze 1 year, 10 months ago 37e58f6
More cleanup/linting
5 files changed, 14 insertions(+), 31 deletions(-)

M init.el
M lisp/core.el
M lisp/documents.el
M lisp/jakob.el
M lisp/quality-of-life.el
M init.el => init.el +1 -14
@@ 132,7 132,7 @@
;; A handful of the Elisp snippets in this file depend on third-party libraries
;; which aren't loaded by default.

;;; TODO
(require 'cl-lib)





@@ 169,19 169,6 @@
      `(progn ,@form)
    '(progn)))

(require 'cl-lib)

(defmacro choose-for-machine (&rest clauses)
  "Return the `cadr' of the CLAUSE whose `car' is `(system-name)'."
  (let* ((name-clause (cl-find-if #'(lambda (x)
                                      (string= (system-name) (car x)))
                                  clauses))
         (last-clause (cl-find-if #'(lambda (x) (eq 't (car x)))
                                  clauses)))
    (cond (name-clause (cadr name-clause))
          (last-clause (cadr last-clause))
          (t 'nil))))

(load-module "core")
(load-module "jakob")
(load-module "quality-of-life")

M lisp/core.el => lisp/core.el +0 -2
@@ 13,8 13,6 @@
;; out some Lisp forms and evaluate them. I like to pretend that my computers
;; are Lisp machines.

;; TODO: Replace with dashboard.el?

(setq inhibit-startup-message t
      inhibit-startup-buffer-menu t
      initial-scratch-message nil

M lisp/documents.el => lisp/documents.el +6 -6
@@ 224,9 224,7 @@ Visits LINK, or if LINK names a subdirectory of
                           "~/Notes/GTD/Inbox.org"
                           "~/Notes/GTD/Actionable.org"))

  (let ((entry-done
         '(lambda () (org-agenda-skip-entry-if 'todo 'done)))
        (subtree-is-not-calendar-item
  (let ((subtree-is-not-calendar-item
         '(lambda ()
            (let ((subtree-end (save-excursion (org-end-of-subtree t))))
              (if (or (string= (org-entry-get nil "STYLE") "habit")


@@ 271,6 269,7 @@ Visits LINK, or if LINK names a subdirectory of
                      ((org-agenda-span 'day)
                       (org-agenda-skip-function ,subtree-is-not-calendar-item)
                       (org-agenda-overriding-header "Schedule Today:")
                       (org-deadline-warning-days 0)
                       (org-agenda-prefix-format " %i %-12:c%t %l")))
              (agenda ""
                      ((org-agenda-span 'day)


@@ 346,17 345,18 @@ Visits LINK, or if LINK names a subdirectory of
  ;; Functionality to add a `CREATED' property -- I don't need something so
  ;; intrusive that it inserts it for every heading. I can use my own
  ;; discretion.
  (defun log-todo-creation-date (&rest ignore)
  (defun log-todo-creation-date (&rest args)
    "Log TODO creation time in the property drawer under the key 'CREATED'."
    (interactive)
    (ignore args)
    (when (and (org-get-todo-state)
               (not (org-entry-get nil "CREATED")))
      (org-entry-put nil "CREATED" (format-time-string (cdr org-time-stamp-formats)))))

  ;; Patch in an offset for tag alignment. (Without this, they will warp in a
  ;; way which I do not like.)
  :init
  (el-patch-defun org-agenda-align-tags (&optional line)
  :config/el-patch
  (defun org-agenda-align-tags (&optional line)
    "Align all tags in agenda items to `org-agenda-tags-column'.
    When optional argument LINE is non-nil, align tags only on the
    current line."

M lisp/jakob.el => lisp/jakob.el +3 -3
@@ 26,8 26,6 @@
;;; pass
;;;

;; TODO: Replace with pass.el?

;; Here's a snippet for interactively pulling a password from password-store, so
;; I'm not spawning a terminal every time I need to invoke my password manager.



@@ 49,7 47,7 @@ Passwords are taken from `password-store-directory'."
         (path (concat password-store-directory "/" account ".gpg")))
    (with-temp-buffer
      (insert-file-contents path)
      (clipboard-kill-ring-save 1 (1- (buffer-end 1))))
      (clipboard-kill-ring-save 1 (line-end-position)))
    (message "Password for %s copied to clipboard." account)))




@@ 60,6 58,8 @@ Passwords are taken from `password-store-directory'."
;; A little snippet for getting an answer to a dumb question. Responses were
;; lifted from Wikipedia's page [1] about the toy.
;;
;; This really only exists for experimenting with `native-comp'.
;;
;; [1]: https://en.wikipedia.org/wiki/Magic_8-Ball

(defun consult ()

M lisp/quality-of-life.el => lisp/quality-of-life.el +4 -6
@@ 69,12 69,10 @@

;; Use Swiper instead of isearch.

;; TODO: Should I re-enable this?

;; (use-package swiper
;;   :bind
;;   ("C-r" . swiper)
;;   ("C-s" . swiper))
(use-package swiper
  :bind
  ("C-r" . swiper)
  ("C-s" . swiper))

;; Use a better sorting algorithm.