From 78d7699645a52bdf0efee7efee3df34f75af8211 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 20 Feb 2021 00:41:12 -0600 Subject: Replace GCMH with a dumber thing that might work as well --- config.org | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'config.org') diff --git a/config.org b/config.org index b23420f..180d009 100644 --- a/config.org +++ b/config.org @@ -1299,7 +1299,7 @@ the user is looking at something else. ** Garbage collection -*** Garbage Collection Magic Hack :package: +*** COMMENT Garbage Collection Magic Hack :package: Look, I'm not going to look too deeply into this. It's /magic/ afer all. @@ -1313,6 +1313,31 @@ all. (blackout 'gcmh-mode) #+end_src +*** Simple GC munging about + +From [[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 +I'm going to try it for now. + +#+begin_src emacs-lisp :noweb-ref hooks + (defconst gc-cons-basis (* 800 1000) + "The basis value to which to return after a max jump. + + 800,000 (800 KB) is Emacs' default.") + + (defun hook--gc-cons-maximize () + "Set `gc-cons-threshold' to the highest possible. + For memory-intensive features." + (setq gc-cons-threshold most-positive-fixnum)) + + (defun hook--gc-cons-baseline () + "Return `gc-cons-threshold' to `gc-cons-basis'. + For after memory intensive operations." + (setq gc-cons-threshold gc-cons-basis)) + + (add-hook 'minibuffer-setup-hook #'hook--gc-cons-maximize) + (add-hook 'minibuffer-exit-hook #'hook--gc-cons-baseline) +#+end_src + *** Garbage Collect when out of focus #+begin_src emacs-lisp :noweb-ref hooks -- cgit 1.4.1-21-gabe81 From bc3ff0166305e2510876c6fb9e5cbc63ce19935a Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 20 Feb 2021 00:41:24 -0600 Subject: Search by regexp defaultly --- config.org | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'config.org') diff --git a/config.org b/config.org index 180d009..0f40e1f 100644 --- a/config.org +++ b/config.org @@ -1714,6 +1714,17 @@ look like. =anzu= does /most/ of this, except the wrapping around part -- the two packages to play nice together. Until then, I'll just use =anzu= and =isearch=, which is honestly a pretty good search package. +*** Isearch + +I want to search by regexp by default. + +#+begin_src emacs-lisp :noweb-ref bindings + (define-key acdw/map (kbd "C-s") #'isearch-forward-regexp) + (define-key acdw/map (kbd "C-r") #'isearch-backward-regexp) + (define-key acdw/map (kbd "C-M-s") #'isearch-forward) + (define-key acdw/map (kbd "C-M-r") #'isearch-backward) +#+end_src + *** Anzu setup #+begin_src emacs-lisp :noweb-ref packages -- cgit 1.4.1-21-gabe81 From 16bf1a658e6fd4526cbbc8a5858ed29956d35520 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 20 Feb 2021 00:41:34 -0600 Subject: Enable global-goto-address-mode --- config.org | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config.org') diff --git a/config.org b/config.org index 0f40e1f..4faef32 100644 --- a/config.org +++ b/config.org @@ -1778,6 +1778,14 @@ already commented. That's it. (define-key acdw/map (kbd "M-;") #'comment-or-uncomment-region) #+end_src +** Goto address mode + +"Buttonize URLs and Email addresses." + +#+begin_src emacs-lisp :noweb-ref modes + (global-goto-address-mode +1) +#+end_src + * Writing ** Word count -- cgit 1.4.1-21-gabe81 From 9ab4b99d7e93679f4ca4ce7b5f659553152f5b6c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 20 Feb 2021 00:41:48 -0600 Subject: Move password stuff and add Tramp config --- config.org | 59 +++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 14 deletions(-) (limited to 'config.org') diff --git a/config.org b/config.org index 4faef32..954f7a7 100644 --- a/config.org +++ b/config.org @@ -2194,20 +2194,6 @@ that one item is. (define-key acdw/leader "g" #'magit-status) #+end_src -**** Use =~/.authinfo= for passwords - -The =auth-info= line should look like this: - -#+begin_example -machine git.example.com user acdw password hahayeahrightyamoroniwouldn'tgiveyouthat -#+end_example - -#+begin_src emacs-lisp :noweb-ref hooks - (autoload 'magit-process-password-auth-source "magit") - (add-hook 'magit-process-find-password-functions - #'magit-process-password-auth-source) -#+end_src - **** Windows setup Following the [[https://github.com/magit/magit/wiki/Pushing-with-Magit-from-Windows][wiki page located here]]. Also make sure to run the @@ -3218,6 +3204,51 @@ This function require [[https://github.com/simonthum/git-sync][git-sync]]. (define-key acdw/leader (kbd "C-M-f") #'acdw/git-sync-elfeed-db) #+end_src +*** Passwords + +**** Password cache + +#+begin_src emacs-lisp :noweb-ref settings + (setq-default password-cache-expiry nil) +#+end_src + +**** Use =~/.authinfo= for passwords + +The =auth-info= line should look like this: + +#+begin_example +machine git.example.com user acdw password hahayeahrightyamoroniwouldn'tgiveyouthat +#+end_example + +#+begin_src emacs-lisp :noweb-ref hooks + (autoload 'magit-process-password-auth-source "magit") + (add-hook 'magit-process-find-password-functions + #'magit-process-password-auth-source) +#+end_src + +*** TRAMP + +It stands for ... something kind of stupid, I don't remember. I'm pulling this +from [[https://github.com/grandfoobah/spartan-emacs/blob/master/spartan-layers/spartan-settings.el][Spartan Emacs]]. It recommends the following in =~/.ssh/config=: + +#+begin_example + Host * + ForwardAgent yes + AddKeysToAgent yes + ControlMaster auto + ControlPath ~/.ssh/master-%r@%h:%p + ControlPersist yes + ServerAliveInterval 10 + ServerAliveCountMax 10 +#+end_example + +#+begin_src emacs-lisp :noweb-ref settings + (setq-default tramp-default-method "ssh" + tramp-copy-size-limit nil + tramp-use-ssh-controlmaster-options nil + tramp-default-remote-shell "/bin/bash") +#+end_src + ** Linux (home) :PROPERTIES: :header-args: :noweb-ref linux-specific -- cgit 1.4.1-21-gabe81 From 0f95206684a3675d7618cc7e89a6f314f2cd6429 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 20 Feb 2021 00:42:20 -0600 Subject: Add messages to init.el --- config.org | 4 +++- init.el | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'config.org') diff --git a/config.org b/config.org index 954f7a7..5aae931 100644 --- a/config.org +++ b/config.org @@ -3589,8 +3589,10 @@ the needed boolean expression to tangle config.org. Booleans, yall! (when (file-exists-p straight-org-dir) (add-to-list 'load-path straight-org-dir)) ;; Load config.org + (message "%s..." "Loading config.org") (require 'org) - (org-babel-load-file config.org))) + (org-babel-load-file config.org) + (message "%s... Done" "Loading config.org"))) ;;; init.el ends here #+end_src diff --git a/init.el b/init.el index 4741a4f..2fdd1c9 100644 --- a/init.el +++ b/init.el @@ -42,7 +42,9 @@ (when (file-exists-p straight-org-dir) (add-to-list 'load-path straight-org-dir)) ;; Load config.org + (message "%s..." "Loading config.org") (require 'org) - (org-babel-load-file config.org))) + (org-babel-load-file config.org) + (message "%s... Done" "Loading config.org"))) ;;; init.el ends here -- cgit 1.4.1-21-gabe81