summary refs log tree commit diff stats
path: root/config.org
diff options
context:
space:
mode:
authorCase Duckworth2021-01-04 13:39:34 -0600
committerCase Duckworth2021-01-04 13:39:34 -0600
commit91a79651a7a0f23798b1e1e1cb1d6ccb9bb82ad5 (patch)
treea46d85a9e04eefb0f2e8682a3d74207837c89411 /config.org
parentAdd PDF Tools (diff)
downloademacs-91a79651a7a0f23798b1e1e1cb1d6ccb9bb82ad5.tar.gz
emacs-91a79651a7a0f23798b1e1e1cb1d6ccb9bb82ad5.zip
Add at-work and at-home macros
Once I figure out what else I might want to determine, and how I’d want to specify
them, I might turn these into a more general macro ‘when-at’, the second argument of
which would be a keyword (defined where?) that would specify how to tell where we
are (a predicate?).
Diffstat (limited to 'config.org')
-rw-r--r--config.org22
1 files changed, 20 insertions, 2 deletions
diff --git a/config.org b/config.org index e511c8d..1b81d0d 100644 --- a/config.org +++ b/config.org
@@ -5,7 +5,7 @@
5#+EXPORT_FILE_NAME: README.md 5#+EXPORT_FILE_NAME: README.md
6#+OPTIONS: toc:nil 6#+OPTIONS: toc:nil
7#+BANKRUPTCY_COUNT: 3.2 7#+BANKRUPTCY_COUNT: 3.2
8#+Time-stamp: <2021-01-03 14:46:41 acdw> 8#+Time-stamp: <2021-01-04 13:39:13 acdw>
9 9
10* Basics 10* Basics
11 11
@@ -138,6 +138,24 @@ This comes in handy when I want to garbage collect, say, or save recent files.
138 (apply func args))) 138 (apply func args)))
139 #+end_src 139 #+end_src
140 140
141*** Determine where I am
142
143I use Emacs at home, with Linux, and at work, with Windows.
144
145#+begin_src emacs-lisp
146 (defmacro at-work (&rest commands)
147 "Only do COMMANDS when at work."
148 (declare (indent defun))
149 `(when (memq system-type '(ms-dos windows-nt))
150 ,@commands))
151
152 (defmacro at-home (&rest commands)
153 "Only do COMMANDS when at home."
154 (declare (indent defun))
155 `(when (memq system-type '(gnu gnu/linux gnu/kfreebsd))
156 ,@commands))
157#+end_src
158
141** Clean =.emacs.d= 159** Clean =.emacs.d=
142 160
143#+BEGIN_SRC emacs-lisp 161#+BEGIN_SRC emacs-lisp
@@ -1528,7 +1546,7 @@ I’m only enabling this at home for now, since it requires building stuff.
1528 "Disable `visual-fill-column-mode'." 1546 "Disable `visual-fill-column-mode'."
1529 (visual-fill-column-mode -1)) 1547 (visual-fill-column-mode -1))
1530 1548
1531 (when (memq system-type '(gnu/linux)) 1549 (at-home
1532 (straight-use-package 'pdf-tools) 1550 (straight-use-package 'pdf-tools)
1533 (pdf-loader-install) 1551 (pdf-loader-install)
1534 1552