diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-14 00:22:26 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-14 00:22:26 -0500 |
| commit | dc8ec3fa8e996b605e01dc54dd41534ce0558335 (patch) | |
| tree | dec4c6850b4acff604fd6f080ab5fb70b6e8d6c1 /modules/help-utils.el | |
| parent | 61393683774458a18a99d8548b03e841045b239d (diff) | |
tests and more bug fixing
- make org todo starting priority the lowest ("D")
- better default prompt for gptel
- added function to browse arch-wiki-docs
- added tests for join line or region
- added tests for format region or buffer
- added region arguments to cj/join-paragraph
- updated tasks
Diffstat (limited to 'modules/help-utils.el')
| -rw-r--r-- | modules/help-utils.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/help-utils.el b/modules/help-utils.el index d6301782..ab9f2855 100644 --- a/modules/help-utils.el +++ b/modules/help-utils.el @@ -84,5 +84,24 @@ :defer 1 :bind ("C-h W" . wiki-summary)) +;; --------------------------- Browse Local Arch Wiki -------------------------- +;; on Arch: yay (or whatever your AUR package manager is) -S arch-wiki-docs +;; browse the arch wiki topics offline + + +(defun cj/local-arch-wiki-search () + (interactive) + (let* ((dir "/usr/share/doc/arch-wiki/html/en") + (full-filenames (directory-files dir t "\\.html\\'")) + (basenames (mapcar 'file-name-base full-filenames)) + (chosen (completing-read "Choose an ArchWiki Topic: " basenames))) + (if (member chosen basenames) + (let* ((idx (cl-position chosen basenames :test 'equal)) + (fullname (nth idx full-filenames)) + (url (concat "file://" fullname))) + (eww-browse-url url)) + (message "File not found! Is arch-wiki-docs installed?")))) +(global-set-key (kbd "C-h A") 'cj/local-arch-wiki-search) + (provide 'help-utils) ;;; help-utils.el ends here |
