diff options
| author | EmacsConf <emacsconf-org@gnu.org> | 2025-11-27 14:37:57 -0500 |
|---|---|---|
| committer | EmacsConf <emacsconf-org@gnu.org> | 2025-11-27 14:37:57 -0500 |
| commit | 68c95568c9241b15d553a0fa04e5632a7eea195c (patch) | |
| tree | 5124cac2b0658635a49cacce7fc7e83413bb6fd0 /emacsconf-stream.el | |
| parent | c1cc853ccc154818cf68549284c6d48b391bb9b7 (diff) | |
| parent | ac24ad231fabe040777e2c390b7c231366d19682 (diff) | |
| download | emacsconf-el-68c95568c9241b15d553a0fa04e5632a7eea195c.tar.xz emacsconf-el-68c95568c9241b15d553a0fa04e5632a7eea195c.zip | |
Merge branch 'main' of git.emacsconf.org:pub/emacsconf-el
Diffstat (limited to 'emacsconf-stream.el')
| -rw-r--r-- | emacsconf-stream.el | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/emacsconf-stream.el b/emacsconf-stream.el index 55c4648..6641392 100644 --- a/emacsconf-stream.el +++ b/emacsconf-stream.el @@ -1280,5 +1280,35 @@ International (CC BY-SA 4.0) license. Please observe the guidelines for conduct: (kill-new desc)) desc)) +(defun emacsconf-stream-populate-random-package-file () + (interactive) + (with-temp-file (expand-file-name "fortune.txt" emacsconf-cache-dir) + (dolist (entry + (emacsconf-stream-shuffle-list + (seq-mapcat (lambda (f) + (let ((base (file-name-base f))) + (mapcar + (lambda (entry) + (list base + (symbol-name (car entry)) + (elt (cdr entry) 2))) + (cdr + (with-temp-buffer + (insert-file-contents + (expand-file-name "archive-contents" f)) + (goto-char (point-min)) + (read (current-buffer))))))) + (directory-files + (expand-file-name "archives" package-user-dir) t + directory-files-no-dot-files-regexp)))) + (unless (bobp) (insert "\n%\n")) + (insert + (format "%s: %s (%s)" + (elt entry 1) + (elt entry 2) + (pcase (elt entry 0) + ("gnu" "GNU ELPA") + ("nongnu" "NonGNU ELPA") + ("melpa" "MELPA"))))))) (provide 'emacsconf-stream) ;;; emacsconf-stream.el ends here |
