From 2a79f3e40ca323830da6bfac0bd058df95e2ab78 Mon Sep 17 00:00:00 2001 From: noa@gaiwan.org Date: Sun, 23 Jun 2024 16:34:43 +0000 Subject: Update package-ensure to use good old package --- config.org | 73 ++++++++++++++++++++++---------------------------------------- 1 file changed, 26 insertions(+), 47 deletions(-) (limited to 'config.org') diff --git a/config.org b/config.org index 59e16a8..5214885 100644 --- a/config.org +++ b/config.org @@ -78,8 +78,8 @@ I've taken a little defun from acdw to install packages from source. #+begin_src elisp (defun package-ensure (pkg) - (unless (package-installed-p (car pkg)) - (package-vc-install pkg))) + (unless (package-installed-p pkg) + (package-install pkg))) #+end_src ** Colour theme @@ -114,10 +114,7 @@ It is often useful to be able to run a command while i am already in the process Vertico is a package for a nice minibuffer completion experience. It displays a vertical list of candidates. It integrates well with the emacs ecosystem and lets me use other packages that also play nicely. #+begin_src elisp - (package-ensure '(vertico - :url "https://github.com/minad/vertico.git" - :lisp-dir "extensions/")) - (package-activate 'vertico) + (package-ensure 'vertico) (setopt vertico-mode t) #+end_src @@ -286,8 +283,7 @@ I'd like to change the face, but ~pulse-highlight-face~ has *DO NOT CUSTOMIZE* i Jabber.el is an xmpp client in emacs. I don't actually use xmpp as xmpp that much. But i do use it to connect to irc, and this package lets me do that. Unfortunately, it's not a particularly well-behaved package; by default it clobbers some keybindings and floods the echo area with unhelpful messages. #+begin_src elisp - (package-ensure '(jabber - :url "https://codeberg.org/emacs-jabber/emacs-jabber.git")) + (package-ensure 'jabber) (setopt jabber-account-list '(("noa@hmm.st"))) #+end_src @@ -356,8 +352,7 @@ Finally, have a binding to jump to a buffer in which there's been some new activ ** Nov.el #+begin_src elisp - (package-ensure '(nov - :url "https://depp.brause.cc/nov.el.git")) + (package-ensure 'nov) (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)) #+end_src @@ -375,8 +370,7 @@ Abbrev mode expands one string into another string. I use it as a simple autoco Jinx is a package for spellchecking. Previously i used [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Spelling.html][flyspell]], which is built in, and [[https://codeberg.org/ideasman42/emacs-spell-fu][spell-fu]]. Flyspell is not ideal because it only checks the word under the point. Furthermore, the correction interface is not pleasant to look at with a proportional font as it uses spaces to align the candidates. Spell-fu checks all the words that are visible, thereby behaving much more like a traditional spell checker. Jinx improves on spell-fu by interacting with the spellcheck process in a more efficient way, and has a nicer interface to corrections. #+begin_src elisp - (package-ensure '(jinx - :url "https://github.com/minad/jinx.git")) + (package-ensure 'jinx) (setopt global-jinx-mode t) #+end_src @@ -420,8 +414,8 @@ I mentioned that i thought this wasn't the best default behaviour [[https://gith Consult is a package to provide navigation commands that take advantage of completing-read. I set up a nice completing-read environment earlier with vertico. There are a lot of commands built in to consult, and it's possible to define more. But i use it very simply. #+begin_src elisp - (package-ensure '(consult - :url "https://github.com/minad/consult.git")) + (package-ensure 'consult) + (package-activate 'consult) #+end_src Consult buffer can be used instead of the default buffer menu. It lists recently used files and bookmarks as well as open buffers. @@ -446,7 +440,7 @@ These are some other almost default functions but with extra interactivity. I've only recently started making use of embark and i definitely need to experiment with it more. Essentially it lets you execute actions based on what kind of thing is selected, either at the point in the buffer, or in an already open completion buffer. #+begin_src elisp -(use-package embark :ensure t) + (package-ensure 'embark) #+end_src #+begin_src elisp @@ -482,8 +476,7 @@ Because i use consult, it's recommended to have this package installed. Marginalia provides us with annotations for candidates in completing read functions. This is things like docstrings for functions, file permissions in find-file, and so on. It's a small quality of life improvement. #+begin_src elisp - (package-ensure '(marginalia - :url "https://github.com/minad/marginalia.git")) + (package-ensure 'marginalia) (setopt marginalia-mode t) #+end_src @@ -658,16 +651,14 @@ This doesn't work with code blocks at the moment. (global-set-key (kbd "C-c l") #'org-store-link) #+end_src -#+begin_src elisp - (package-ensure '(helm-org-ql - :url "https://github.com/alphapapa/org-ql.git")) - (use-package org-super-links) - (setopt org-super-links-search-function #'helm-org-ql) +#+begin_src elisp :tangle no + ;; (package-ensure 'helm-org-ql) + ;; (package-ensure 'org-super-links) + ;; (setopt org-super-links-search-function #'helm-org-ql) #+end_src #+begin_src elisp - (package-ensure '(org-modern - :url "https://github.com/minad/org-modern.git")) + (package-ensure 'org-modern) (add-hook 'org-mode-hook #'org-modern-mode) ;; (add-hook 'org-agenda-finalize-hook #'org-modern-agenda) #+end_src @@ -836,8 +827,7 @@ The index page generation functions were taken from Dennis Ogbe. Thank you! Reading prose with long lines is a chore. Luckily there are several packages in emacs to make the windows squeeze text into a more legible sliver. Previously i used olivetti, which is a really nice package, but it's quite heavyweight and broke on me with no explanation more frequently than i appreciated. I've switched to visual-fill-column and been quite satisfied. #+begin_src elisp - (package-ensure '(visual-fill-column - :url "https://codeberg.org/joostkremers/visual-fill-column.git")) + (package-ensure 'visual-fill-column) (setopt visual-fill-column-enable-sensible-window-split t) (setopt visual-fill-column-center-text t) (advice-add 'text-scale-adjust :after #'visual-fill-column-adjust) @@ -969,8 +959,7 @@ By default, don't show dired details I find it useful to see the recursive sizes of directories. This can be a little slow, so setting it as always on might not be the best idea, but the longest i've had to wait is about a second, and that's only if i run it on my home directory, so i think it's worth it at the moment. #+begin_src elisp - (package-ensure '(dired-du - :url "https://github.com/calancha/dired-du.git")) + (package-ensure 'dired-du) (setopt dired-du-size-format t) (add-hook 'dired-mode-hook #'dired-du-mode) #+end_src @@ -1026,8 +1015,7 @@ Usually, we want indentation to be done with tabs. Some modes make more sense t I want to ensure that indentation is always correct. The builtin electric indent mode works /sometimes/, but the aggressive indent mode package is more reliable. #+begin_src elisp - (package-ensure '(aggressive-indent - :url "https://github.com/Malabarba/aggressive-indent-mode.git")) + (package-ensure 'aggressive-indent) (setopt global-aggressive-indent-mode t) #+end_src @@ -1363,16 +1351,14 @@ The version control system will try each of these methods in order. Because alm #+end_src #+begin_src elisp - (package-ensure '(markdown-mode - :url "https://github.com/jrblevin/markdown-mode.git")) + (package-ensure 'markdown-mode) (add-to-list 'auto-mode-alist '("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode)) #+end_src #+begin_src elisp - (package-ensure '(valign - :url "https://github.com/casouri/valign.git")) + (package-ensure 'valign) (add-hook 'markdown-mode-hook #'valign-mode) (add-hook 'org-mode-hook #'valign-mode) @@ -1471,8 +1457,7 @@ My preferred behaviour is for the point to be at the start of the match. Becaus Okay, i lied about being vanilla. I want isearch to use the minibuffer like a good normal part of emacs #+begin_src elisp - (package-ensure '(isearch-mb - :url "https://github.com/astoff/isearch-mb.git")) + (package-ensure 'isearch-mb) (setopt isearch-mb-mode t) #+end_src @@ -1559,16 +1544,14 @@ Update the calendar. We want weeks to start on a monday, the first day of the w Multiple cursors are a nice feature because they are very interactive. However, i've always found the emacs implementation a bit too janky. Iedit implements one case where multiple cursors are used, which is to put a cursor at every same symbol in the buffer and edit them all, sort of like a real-time query-replace. #+begin_src elisp - (package-ensure '(iedit - :url "https://github.com/victorhge/iedit.git")) + (package-ensure 'iedit) #+end_src ** Replace Anzu provides real-time updates to the replacement string when running query-replace. #+begin_src elisp - (package-ensure '(anzu - :url "https://github.com/emacsorphanage/anzu.git")) + (package-ensure 'anzu) (global-set-key [remap query-replace] 'anzu-query-replace) (global-set-key [remap query-replace-regexp] 'anzu-query-replace-regexp) #+end_src @@ -1635,9 +1618,7 @@ This is equivalent to the message of the day present in some shells. I wanted i I don't know why but it seems cool #+begin_src elisp - ;; (use-package i-ching :ensure t) - ;; (package-ensure '(i-ching - ;; :url "https://github.com/zzkt/i-ching.git")) + ;; (package-ensure 'i-ching) #+end_src ** Unfill commands @@ -1692,8 +1673,7 @@ The auth-source library allows packages to request password information. It has #+end_src #+begin_src elisp - (package-ensure '(pass - :url "https://github.com/NicolasPetton/pass.git")) + (package-ensure 'pass) #+end_src #+begin_src elisp @@ -1874,7 +1854,6 @@ I have experimented with lots of different methods of reading mail, both in and #+end_src * Music #+begin_src elisp - (package-ensure '(listen - :url "https://github.com/alphapapa/listen.el.git")) + (package-ensure 'listen) (setopt listen-directory "~/media/music") #+end_src -- cgit 1.4.1-2-gfad0