From a933131b4bb65ee4fca330ad359235871b9b46f6 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 9 Feb 2021 16:51:35 -0600 Subject: Change the Advocate feed Hopefully this'll be less noisy. If it's not ... I'll just have to unsubscribe, TBH. --- config.org | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'config.org') diff --git a/config.org b/config.org index 386363f..0f9af2f 100644 --- a/config.org +++ b/config.org @@ -2108,7 +2108,16 @@ See [[https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/mast ("https://aiweirdness.com/rss" tech) ("http://tilde.town/~m455/javapool.rss" tilde) ("https://spwhitton.name/blog/index.rss" blags) - ("https://www.theadvocate.com/search/?f=rss&t=article&l=50" news) + (,(concat "https://www.theadvocate.com/search/?" + ;; Let's Build A URL!!! + "f=rss" ; RSS feed + "&l=10" ; 10 most recent (length) + "&c[]=" ; I'm guessing ... categories? + "baton_rouge/news*," + "baton_rouge/opinion*" + "?t=article" ; type=article + ) + news) ("https://esoteric.codes/rss" tech) ("https://wphicks.github.io/feed.xml" blags) )) -- cgit 1.4.1-21-gabe81 From 2f81a1036e82403aeb50c9aa9b86ea332f053033 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 9 Feb 2021 19:02:48 -0600 Subject: Add save-some-buffers to org-sync command --- config.org | 1 + 1 file changed, 1 insertion(+) (limited to 'config.org') diff --git a/config.org b/config.org index 386363f..88c708f 100644 --- a/config.org +++ b/config.org @@ -2840,6 +2840,7 @@ run =git-sync= in =org-directory=. Requires git-sync." (interactive) + (save-some-buffers :no-query nil) (async-shell-command (format "git -C %s sync" (expand-file-name org-directory)))) -- cgit 1.4.1-21-gabe81 From 4c6f08ec02fcd2e7cd5c7dc59d2c33a7e4ef4d0b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 9 Feb 2021 22:44:11 -0600 Subject: Merge branch 'main' of tildegit.org:acdw/emacs --- config.org | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'config.org') diff --git a/config.org b/config.org index dcf05ec..aa75459 100644 --- a/config.org +++ b/config.org @@ -1551,7 +1551,9 @@ already commented. That's it. * Writing -** COMMENT Word count :package: +** Word count :package: + +*** WC Mode I'm just going to comment this out for right now because I honestly don't know if it's that useful. @@ -1571,8 +1573,20 @@ don't know if it's that useful. (add-hook 'text-mode-hook #'hook--wc-mode-no-keybinds) #+end_src +*** Keybinding :crux: + +I just found out that =M-== counts the words in a region. That's great, but I +often want to count the words in the whole buffer. Enter +=crux-with-region-or-buffer=. I could change the binding. .... but I don't want to. + +#+begin_src emacs-lisp :noweb-ref bindings + (crux-with-region-or-buffer count-words-region) +#+end_src + ** Spell checking +*** Settings + Let's use =hunspell=. #+begin_src emacs-lisp :noweb-ref packages -- cgit 1.4.1-21-gabe81 From dad40af0ba1f385dddbeb667893b44e16c7dc3d6 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 9 Feb 2021 22:44:19 -0600 Subject: Configure flyspell --- config.org | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'config.org') diff --git a/config.org b/config.org index aa75459..4a7a391 100644 --- a/config.org +++ b/config.org @@ -1601,6 +1601,25 @@ Let's use =hunspell=. (write-region "" nil ispell-personal-dictionary nil 0)) #+end_src +*** Flyspell + +#+begin_src emacs-lisp :noweb-ref hooks + (add-hook 'text-mode-hook #'flyspell-mode) + (add-hook 'prog-mode-hook #'flyspell-prog-mode) +#+end_src + +*** Flyspell-correct :package: + +Display corrections with =completing-read=. + +#+begin_src emacs-lisp :noweb-ref packages + (straight-use-package 'flyspell-correct) +#+end_src + +#+begin_src emacs-lisp :noweb-ref bindings + (define-key flyspell-mode-map (kbd "C-;") #'flyspell-correct-wrapper) +#+end_src + * Reading ** Smooth-scrolling of images :package: -- cgit 1.4.1-21-gabe81 From e46fa16ccc8ab4e4063d7ade683bf0e66c17f35f Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 9 Feb 2021 22:58:00 -0600 Subject: Whitespace --- config.org | 55 ++++++++++++++++++++++++++----------------------------- 1 file changed, 26 insertions(+), 29 deletions(-) (limited to 'config.org') diff --git a/config.org b/config.org index 4a7a391..4ffdeab 100644 --- a/config.org +++ b/config.org @@ -205,13 +205,12 @@ This is extremely fiddly and I'd love another option. split-height-threshold 50) #+end_src -*** Switch to other window or buffer :crux: +*** Switch to other window or buffer :crux: #+begin_src emacs-lisp :noweb-ref bindings (define-key acdw/map (kbd "M-o") #'crux-other-window-or-switch-buffer) #+end_src - *** The *Help* window I want to select the *Help* window by default, so I can easily quit it. @@ -220,8 +219,6 @@ I want to select the *Help* window by default, so I can easily quit it. (setq-default help-window-select t) #+end_src - - ** Buffers *** Uniquify buffers @@ -274,7 +271,7 @@ function to the =kill-buffer-query-functions= hook that will return (add-hook 'kill-buffer-query-functions #'immortal-scratch) #+end_src -*** An /even better/ scratch buffer :package: +*** An /even better/ scratch buffer :package: The aptly-named =scratch= pops open a new scratch buffer /with the same mode as the file you're currently editing/. I'm pretty chuffed about @@ -414,7 +411,7 @@ underline below all the text. (setq-default x-underline-at-descent-line t) #+end_src -*** Unicode fonts :package: +*** Unicode fonts :package: =unicode-fonts= pulls in some other packages that still require the deprecated =cl= library. So, I've forked those libraries to require @@ -506,7 +503,7 @@ issue. (add-hook 'after-make-frame-functions #'hook--unicode-fonts-setup) #+end_src -*** Draw form-feeds (=^L=) properly :package: +*** Draw form-feeds (=^L=) properly :package: #+begin_src emacs-lisp :noweb-ref packages (straight-use-package 'form-feed) @@ -519,7 +516,7 @@ issue. ** Theming -*** Modus themes :package: +*** Modus themes :package: I want the git version. @@ -571,7 +568,7 @@ I want the git version. *** Mode line -**** Simple modeline :package: +**** Simple modeline :package: After trying =doom-mode-line= and =smart-mode-line=, I think I've finally landed on a good one: =simple-modeline=. @@ -629,7 +626,7 @@ How is this not built into Emacs? Oh well, I have [[https://github.com/jamesnvc (advice-add 'select-window :after #'cogent-line-set-selected-window) #+end_src -**** Blackout some modes :package: +**** Blackout some modes :package: Like =diminish= or =delight=, =blackout= allows me to remove some minor-modes from the modeline. @@ -750,7 +747,7 @@ to /hide/ those contents. read-file-name-completion-ignore-case t) #+end_src -*** Selectrum :package: +*** Selectrum :package: *COMMENT 2021-02-01*: For some reason, selectrum will randomly do a thing where it, like, flashes up and down in the minibuffer? I don't know how to explain @@ -781,7 +778,7 @@ for now .... I just want to see my completions. (icomplete-vertical-mode +1) #+end_src -*** Prescient :package: +*** Prescient :package: #+begin_src emacs-lisp :noweb-ref packages (straight-use-package 'prescient) @@ -807,7 +804,7 @@ Let's have =prescient= and =selectrum= work together. (selectrum-prescient-mode +1)) #+end_src -*** Consult :package: +*** Consult :package: #+begin_src emacs-lisp :noweb-ref modes (straight-use-package 'consult) @@ -859,7 +856,7 @@ default completion system. These all come from the [[https://github.com/minad/c register-preview-function #'consult-register-preview) #+end_src -*** Marginalia :package: +*** Marginalia :package: Finally, =marginalia= provides extra information about completion candidates. @@ -959,7 +956,7 @@ generally use it as a leader for entering applications. (run-hooks 'acdw/leader-defined-hook) #+end_src -*** Show keybindings with =which-key= :package: +*** Show keybindings with =which-key= :package: #+begin_src emacs-lisp :noweb-ref packages (straight-use-package 'which-key) @@ -989,7 +986,7 @@ for a program that values freedom so much. (setq-default disabled-command-function nil) #+end_src -** CRUX :package:crux: +** CRUX :package:crux: A collection of generally-useful functions that I don't want to bother including here myself. This is kind of an experiment, to be honest. @@ -1116,7 +1113,7 @@ the user is looking at something else. ** Garbage collection -*** Garbage Collection Magic Hack :package: +*** Garbage Collection Magic Hack :package: Look, I'm not going to look too deeply into this. It's /magic/ afer all. @@ -1186,7 +1183,7 @@ Notepad can handle UNIX line endings, so I don't want to hear it. (add-hook 'before-save-hook #'ewiki/no-junk-please-were-unixish) #+end_src -** Keep =~/.emacs.d= clean :package: +** Keep =~/.emacs.d= clean :package: #+begin_src emacs-lisp :noweb-ref packages :noweb yes (straight-use-package 'no-littering) @@ -1215,7 +1212,7 @@ Notepad can handle UNIX line endings, so I don't want to hear it. `((".*" . ,dir)))) #+end_src -** Autosaves :package: +** Autosaves :package: I don't use the =auto-save= system, preferring instead to use Bozhidar Batsov's [[https://github.com/bbatsov/super-save][super-save]] package. @@ -1390,7 +1387,7 @@ It manages my whitespace for me, anyway. (setq-default kill-do-not-save-duplicates t) #+end_src -*** Kill the line if there is no region :crux: +*** Kill the line if there is no region :crux: #+begin_src emacs-lisp :noweb-ref hooks (crux-with-region-or-line kill-ring-save) @@ -1551,9 +1548,9 @@ already commented. That's it. * Writing -** Word count :package: +** Word count -*** WC Mode +*** COMMENT WC Mode :package: I'm just going to comment this out for right now because I honestly don't know if it's that useful. @@ -1672,7 +1669,7 @@ to auto-fill in programming modes, but /only/ the comments. show-paren-style 'mixed) #+end_src -*** Smart parens :package: +*** Smart parens :package: #+begin_src emacs-lisp :noweb-ref packages (straight-use-package 'smartparens) @@ -1719,7 +1716,7 @@ to auto-fill in programming modes, but /only/ the comments. ** Formatting -*** Aggressive indent :package: +*** Aggressive indent :package: #+begin_src emacs-lisp :noweb-ref packages (straight-use-package 'aggressive-indent) @@ -1878,7 +1875,7 @@ move up a directory with a keybinding, I'll change =-a= to =-A=. (define-key acdw/map (kbd "C-x C-j") #'dired-jump) #+end_src -*** Expand subtrees :package: +*** Expand subtrees :package: Instead of opening each folder in its own buffer, =dired-subtree= enables me to open them in the same buffer, fancily indented. @@ -1892,7 +1889,7 @@ enables me to open them in the same buffer, fancily indented. (define-key dired-mode-map "i" #'dired-subtree-toggle)) #+end_src -*** Collapse singleton directories :package: +*** Collapse singleton directories :package: If a directory only has one item in it, =dired-collapse= shows what that one item is. @@ -1956,7 +1953,7 @@ true, please feel free to hack this repo and change this paragraph. (setenv "GIT_ASKPASS" "git-gui--askpass") #+end_src -**** Forge :package: +**** Forge :package: #+begin_src emacs-lisp :noweb-ref packages (straight-use-package 'forge) @@ -1964,7 +1961,7 @@ true, please feel free to hack this repo and change this paragraph. (require 'forge)) #+end_src -*** Git file modes :package: +*** Git file modes :package: #+begin_src emacs-lisp :noweb-ref packages (dolist (feat '(gitattributes-mode @@ -2858,7 +2855,7 @@ settings and written some ancillary scripts. I'll put generic system-integrating code here. -*** Edit with Emacs :package: +*** Edit with Emacs :package: Install the [[https://addons.mozilla.org/en-US/firefox/addon/edit-with-emacs1/][Firefox Addon]] alongside this package to edit web forms in Emacs (or the [[https://chrome.google.com/webstore/detail/edit-with-emacs/ljobjlafonikaiipfkggjbhkghgicgoh][Chrome one]] if you... /hate/ freedom :P). -- cgit 1.4.1-21-gabe81 From 073e9110ef6f79e895cea1a7ea7f84bdc0c53003 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 10 Feb 2021 07:37:52 -0600 Subject: Wrap flyspell binding in with-eval-after-load --- config.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config.org') diff --git a/config.org b/config.org index 4ffdeab..02fc297 100644 --- a/config.org +++ b/config.org @@ -1614,7 +1614,8 @@ Display corrections with =completing-read=. #+end_src #+begin_src emacs-lisp :noweb-ref bindings - (define-key flyspell-mode-map (kbd "C-;") #'flyspell-correct-wrapper) + (with-eval-after-load 'flyspell + (define-key flyspell-mode-map (kbd "C-;") #'flyspell-correct-wrapper)) #+end_src * Reading -- cgit 1.4.1-21-gabe81