summary refs log tree commit diff stats
path: root/config.org
diff options
context:
space:
mode:
authorCase Duckworth2021-02-20 15:35:05 -0600
committerCase Duckworth2021-02-20 15:35:05 -0600
commit49687857df8459eb9333c7a57d12c626dc174264 (patch)
tree97b83f5b993ebef7fcfb0d5186a282b00bc504ce /config.org
parentAdd local weather RSS feed (diff)
parentAdd messages to init.el (diff)
downloademacs-49687857df8459eb9333c7a57d12c626dc174264.tar.gz
emacs-49687857df8459eb9333c7a57d12c626dc174264.zip
Merge branch 'main' of https://tildegit.org/acdw/emacs into main
Diffstat (limited to 'config.org')
-rw-r--r--config.org109
1 files changed, 93 insertions, 16 deletions
diff --git a/config.org b/config.org index 9606e1d..288665b 100644 --- a/config.org +++ b/config.org
@@ -1338,7 +1338,7 @@ the user is looking at something else.
1338 1338
1339** Garbage collection 1339** Garbage collection
1340 1340
1341*** Garbage Collection Magic Hack :package: 1341*** COMMENT Garbage Collection Magic Hack :package:
1342 1342
1343Look, I'm not going to look too deeply into this. It's /magic/ afer 1343Look, I'm not going to look too deeply into this. It's /magic/ afer
1344all. 1344all.
@@ -1352,6 +1352,31 @@ all.
1352 (blackout 'gcmh-mode) 1352 (blackout 'gcmh-mode)
1353#+end_src 1353#+end_src
1354 1354
1355*** Simple GC munging about
1356
1357From [[https://bling.github.io/blog/2016/01/18/why-are-you-changing-gc-cons-threshold/][bling]], from ... 2016? Maybe this isn't great, but it's one less package so
1358I'm going to try it for now.
1359
1360#+begin_src emacs-lisp :noweb-ref hooks
1361 (defconst gc-cons-basis (* 800 1000)
1362 "The basis value to which to return after a max jump.
1363
1364 800,000 (800 KB) is Emacs' default.")
1365
1366 (defun hook--gc-cons-maximize ()
1367 "Set `gc-cons-threshold' to the highest possible.
1368 For memory-intensive features."
1369 (setq gc-cons-threshold most-positive-fixnum))
1370
1371 (defun hook--gc-cons-baseline ()
1372 "Return `gc-cons-threshold' to `gc-cons-basis'.
1373 For after memory intensive operations."
1374 (setq gc-cons-threshold gc-cons-basis))
1375
1376 (add-hook 'minibuffer-setup-hook #'hook--gc-cons-maximize)
1377 (add-hook 'minibuffer-exit-hook #'hook--gc-cons-baseline)
1378#+end_src
1379
1355*** Garbage Collect when out of focus 1380*** Garbage Collect when out of focus
1356 1381
1357#+begin_src emacs-lisp :noweb-ref hooks 1382#+begin_src emacs-lisp :noweb-ref hooks
@@ -1728,6 +1753,17 @@ look like. =anzu= does /most/ of this, except the wrapping around part --
1728the two packages to play nice together. Until then, I'll just use 1753the two packages to play nice together. Until then, I'll just use
1729=anzu= and =isearch=, which is honestly a pretty good search package. 1754=anzu= and =isearch=, which is honestly a pretty good search package.
1730 1755
1756*** Isearch
1757
1758I want to search by regexp by default.
1759
1760#+begin_src emacs-lisp :noweb-ref bindings
1761 (define-key acdw/map (kbd "C-s") #'isearch-forward-regexp)
1762 (define-key acdw/map (kbd "C-r") #'isearch-backward-regexp)
1763 (define-key acdw/map (kbd "C-M-s") #'isearch-forward)
1764 (define-key acdw/map (kbd "C-M-r") #'isearch-backward)
1765#+end_src
1766
1731*** Anzu setup 1767*** Anzu setup
1732 1768
1733#+begin_src emacs-lisp :noweb-ref packages 1769#+begin_src emacs-lisp :noweb-ref packages
@@ -1781,6 +1817,14 @@ already commented. That's it.
1781 (acdw/bind "M-;" #'comment-or-uncomment-region) 1817 (acdw/bind "M-;" #'comment-or-uncomment-region)
1782#+end_src 1818#+end_src
1783 1819
1820** Goto address mode
1821
1822"Buttonize URLs and Email addresses."
1823
1824#+begin_src emacs-lisp :noweb-ref modes
1825 (global-goto-address-mode +1)
1826#+end_src
1827
1784* Writing 1828* Writing
1785 1829
1786** Word count 1830** Word count
@@ -2189,20 +2233,6 @@ that one item is.
2189 (acdw/bind "g" #'magit-status :map acdw/leader) 2233 (acdw/bind "g" #'magit-status :map acdw/leader)
2190#+end_src 2234#+end_src
2191 2235
2192**** Use =~/.authinfo= for passwords
2193
2194The =auth-info= line should look like this:
2195
2196#+begin_example
2197machine git.example.com user acdw password hahayeahrightyamoroniwouldn'tgiveyouthat
2198#+end_example
2199
2200#+begin_src emacs-lisp :noweb-ref hooks
2201 (autoload 'magit-process-password-auth-source "magit")
2202 (add-hook 'magit-process-find-password-functions
2203 #'magit-process-password-auth-source)
2204#+end_src
2205
2206**** Windows setup 2236**** Windows setup
2207 2237
2208Following the [[https://github.com/magit/magit/wiki/Pushing-with-Magit-from-Windows][wiki page located here]]. Also make sure to run the 2238Following the [[https://github.com/magit/magit/wiki/Pushing-with-Magit-from-Windows][wiki page located here]]. Also make sure to run the
@@ -3214,6 +3244,51 @@ This function require [[https://github.com/simonthum/git-sync][git-sync]].
3214 (define-key acdw/leader (kbd "C-M-f") #'acdw/git-sync-elfeed-db) 3244 (define-key acdw/leader (kbd "C-M-f") #'acdw/git-sync-elfeed-db)
3215#+end_src 3245#+end_src
3216 3246
3247*** Passwords
3248
3249**** Password cache
3250
3251#+begin_src emacs-lisp :noweb-ref settings
3252 (setq-default password-cache-expiry nil)
3253#+end_src
3254
3255**** Use =~/.authinfo= for passwords
3256
3257The =auth-info= line should look like this:
3258
3259#+begin_example
3260machine git.example.com user acdw password hahayeahrightyamoroniwouldn'tgiveyouthat
3261#+end_example
3262
3263#+begin_src emacs-lisp :noweb-ref hooks
3264 (autoload 'magit-process-password-auth-source "magit")
3265 (add-hook 'magit-process-find-password-functions
3266 #'magit-process-password-auth-source)
3267#+end_src
3268
3269*** TRAMP
3270
3271It stands for ... something kind of stupid, I don't remember. I'm pulling this
3272from [[https://github.com/grandfoobah/spartan-emacs/blob/master/spartan-layers/spartan-settings.el][Spartan Emacs]]. It recommends the following in =~/.ssh/config=:
3273
3274#+begin_example
3275 Host *
3276 ForwardAgent yes
3277 AddKeysToAgent yes
3278 ControlMaster auto
3279 ControlPath ~/.ssh/master-%r@%h:%p
3280 ControlPersist yes
3281 ServerAliveInterval 10
3282 ServerAliveCountMax 10
3283#+end_example
3284
3285#+begin_src emacs-lisp :noweb-ref settings
3286 (setq-default tramp-default-method "ssh"
3287 tramp-copy-size-limit nil
3288 tramp-use-ssh-controlmaster-options nil
3289 tramp-default-remote-shell "/bin/bash")
3290#+end_src
3291
3217** Linux (home) 3292** Linux (home)
3218:PROPERTIES: 3293:PROPERTIES:
3219:header-args: :noweb-ref linux-specific 3294:header-args: :noweb-ref linux-specific
@@ -3554,8 +3629,10 @@ the needed boolean expression to tangle config.org. Booleans, yall!
3554 (when (file-exists-p straight-org-dir) 3629 (when (file-exists-p straight-org-dir)
3555 (add-to-list 'load-path straight-org-dir)) 3630 (add-to-list 'load-path straight-org-dir))
3556 ;; Load config.org 3631 ;; Load config.org
3632 (message "%s..." "Loading config.org")
3557 (require 'org) 3633 (require 'org)
3558 (org-babel-load-file config.org))) 3634 (org-babel-load-file config.org)
3635 (message "%s... Done" "Loading config.org")))
3559 3636
3560 ;;; init.el ends here 3637 ;;; init.el ends here
3561#+end_src 3638#+end_src