Migrate syntax highlighting options to zola syntax
1 file changed, 10 insertions(+), 10 deletions(-)
changed files
M post/emacs-package-archive-statistics.md → post/emacs-package-archive-statistics.md
@@ -10,7 +10,7 @@ I use [cask][] for managing the dependencies of my Emacs configuration. Whenever I opened my `Cask` file, I wondered if I really was using all the sources I had defined: -```elisp +```lisp (source gnu) (source marmalade) (source melpa)@@ -44,7 +44,7 @@ I found [how to get a list of installed packages][], but that just gives a list: -```elisp +```lisp (ace-jump-mode ag auto-compile auto-indent-mode autopair ...) ```@@ -52,7 +52,7 @@ I needed to get more information about those packages. I looked at where `list-packages` gets that information from. It seems that `package-archive-contents` is a list of cons cells: -```elisp +```lisp (org-plus-contrib . [(20140714) nil "Outline-based notes management and organizer" tar "org"])@@ -62,7 +62,7 @@ Then created a function to loop over the contents of `package-activated-list`, retrieving the corresponding contents of `package-archive-contents`: -```elisp +```lisp (defun package-list-installed () (loop for pkg in package-activated-list collect (assq pkg package-archive-contents)))@@ -74,7 +74,7 @@ `package-desc-kind`. `package-desc-archive` was exactly what I needed. I happened to be using a pretest version of Emacs at the time and didn't know that it's not in 24.3, so I just made sure it was defined: -```elisp +```lisp (if (not (fboundp #'package-desc-archive)) (defsubst package-desc-archive (desc) (aref desc (1- (length desc)))))@@ -89,7 +89,7 @@ To generate a list of statistics, I just needed to loop over the installed packages from `package-list-installed` and update a count for each archive: -```elisp +```lisp (defun package-archive-stats () (let ((archives (makehash)) (assoc '()))@@ -105,7 +105,7 @@ ``` Running this gives a list of cons cells: -```elisp +```lisp (("gnu" . 0) ("org" . 1) ("melpa-stable" . 2)@@ -116,7 +116,7 @@ I wrapped it in an interactive function so that I could check the numbers quickly: -```elisp +```lisp (defun package-show-archive-stats () (interactive) (message "%s" (package-archive-stats)))@@ -126,7 +126,7 @@ With that, I removed `(source gnu)` from my `Cask` file. Now I had another question. What package was installed from [marmalade][]? In the lisp fashion, I created yet another function: -```elisp +```lisp (defun package-show-installed-from-archive (archive) (interactive (list (helm-comp-read "Archive: " (mapcar #'car package-archives) :must-match t)))@@ -142,7 +142,7 @@ `ido-completing-read` or similar) Running this with the argument `"marmalade"` gives: -```elisp +```lisp (php-extras) ```