From c372a404e233e269d7f2017fee9eb456bd1ddc2b Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Tue, 29 Oct 2024 09:57:53 +0700 Subject: [PATCH] Emacs: Switch to claude --- .config/emacs/init.org | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.config/emacs/init.org b/.config/emacs/init.org index 99f8d15..84d21f7 100644 --- a/.config/emacs/init.org +++ b/.config/emacs/init.org @@ -1178,7 +1178,7 @@ Ace Window will show a hint if there are more than 2 windows, but I don't really (interactive) (let ((curr (current-buffer))) (mode-line-other-buffer) - (beframe-unassume-current-frame-buffers-selectively '(curr)))) + (beframe-unassume-current-frame-buffers-selectively (list curr)))) (evil-global-set-key 'normal (kbd "SPC b f") #'joe/beframe-switch-and-unassume) #+end_src @@ -1687,13 +1687,21 @@ Stuff to immediately switch to Jetbrains for debugging (require 'embark) #+end_src +Add a beframe keybinding to unassume a buffer with embark + +#+begin_src emacs-lisp +(define-key embark-buffer-map (kbd "b") #'beframe-unassume-current-frame-buffers-selectively) +#+end_src + These two lines allow you to kill buffers without a confirmation and without closing the mini-buffer so you can quickly kill multiple buffers if needed. The odd looking ~'(t .t)~ is for specifying a default for all other actions. #+begin_src emacs-lisp (setq embark-quit-after-action '((t . t) - (kill-buffer . nil))) + (kill-buffer . nil) + ;; (beframe-unassume-current-frame-buffers-selectively . nil))) + (joe/beframe-unassume-and-refresh-consult . nil))) (setf (alist-get 'kill-buffer embark-pre-action-hooks) nil) #+end_src @@ -2354,11 +2362,17 @@ These help speed eglot up apparently [[https://www.reddit.com/r/emacs/comments/1 ** AI #+begin_src emacs-lisp (setq gptel-default-mode #'org-mode) -(setq gptel-model "gpt-4") +(setq gptel-model "claude-3-opus") (setq gptel-api-key (with-temp-buffer (insert-file-contents (expand-file-name "gptel-key" user-emacs-directory)) (buffer-string))) - +;; OPTIONAL configuration +(setq + gptel-model 'claude-3-sonnet-20240229 ; "claude-3-opus-20240229" also available + gptel-backend (gptel-make-anthropic "Claude" + :stream t :key (with-temp-buffer + (insert-file-contents (expand-file-name "gptel-key" user-emacs-directory)) + (buffer-string)))) (add-hook 'gptel-post-response-functions #'font-lock-ensure) #+end_src