Update indentation in some elisp files
According to new elisp default indentation provided by `common-lisp-indent-function`.
This commit is contained in:
parent
f22ef5705c
commit
40ff1d3004
305
init.el
305
init.el
|
@ -824,7 +824,7 @@
|
||||||
(sequence "GOTO(g)" "ATTN(a)" "|" "DONE(d@)")
|
(sequence "GOTO(g)" "ATTN(a)" "|" "DONE(d@)")
|
||||||
(sequence "READ(r)" "CONT(n!)" "|" "DONE(d@)")
|
(sequence "READ(r)" "CONT(n!)" "|" "DONE(d@)")
|
||||||
(sequence "DELG(e@/!)" "WAIT(w@/!)" "HOLD(h@/!)"
|
(sequence "DELG(e@/!)" "WAIT(w@/!)" "HOLD(h@/!)"
|
||||||
"|" "CANC(c@/!)" "PHONE" "MEETING"))
|
"|" "CANC(c@/!)" "PHONE" "MEETING"))
|
||||||
|
|
||||||
org-todo-state-tags-triggers
|
org-todo-state-tags-triggers
|
||||||
'(("WAIT" ("HOLD") ("WAIT" . t))
|
'(("WAIT" ("HOLD") ("WAIT" . t))
|
||||||
|
@ -980,30 +980,29 @@ If DESCRIPTION, match it in the description. If TARGET, match it
|
||||||
in the target. If both DESCRIPTION and TARGET, match both,
|
in the target. If both DESCRIPTION and TARGET, match both,
|
||||||
respectively."
|
respectively."
|
||||||
(cl-labels
|
(cl-labels
|
||||||
((no-desc
|
((no-desc (match)
|
||||||
(match) (rx-to-string `(seq (or bol (1+ blank))
|
(rx-to-string `(seq (or bol (1+ blank))
|
||||||
"[[" (0+ (not (any "]"))) (regexp ,match) (0+ (not (any "]")))
|
"[[" (0+ (not (any "]"))) (regexp ,match) (0+ (not (any "]")))
|
||||||
"]]")))
|
"]]")))
|
||||||
(match-both
|
(match-both (description target)
|
||||||
(description target)
|
(rx-to-string `(seq (or bol (1+ blank))
|
||||||
(rx-to-string `(seq (or bol (1+ blank))
|
"[[" (0+ (not (any "]"))) (regexp ,target) (0+ (not (any "]")))
|
||||||
"[[" (0+ (not (any "]"))) (regexp ,target) (0+ (not (any "]")))
|
;; Added .* wildcards
|
||||||
;; Added .* wildcards
|
"][" (regexp ".*") (regexp ,description) (regexp ".*")
|
||||||
"][" (regexp ".*") (regexp ,description) (regexp ".*")
|
"]]")))
|
||||||
"]]")))
|
|
||||||
;; Note that these actually allow empty descriptions
|
;; Note that these actually allow empty descriptions
|
||||||
;; or targets, depending on what they are matching.
|
;; or targets, depending on what they are matching.
|
||||||
(match-desc
|
(match-desc (match)
|
||||||
(match) (rx-to-string `(seq (or bol (1+ blank))
|
(rx-to-string `(seq (or bol (1+ blank))
|
||||||
"[[" (0+ (not (any "]")))
|
"[[" (0+ (not (any "]")))
|
||||||
;; Added .* wildcards
|
;; Added .* wildcards
|
||||||
"][" (regexp ".*") (regexp ,match) (regexp ".*")
|
"][" (regexp ".*") (regexp ,match) (regexp ".*")
|
||||||
"]]")))
|
"]]")))
|
||||||
(match-target
|
(match-target (match)
|
||||||
(match) (rx-to-string `(seq (or bol (1+ blank))
|
(rx-to-string `(seq (or bol (1+ blank))
|
||||||
"[[" (0+ (not (any "]"))) (regexp ,match) (0+ (not (any "]")))
|
"[[" (0+ (not (any "]"))) (regexp ,match) (0+ (not (any "]")))
|
||||||
;; Removed pattern for description
|
;; Removed pattern for description
|
||||||
"][" ))))
|
"][" ))))
|
||||||
(cond (description-or-target
|
(cond (description-or-target
|
||||||
(rx-to-string `(or (regexp ,(no-desc description-or-target))
|
(rx-to-string `(or (regexp ,(no-desc description-or-target))
|
||||||
(regexp ,(match-desc description-or-target))
|
(regexp ,(match-desc description-or-target))
|
||||||
|
@ -1038,12 +1037,12 @@ respectively."
|
||||||
(and (boundp 'org-capture-mode)
|
(and (boundp 'org-capture-mode)
|
||||||
org-capture-mode))
|
org-capture-mode))
|
||||||
(cond
|
(cond
|
||||||
((member (org-get-todo-state)
|
((member (org-get-todo-state)
|
||||||
(list "TODO" "READ"))
|
(list "TODO" "READ"))
|
||||||
"CONT")
|
"CONT")
|
||||||
((member (org-get-todo-state)
|
((member (org-get-todo-state)
|
||||||
(list "GOTO"))
|
(list "GOTO"))
|
||||||
"ATTN"))))
|
"ATTN"))))
|
||||||
org-clock-persist t
|
org-clock-persist t
|
||||||
org-clock-persist-query-resume nil
|
org-clock-persist-query-resume nil
|
||||||
org-clock-ask-before-exiting nil
|
org-clock-ask-before-exiting nil
|
||||||
|
@ -1112,12 +1111,12 @@ respectively."
|
||||||
|
|
||||||
org-agenda-clock-consistency-checks
|
org-agenda-clock-consistency-checks
|
||||||
'(:max-duration 9999999
|
'(:max-duration 9999999
|
||||||
:min-duration 0
|
:min-duration 0
|
||||||
:max-gap 0
|
:max-gap 0
|
||||||
:gap-ok-around nil
|
:gap-ok-around nil
|
||||||
:default-face ((:background "DarkRed") (:foreground "white"))
|
:default-face ((:background "DarkRed") (:foreground "white"))
|
||||||
:overlap-face nil :gap-face nil :no-end-time-face nil
|
:overlap-face nil :gap-face nil :no-end-time-face nil
|
||||||
:long-face nil :short-face nil)
|
:long-face nil :short-face nil)
|
||||||
|
|
||||||
org-agenda-clockreport-parameter-plist
|
org-agenda-clockreport-parameter-plist
|
||||||
'(:link t :maxlevel 4 :compact t :narrow 60 :fileskip0 t)
|
'(:link t :maxlevel 4 :compact t :narrow 60 :fileskip0 t)
|
||||||
|
@ -1140,81 +1139,81 @@ respectively."
|
||||||
|
|
||||||
org-agenda-custom-commands
|
org-agenda-custom-commands
|
||||||
`(("A" "Main Agenda"
|
`(("A" "Main Agenda"
|
||||||
((agenda
|
((agenda
|
||||||
""
|
""
|
||||||
((org-agenda-entry-types '(:timestamp :sexp :scheduled))
|
((org-agenda-entry-types '(:timestamp :sexp :scheduled))
|
||||||
(org-deadline-warning-days 0)))
|
(org-deadline-warning-days 0)))
|
||||||
(db/org-agenda-list-deadlines
|
(db/org-agenda-list-deadlines
|
||||||
""
|
""
|
||||||
((org-agenda-overriding-header "Deadlines")
|
((org-agenda-overriding-header "Deadlines")
|
||||||
(org-agenda-sorting-strategy '(deadline-up priority-down))
|
(org-agenda-sorting-strategy '(deadline-up priority-down))
|
||||||
(org-deadline-warning-days 30)))
|
(org-deadline-warning-days 30)))
|
||||||
(tags-todo "TODO={CONT\\|ATTN}-HOLD-TIMESTAMP>\"<now>\""
|
(tags-todo "TODO={CONT\\|ATTN}-HOLD-TIMESTAMP>\"<now>\""
|
||||||
((org-agenda-overriding-header "WIP List (TODO ∈ {CONT,ATTN}, not scheduled now or in the future)")
|
((org-agenda-overriding-header "WIP List (TODO ∈ {CONT,ATTN}, not scheduled now or in the future)")
|
||||||
(org-agenda-todo-ignore-scheduled 0)))
|
(org-agenda-todo-ignore-scheduled 0)))
|
||||||
(tags-todo "TODO<>\"CONT\"-HOLD-SOMEWHEN-DATE-WAIT-TEMPLATE/-DONE"
|
(tags-todo "TODO<>\"CONT\"-HOLD-SOMEWHEN-DATE-WAIT-TEMPLATE/-DONE"
|
||||||
((org-agenda-overriding-header "Next Actions List (not WIP, not scheduled now or in the future)")
|
((org-agenda-overriding-header "Next Actions List (not WIP, not scheduled now or in the future)")
|
||||||
(org-tags-match-list-sublevels t)
|
(org-tags-match-list-sublevels t)
|
||||||
(org-agenda-todo-ignore-scheduled 0)))))
|
(org-agenda-todo-ignore-scheduled 0)))))
|
||||||
|
|
||||||
("B" "Backlog"
|
("B" "Backlog"
|
||||||
((tags-todo "-HOLD-SOMEWHEN-DATE-PERIODIC-TEMPLATE/-DONE"
|
((tags-todo "-HOLD-SOMEWHEN-DATE-PERIODIC-TEMPLATE/-DONE"
|
||||||
((org-agenda-overriding-header "Backlog: Actionable items (no periodic tasks; includes waiting-fors)")
|
((org-agenda-overriding-header "Backlog: Actionable items (no periodic tasks; includes waiting-fors)")
|
||||||
(org-tags-match-list-sublevels t)))
|
(org-tags-match-list-sublevels t)))
|
||||||
(tags "TODO=\"\"-HOLD-SOMEWHEN-DATE-PERIODIC-NOTE-NOP-TOPIC-TEMPLATE"
|
(tags "TODO=\"\"-HOLD-SOMEWHEN-DATE-PERIODIC-NOTE-NOP-TOPIC-TEMPLATE"
|
||||||
((org-agenda-overriding-header "Backlog: Complex tasks (i.e., goals)")
|
((org-agenda-overriding-header "Backlog: Complex tasks (i.e., goals)")
|
||||||
(org-tags-match-list-sublevels t)))))
|
(org-tags-match-list-sublevels t)))))
|
||||||
|
|
||||||
("C" "Checks"
|
("C" "Checks"
|
||||||
((tags "TODO=\"\"-HOLD-SOMEWHEN-DATE-PERIODIC-NOTE-NOP-TOPIC-TEMPLATE-GOAL"
|
((tags "TODO=\"\"-HOLD-SOMEWHEN-DATE-PERIODIC-NOTE-NOP-TOPIC-TEMPLATE-GOAL"
|
||||||
((org-agenda-overriding-header "Goals (i.e., complex tasks) not marked with GOAL")))
|
((org-agenda-overriding-header "Goals (i.e., complex tasks) not marked with GOAL")))
|
||||||
(org-ql-block '(and (not (tags "TOPIC"))
|
(org-ql-block '(and (not (tags "TOPIC"))
|
||||||
(descendants (tags "TOPIC")))
|
(descendants (tags "TOPIC")))
|
||||||
((org-ql-block-header "Non-TOPIC items containing TOPICs")
|
((org-ql-block-header "Non-TOPIC items containing TOPICs")
|
||||||
(org-agenda-sorting-strategy nil)))))
|
(org-agenda-sorting-strategy nil)))))
|
||||||
|
|
||||||
("U" "Unsupervised (Waiting, Missed Appointments, Hold)"
|
("U" "Unsupervised (Waiting, Missed Appointments, Hold)"
|
||||||
((tags-todo "WAIT-HOLD-SOMEWHEN"
|
((tags-todo "WAIT-HOLD-SOMEWHEN"
|
||||||
((org-agenda-overriding-header "Waiting For List")
|
((org-agenda-overriding-header "Waiting For List")
|
||||||
(org-agenda-todo-ignore-scheduled 0)))
|
(org-agenda-todo-ignore-scheduled 0)))
|
||||||
(tags-todo "DATE"
|
(tags-todo "DATE"
|
||||||
((org-agenda-overriding-header "Missed appointments (DATEs with timestamp in the past)")
|
((org-agenda-overriding-header "Missed appointments (DATEs with timestamp in the past)")
|
||||||
(org-agenda-todo-ignore-timestamp 0)))
|
(org-agenda-todo-ignore-timestamp 0)))
|
||||||
(tags "REFILE"
|
(tags "REFILE"
|
||||||
((org-agenda-files (list db/org-default-refile-file))
|
((org-agenda-files (list db/org-default-refile-file))
|
||||||
(org-agenda-overriding-header "Things to refile (make it empty!)")))
|
(org-agenda-overriding-header "Things to refile (make it empty!)")))
|
||||||
(tags-todo "HOLD"
|
(tags-todo "HOLD"
|
||||||
((org-agenda-overriding-header "Tasks on Hold")))))
|
((org-agenda-overriding-header "Tasks on Hold")))))
|
||||||
|
|
||||||
|
|
||||||
("S" "Somewhen (Do if nothing else to do, i.e., personal backlog)"
|
("S" "Somewhen (Do if nothing else to do, i.e., personal backlog)"
|
||||||
((tags "TAGS={SOMEWHEN}+TODO=\"\"-TAGS={NOP\\|TOPIC}-PERIODIC-DATE-SCHEDULED>=\"<+0d>\""
|
((tags "TAGS={SOMEWHEN}+TODO=\"\"-TAGS={NOP\\|TOPIC}-PERIODIC-DATE-SCHEDULED>=\"<+0d>\""
|
||||||
((org-agenda-overriding-header "Open Tasks to do SOMEWHEN (no TODO keyword, no PERIODIC, no DATE, no now or future SCHEDULED)")))
|
((org-agenda-overriding-header "Open Tasks to do SOMEWHEN (no TODO keyword, no PERIODIC, no DATE, no now or future SCHEDULED)")))
|
||||||
(tags-todo "SOMEWHEN/-CANC-DONE"
|
(tags-todo "SOMEWHEN/-CANC-DONE"
|
||||||
((org-agenda-overriding-header "Things To Do SOMEWHEN")
|
((org-agenda-overriding-header "Things To Do SOMEWHEN")
|
||||||
(org-agenda-todo-ignore-with-date t)
|
(org-agenda-todo-ignore-with-date t)
|
||||||
(org-tags-match-list-sublevels nil)))))
|
(org-tags-match-list-sublevels nil)))))
|
||||||
|
|
||||||
|
|
||||||
("P" "Current Projects and Topics"
|
("P" "Current Projects and Topics"
|
||||||
((stuck ""
|
((stuck ""
|
||||||
((org-agenda-overriding-header "Stuck Complex Tasks")))
|
((org-agenda-overriding-header "Stuck Complex Tasks")))
|
||||||
(tags "TAGS={NOTE}-TODO={CANC\\|DONE}-HOLD-NOP-SCHEDULED>=\"<+0d>\""
|
(tags "TAGS={NOTE}-TODO={CANC\\|DONE}-HOLD-NOP-SCHEDULED>=\"<+0d>\""
|
||||||
((org-agenda-overriding-header "Project Notes (items explicitly tagged with NOTE but not NOP, not scheduled now or in the future)")
|
((org-agenda-overriding-header "Project Notes (items explicitly tagged with NOTE but not NOP, not scheduled now or in the future)")
|
||||||
(org-agenda-prefix-format '((tags . "%-8c ")))))
|
(org-agenda-prefix-format '((tags . "%-8c ")))))
|
||||||
(tags "TAGS={TOPIC}-TODO={DONE\\|CANC}-SCHEDULED>=\"<+0d>\"-HOLD-WAIT"
|
(tags "TAGS={TOPIC}-TODO={DONE\\|CANC}-SCHEDULED>=\"<+0d>\"-HOLD-WAIT"
|
||||||
((org-agenda-overriding-header "Topics")
|
((org-agenda-overriding-header "Topics")
|
||||||
(org-agenda-prefix-format '((tags . "%-8c%l ")))
|
(org-agenda-prefix-format '((tags . "%-8c%l ")))
|
||||||
(org-agenda-sorting-strategy nil)))
|
(org-agenda-sorting-strategy nil)))
|
||||||
(tags "TAGS={PERIODIC}-TODO={DONE\\|CANC}-HOLD-SCHEDULED>=\"<+0d>\"-HOLD-WAIT"
|
(tags "TAGS={PERIODIC}-TODO={DONE\\|CANC}-HOLD-SCHEDULED>=\"<+0d>\"-HOLD-WAIT"
|
||||||
((org-agenda-overriding-header "Periodic Projects (PERIODIC, not scheduled in the future, not done, not on hold)")
|
((org-agenda-overriding-header "Periodic Projects (PERIODIC, not scheduled in the future, not done, not on hold)")
|
||||||
(org-agenda-prefix-format '((tags . "%-8c ")))))))
|
(org-agenda-prefix-format '((tags . "%-8c ")))))))
|
||||||
|
|
||||||
("W" "Weekly Review"
|
("W" "Weekly Review"
|
||||||
((agenda ""
|
((agenda ""
|
||||||
((org-agenda-span 7)
|
((org-agenda-span 7)
|
||||||
(org-agenda-dim-blocked-tasks nil)
|
(org-agenda-dim-blocked-tasks nil)
|
||||||
(org-agenda-skip-deadline-prewarning-if-scheduled t)))))))
|
(org-agenda-skip-deadline-prewarning-if-scheduled t)))))))
|
||||||
|
|
||||||
:config (progn
|
:config (progn
|
||||||
;; avoid important buffers to end up in `org-agenda-new-buffers’ by
|
;; avoid important buffers to end up in `org-agenda-new-buffers’ by
|
||||||
|
@ -1234,45 +1233,45 @@ respectively."
|
||||||
org-capture-bookmark nil
|
org-capture-bookmark nil
|
||||||
org-capture-templates
|
org-capture-templates
|
||||||
`(("t" "Simple Task"
|
`(("t" "Simple Task"
|
||||||
entry
|
entry
|
||||||
(file db/org-default-refile-file)
|
(file db/org-default-refile-file)
|
||||||
,(concat "* TODO [#B] %^{What}\n"
|
,(concat "* TODO [#B] %^{What}\n"
|
||||||
":PROPERTIES:\n:CREATED: %U\n:END:\n"
|
":PROPERTIES:\n:CREATED: %U\n:END:\n"
|
||||||
"%a\n"
|
"%a\n"
|
||||||
"%?")
|
"%?")
|
||||||
:empty-lines-after 1)
|
:empty-lines-after 1)
|
||||||
("g" "Record new goal with first item"
|
("g" "Record new goal with first item"
|
||||||
entry
|
entry
|
||||||
(file db/org-default-refile-file)
|
(file db/org-default-refile-file)
|
||||||
,(concat "* %^{Ticket Description} (%^{Ticket Number}) :GOAL:\n"
|
,(concat "* %^{Ticket Description} (%^{Ticket Number}) :GOAL:\n"
|
||||||
":PROPERTIES:\n:CREATED: %U\n:END:\n"
|
":PROPERTIES:\n:CREATED: %U\n:END:\n"
|
||||||
"\n** TODO [#B] %^{First Task}\n"
|
"\n** TODO [#B] %^{First Task}\n"
|
||||||
":PROPERTIES:\n:CREATED: %U\n:END:\n"
|
":PROPERTIES:\n:CREATED: %U\n:END:\n"
|
||||||
"\n%?"))
|
"\n%?"))
|
||||||
("n" "Note"
|
("n" "Note"
|
||||||
entry
|
entry
|
||||||
(file db/org-default-refile-file)
|
(file db/org-default-refile-file)
|
||||||
"* Note: %^{About} :NOTE:\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n%?"
|
"* Note: %^{About} :NOTE:\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n%?"
|
||||||
:empty-lines-after 1)
|
:empty-lines-after 1)
|
||||||
("d" "Date"
|
("d" "Date"
|
||||||
entry
|
entry
|
||||||
(file db/org-default-refile-file)
|
(file db/org-default-refile-file)
|
||||||
"* GOTO [#B] %^{What} :DATE:\n%^{When}t\n%a%?"
|
"* GOTO [#B] %^{What} :DATE:\n%^{When}t\n%a%?"
|
||||||
:empty-lines-after 1)
|
:empty-lines-after 1)
|
||||||
("i" "Interruptions"
|
("i" "Interruptions"
|
||||||
entry
|
entry
|
||||||
(file db/org-default-refile-file)
|
(file db/org-default-refile-file)
|
||||||
,(concat "* DONE [#B] %^{What}\nCLOSED: %U\n"
|
,(concat "* DONE [#B] %^{What}\nCLOSED: %U\n"
|
||||||
":PROPERTIES:\n:CREATED: %U\n:END:\n"
|
":PROPERTIES:\n:CREATED: %U\n:END:\n"
|
||||||
"\nInterrupted %(with-temp-buffer (db/org-add-link-to-current-clock) (buffer-string))\n\n%?")
|
"\nInterrupted %(with-temp-buffer (db/org-add-link-to-current-clock) (buffer-string))\n\n%?")
|
||||||
:clock-in t :clock-resume t :empty-lines-after 1)
|
:clock-in t :clock-resume t :empty-lines-after 1)
|
||||||
("r" "respond"
|
("r" "respond"
|
||||||
entry
|
entry
|
||||||
(file db/org-default-refile-file)
|
(file db/org-default-refile-file)
|
||||||
,(concat "* TODO [#B] Reply: %:subject (%:from) :EMAIL:\n"
|
,(concat "* TODO [#B] Reply: %:subject (%:from) :EMAIL:\n"
|
||||||
":PROPERTIES:\n:CREATED: %U\n:END:\n"
|
":PROPERTIES:\n:CREATED: %U\n:END:\n"
|
||||||
"\n%a\n%?")
|
"\n%a\n%?")
|
||||||
:empty-lines-after 1)))
|
:empty-lines-after 1)))
|
||||||
:config (progn
|
:config (progn
|
||||||
;; disable usage of helm for `org-capture'
|
;; disable usage of helm for `org-capture'
|
||||||
(with-eval-after-load 'helm-mode
|
(with-eval-after-load 'helm-mode
|
||||||
|
@ -1294,16 +1293,16 @@ respectively."
|
||||||
host port user password database)
|
host port user password database)
|
||||||
"Ask for PASSWORD if not given, and call ORIG-FUN with arguments afterwards."
|
"Ask for PASSWORD if not given, and call ORIG-FUN with arguments afterwards."
|
||||||
(cond
|
(cond
|
||||||
((not (or (and user database host port)
|
((not (or (and user database host port)
|
||||||
(and user database)))
|
(and user database)))
|
||||||
(user-error "Insufficient login credentials given, aborting"))
|
(user-error "Insufficient login credentials given, aborting"))
|
||||||
(password
|
(password
|
||||||
(funcall orig-fun host port user password database))
|
(funcall orig-fun host port user password database))
|
||||||
(t
|
(t
|
||||||
(funcall orig-fun
|
(funcall orig-fun
|
||||||
host port user
|
host port user
|
||||||
(password-read (format "Password for %s@%s: " user database))
|
(password-read (format "Password for %s@%s: " user database))
|
||||||
database))))
|
database))))
|
||||||
|
|
||||||
(advice-add #'org-babel-sql-dbstring-oracle
|
(advice-add #'org-babel-sql-dbstring-oracle
|
||||||
:around #'db/ob-sql-oracle-ask-for-password)))
|
:around #'db/ob-sql-oracle-ask-for-password)))
|
||||||
|
@ -2086,9 +2085,9 @@ respectively."
|
||||||
|
|
||||||
(use-package dired-x
|
(use-package dired-x
|
||||||
:commands (dired-jump dired-jump-other-window) ; In Emacs 28.1, this has been
|
:commands (dired-jump dired-jump-other-window) ; In Emacs 28.1, this has been
|
||||||
; moved to dired.el, but we'll
|
; moved to dired.el, but we'll
|
||||||
; keep it here to support Emacs
|
; keep it here to support Emacs
|
||||||
; 27.2 as well.
|
; 27.2 as well.
|
||||||
:init (setq dired-clean-confirm-killing-deleted-buffers t
|
:init (setq dired-clean-confirm-killing-deleted-buffers t
|
||||||
dired-x-hands-off-my-keys t
|
dired-x-hands-off-my-keys t
|
||||||
dired-bind-man nil
|
dired-bind-man nil
|
||||||
|
@ -2702,8 +2701,8 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
(use-package clojure-mode
|
(use-package clojure-mode
|
||||||
:config (progn
|
:config (progn
|
||||||
(define-clojure-indent
|
(define-clojure-indent
|
||||||
(forall 'defun)
|
(forall 'defun)
|
||||||
(exists 'defun)
|
(exists 'defun)
|
||||||
(dopar 'defun))
|
(dopar 'defun))
|
||||||
(add-hook 'clojure-mode-hook 'turn-on-lispy-when-available)
|
(add-hook 'clojure-mode-hook 'turn-on-lispy-when-available)
|
||||||
(add-hook 'clojure-mode-hook 'clj-refactor-mode)
|
(add-hook 'clojure-mode-hook 'clj-refactor-mode)
|
||||||
|
@ -2846,14 +2845,14 @@ With given ARG, display files in `db/important-document-path’."
|
||||||
(concat (cadr reftex-insert-label-flags) "TLPDRCE"))
|
(concat (cadr reftex-insert-label-flags) "TLPDRCE"))
|
||||||
|
|
||||||
(dolist (label-spec
|
(dolist (label-spec
|
||||||
'(("Theorem" ?T "thm:" "~\\ref{%s}" t ("Theorem" "Thm.") nil)
|
'(("Theorem" ?T "thm:" "~\\ref{%s}" t ("Theorem" "Thm.") nil)
|
||||||
("Lemma" ?L "lem:" "~\\ref{%s}" t ("Lemma" "Lem.") nil)
|
("Lemma" ?L "lem:" "~\\ref{%s}" t ("Lemma" "Lem.") nil)
|
||||||
("Proposition" ?P "prop:" "~\\ref{%s}" t ("Proposition" "Prop.") nil)
|
("Proposition" ?P "prop:" "~\\ref{%s}" t ("Proposition" "Prop.") nil)
|
||||||
("Satz" ?T "thm:" "~\\ref{%s}" t ("Satz") nil)
|
("Satz" ?T "thm:" "~\\ref{%s}" t ("Satz") nil)
|
||||||
("Definition" ?D "def:" "~\\ref{%s}" t ("Definition" "Def.") nil)
|
("Definition" ?D "def:" "~\\ref{%s}" t ("Definition" "Def.") nil)
|
||||||
("Remark" ?R "rem:" "~\\ref{%s}" t ("Remark" "Rem.") nil)
|
("Remark" ?R "rem:" "~\\ref{%s}" t ("Remark" "Rem.") nil)
|
||||||
("Corollary" ?C "cor:" "~\\ref{%s}" t ("Corollary" "Cor.") nil)
|
("Corollary" ?C "cor:" "~\\ref{%s}" t ("Corollary" "Cor.") nil)
|
||||||
("Example" ?E "expl:" "~\\ref{%s}" t ("Example") nil)))
|
("Example" ?E "expl:" "~\\ref{%s}" t ("Example") nil)))
|
||||||
(add-to-list 'reftex-label-alist label-spec)
|
(add-to-list 'reftex-label-alist label-spec)
|
||||||
(add-to-list 'LaTeX-label-alist (cons (nth 0 label-spec)
|
(add-to-list 'LaTeX-label-alist (cons (nth 0 label-spec)
|
||||||
(nth 2 label-spec))))))
|
(nth 2 label-spec))))))
|
||||||
|
|
|
@ -137,7 +137,7 @@ With a prefix argument P, isearch for the symbol at point."
|
||||||
(call-interactively
|
(call-interactively
|
||||||
(if p
|
(if p
|
||||||
#'isearch-forward-symbol-at-point
|
#'isearch-forward-symbol-at-point
|
||||||
#'isearch-forward))))
|
#'isearch-forward))))
|
||||||
|
|
||||||
(defun endless/fill-or-unfill ()
|
(defun endless/fill-or-unfill ()
|
||||||
"Like `fill-paragraph', but unfill if used twice."
|
"Like `fill-paragraph', but unfill if used twice."
|
||||||
|
@ -211,12 +211,12 @@ might depend on the coding system of the current buffer."
|
||||||
HIGH and LOW must both be 8 digit hex strings. If not given,
|
HIGH and LOW must both be 8 digit hex strings. If not given,
|
||||||
FORMAT-STRING defaults to some ISO 8601-like format."
|
FORMAT-STRING defaults to some ISO 8601-like format."
|
||||||
(interactive (cl-flet ((read-hex (prompt)
|
(interactive (cl-flet ((read-hex (prompt)
|
||||||
(let ((input-proper (->> prompt
|
(let ((input-proper (->> prompt
|
||||||
(read-string)
|
(read-string)
|
||||||
(replace-regexp-in-string "[\n\t ]" ""))))
|
(replace-regexp-in-string "[\n\t ]" ""))))
|
||||||
(if (not (string-match-p "[0-9a-fA-F]\\{8\\}" input-proper))
|
(if (not (string-match-p "[0-9a-fA-F]\\{8\\}" input-proper))
|
||||||
(user-error "Input invalid, must be an 8 digit hex string.")
|
(user-error "Input invalid, must be an 8 digit hex string.")
|
||||||
(string-to-number input-proper 16)))))
|
(string-to-number input-proper 16)))))
|
||||||
(list (read-hex "High (hex): ")
|
(list (read-hex "High (hex): ")
|
||||||
(read-hex "Low (hex): "))))
|
(read-hex "Low (hex): "))))
|
||||||
(let* ((calc-internal-prec 30)
|
(let* ((calc-internal-prec 30)
|
||||||
|
@ -296,27 +296,27 @@ Will print a warning in case of failure."
|
||||||
|
|
||||||
(save-mark-and-excursion
|
(save-mark-and-excursion
|
||||||
|
|
||||||
;; First make it all into one line
|
;; First make it all into one line
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward "\n[\t ]*" nil 'no-error)
|
(while (re-search-forward "\n[\t ]*" nil 'no-error)
|
||||||
;; In case there was a space, we have to keep at least one as a separator
|
;; In case there was a space, we have to keep at least one as a separator
|
||||||
(if (save-match-data (looking-back "[\t ]" 1))
|
(if (save-match-data (looking-back "[\t ]" 1))
|
||||||
(replace-match " ")
|
(replace-match " ")
|
||||||
(replace-match "")))
|
(replace-match "")))
|
||||||
|
|
||||||
;; Next break between tags
|
;; Next break between tags
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward ">[\t ]*<" nil 'no-error)
|
(while (re-search-forward ">[\t ]*<" nil 'no-error)
|
||||||
(replace-match ">\n<"))
|
(replace-match ">\n<"))
|
||||||
|
|
||||||
;; Move opening and closing tags to same line in case there’s nothing in
|
;; Move opening and closing tags to same line in case there’s nothing in
|
||||||
;; between
|
;; between
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward "<\\([^>]*\\)>\n</\\1>" nil 'no-error)
|
(while (re-search-forward "<\\([^>]*\\)>\n</\\1>" nil 'no-error)
|
||||||
(replace-match "<\\1></\\1>"))
|
(replace-match "<\\1></\\1>"))
|
||||||
|
|
||||||
;; Indent
|
;; Indent
|
||||||
(indent-region (point-min) (point-max))))
|
(indent-region (point-min) (point-max))))
|
||||||
|
|
||||||
(defun db/lookup-smime-key (mail)
|
(defun db/lookup-smime-key (mail)
|
||||||
"Look up `MAIL' on ldap-server of the DFN.
|
"Look up `MAIL' on ldap-server of the DFN.
|
||||||
|
@ -379,12 +379,12 @@ This runs “git annex find” with MATCHING-OPTIONS (a string) in
|
||||||
(defun db/system-open (path)
|
(defun db/system-open (path)
|
||||||
"Open PATH with default program as defined by the underlying system."
|
"Open PATH with default program as defined by the underlying system."
|
||||||
(cond
|
(cond
|
||||||
((eq system-type 'windows-nt)
|
((eq system-type 'windows-nt)
|
||||||
(w32-shell-execute "open" path))
|
(w32-shell-execute "open" path))
|
||||||
((eq system-type 'cygwin)
|
((eq system-type 'cygwin)
|
||||||
(start-process "" nil "cygstart" path))
|
(start-process "" nil "cygstart" path))
|
||||||
(t
|
(t
|
||||||
(start-process "" nil "xdg-open" path))))
|
(start-process "" nil "xdg-open" path))))
|
||||||
|
|
||||||
(defun keyboard-quit-context+ ()
|
(defun keyboard-quit-context+ ()
|
||||||
"Quit current context.
|
"Quit current context.
|
||||||
|
@ -404,10 +404,10 @@ regardless of the currently selected window."
|
||||||
(current-prefix-arg
|
(current-prefix-arg
|
||||||
nil)
|
nil)
|
||||||
(defining-kbd-macro
|
(defining-kbd-macro
|
||||||
(message
|
(message
|
||||||
(substitute-command-keys
|
(substitute-command-keys
|
||||||
"Quit is ignored during macro defintion, use \\[kmacro-end-macro] if you want to stop macro definition"))
|
"Quit is ignored during macro defintion, use \\[kmacro-end-macro] if you want to stop macro definition"))
|
||||||
(cancel-kbd-macro-events))
|
(cancel-kbd-macro-events))
|
||||||
((active-minibuffer-window)
|
((active-minibuffer-window)
|
||||||
(when (get-buffer-window "*Completions*")
|
(when (get-buffer-window "*Completions*")
|
||||||
;; hide completions first so point stays in active window when
|
;; hide completions first so point stays in active window when
|
||||||
|
@ -511,7 +511,7 @@ From: https://oremacs.com/2017/03/18/dired-ediff/."
|
||||||
|
|
||||||
(-each-indexed (string-to-list base45-alphabet)
|
(-each-indexed (string-to-list base45-alphabet)
|
||||||
(-lambda (index char)
|
(-lambda (index char)
|
||||||
(puthash char index decode-hash-table)
|
(puthash char index decode-hash-table)
|
||||||
;; Add an encode-hash-table here in case base45-encode-string will ever be
|
;; Add an encode-hash-table here in case base45-encode-string will ever be
|
||||||
;; written, like so: (puthash index char encode-hash-table)
|
;; written, like so: (puthash index char encode-hash-table)
|
||||||
))
|
))
|
||||||
|
@ -573,7 +573,7 @@ From: https://oremacs.com/2017/03/18/dired-ediff/."
|
||||||
("%69 VD92EX0" "Hello!!")
|
("%69 VD92EX0" "Hello!!")
|
||||||
("VV4:97Y+AHA7MY831" "%69 VD92EX0"))
|
("VV4:97Y+AHA7MY831" "%69 VD92EX0"))
|
||||||
(-lambda ((in out))
|
(-lambda ((in out))
|
||||||
(should (equal out (db/base45-decode-string in))))))
|
(should (equal out (db/base45-decode-string in))))))
|
||||||
|
|
||||||
(defun db/base45-decode-region (beg end)
|
(defun db/base45-decode-region (beg end)
|
||||||
"Base45-decode region between BEG and END.
|
"Base45-decode region between BEG and END.
|
||||||
|
|
Loading…
Reference in New Issue