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 | |
| 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')
| -rw-r--r-- | modules/ai-config.el | 8 | ||||
| -rw-r--r-- | modules/custom-functions.el | 3 | ||||
| -rw-r--r-- | modules/help-utils.el | 19 | ||||
| -rw-r--r-- | modules/org-agenda-config.el | 2 |
4 files changed, 26 insertions, 6 deletions
diff --git a/modules/ai-config.el b/modules/ai-config.el index be4cffa9..e4ef932e 100644 --- a/modules/ai-config.el +++ b/modules/ai-config.el @@ -36,9 +36,11 @@ :config (setq gptel-directives '((default - . "You are a large language model living in Emacs and a careful and - knowledgeable emacs-lisp programmer. Respond accurately and concisely.") - (programming + . "You are a large language model living in Emacs. You are an expert + in emacs-lisp, Python, Golang, and Shell scripting. You encourage unit testing + code and propose unit tests when you provide code. Please be accurate and + concise in your responses.") + (code-only . "You are a large language model and a careful programmer. Provide code and only code as output without any additional text, prompt or note.") (writing diff --git a/modules/custom-functions.el b/modules/custom-functions.el index 345ebd08..9f1875a5 100644 --- a/modules/custom-functions.el +++ b/modules/custom-functions.el @@ -51,7 +51,7 @@ Region indicated with BEG and END." "Mark all text in a paragraph then run cj/join-line-or-region." (interactive) (er/mark-paragraph) ;; from package expand region - (cj/join-line-or-region) + (cj/join-line-or-region (region-beginning)(region-end)) (forward-line)) ;; ---------------------- Count Words In Buffer Or Region ---------------------- @@ -116,7 +116,6 @@ If no region is selected, operate on the whole buffer." If a region is selected, delete trailing whitespace, then indent and untabify the region. If no region is selected, perform the same actions across the buffer." - (interactive) (let (start-pos end-pos) (if (use-region-p) 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 diff --git a/modules/org-agenda-config.el b/modules/org-agenda-config.el index f0bf7256..08af27a1 100644 --- a/modules/org-agenda-config.el +++ b/modules/org-agenda-config.el @@ -50,7 +50,7 @@ (setq org-highest-priority ?A) (setq org-lowest-priority ?D) - (setq org-default-priority ?C) + (setq org-default-priority ?D) (setq org-priority-faces '((?A . (:foreground "Cyan" :weight bold)) (?B . (:foreground "Yellow")) (?C . (:foreground "Green")) |
