update elpaca, replace erc with rcirc
This commit is contained in:
parent
eb2557255f
commit
4a32ca2d37
2 changed files with 108 additions and 20 deletions
|
@ -7,8 +7,8 @@
|
||||||
;;
|
;;
|
||||||
;; it is possible there are more so probably the most recent one is the one to use.
|
;; it is possible there are more so probably the most recent one is the one to use.
|
||||||
|
|
||||||
(setq elpaca-core-date "20240727")
|
(setq elpaca-core-date "20241111")
|
||||||
(defvar elpaca-installer-version 0.7)
|
(defvar elpaca-installer-version 0.8)
|
||||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||||
|
@ -25,9 +25,9 @@
|
||||||
(make-directory repo t)
|
(make-directory repo t)
|
||||||
(when (< emacs-major-version 28) (require 'subr-x))
|
(when (< emacs-major-version 28) (require 'subr-x))
|
||||||
(condition-case-unless-debug err
|
(condition-case-unless-debug err
|
||||||
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
(if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||||
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
|
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
|
||||||
,@(when-let ((depth (plist-get order :depth)))
|
,@(when-let* ((depth (plist-get order :depth)))
|
||||||
(list (format "--depth=%d" depth) "--no-single-branch"))
|
(list (format "--depth=%d" depth) "--no-single-branch"))
|
||||||
,(plist-get order :repo) ,repo))))
|
,(plist-get order :repo) ,repo))))
|
||||||
((zerop (call-process "git" nil buffer t "checkout"
|
((zerop (call-process "git" nil buffer t "checkout"
|
||||||
|
|
112
init.org
112
init.org
|
@ -699,29 +699,37 @@ whether to put it under writing, comms or programming as it is equally
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package llm
|
(use-package llm
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands (llm-chat llm-ask-about llm-ask-line llm-ask-selection)
|
:commands (llm-chat llm-ask-about llm-ask-line llm-ask-selection))
|
||||||
)
|
#+END_SRC
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package llm-openai
|
(use-package llm-openai
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:commands (make-llm-openai)
|
:requires llm
|
||||||
:after llm)
|
:commands (make-llm-openai))
|
||||||
;; enable LLM access with ellama
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package ellama
|
(use-package ellama
|
||||||
:ensure t
|
:ensure t
|
||||||
|
:requires (llm llm-openai)
|
||||||
:commands (ellama-chat ellama-ask-about ellama-ask-line ellama-ask-selection)
|
:commands (ellama-chat ellama-ask-about ellama-ask-line ellama-ask-selection)
|
||||||
:custom
|
:custom
|
||||||
(ellama-language "English")
|
(ellama-language "English")
|
||||||
(ellama-keymap-prefix "<leader>a")
|
|
||||||
(ellama-provider
|
(ellama-provider
|
||||||
(make-llm-openai
|
(make-llm-openai
|
||||||
:key (auth-source-pass-get 'secret "snamellit/openai-api-key")
|
:key (auth-source-pass-get 'secret "snamellit/openai-api-key")
|
||||||
:chat-model "gpt-4o"
|
:chat-model "gpt-4o"
|
||||||
))
|
))
|
||||||
(ellama-sessions-directory (expand-file-name "~/Nextcloud/ellama-sessions"))
|
(ellama-sessions-directory (expand-file-name "~/Nextcloud/ellama-sessions"))
|
||||||
:config
|
:bind-keymap
|
||||||
(report-time-since-load "Ellama is available"))
|
("C-c e" . ellama-command-map))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
: [nil 26420 49222 463525 nil elpaca-process-queues nil nil 237000 nil]
|
||||||
|
|
||||||
It seems the *gpt-4o* model provides better responses. I should
|
It seems the *gpt-4o* model provides better responses. I should
|
||||||
investigate local models more.
|
investigate local models more.
|
||||||
|
|
||||||
|
@ -1322,7 +1330,7 @@ Here is a snapshot of the keybindings dd <2024-07-30 Tue>.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; configure support for google calendar
|
;; configure support for google calendar
|
||||||
(use-package org-gcal
|
(use-package org-gcal
|
||||||
:ensure t
|
;; :ensure t
|
||||||
:custom
|
:custom
|
||||||
(org-gcal-client-id (auth-source-pass-get 'secret "snamellit/org-gcal-client"))
|
(org-gcal-client-id (auth-source-pass-get 'secret "snamellit/org-gcal-client"))
|
||||||
(org-gcal-client-secret (auth-source-pass-get "id" "snamellit/org-gcal-client"))
|
(org-gcal-client-secret (auth-source-pass-get "id" "snamellit/org-gcal-client"))
|
||||||
|
@ -1846,8 +1854,10 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; Lisp support
|
;; Lisp support
|
||||||
|
(use-package package-lint-flymake) ;; needed before activating lisp-interaction-mode-hook
|
||||||
(use-package paredit
|
(use-package paredit
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
:after package-lint-flymake
|
||||||
:commands (enable-paredit-mode)
|
:commands (enable-paredit-mode)
|
||||||
:init
|
:init
|
||||||
(dolist (mode '(emacs-lisp-mode-hook
|
(dolist (mode '(emacs-lisp-mode-hook
|
||||||
|
@ -1885,6 +1895,18 @@ no arguments. In Emacs 23.2 and newer, it takes one argument."
|
||||||
"Git commit 222b791")
|
"Git commit 222b791")
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
**** Rainbow Parentheses
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package rainbow-delimiters
|
||||||
|
:ensure t
|
||||||
|
:commands (rainbow-delimiters-mode)
|
||||||
|
:hook
|
||||||
|
(prog-mode . rainbow-delimiters-mode))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
: [nil 26418 38138 672360 nil elpaca-process-queues nil nil 82000 nil]
|
||||||
|
|
||||||
**** Enable Geiser Mode in Scheme Mode
|
**** Enable Geiser Mode in Scheme Mode
|
||||||
|
|
||||||
|
@ -1909,6 +1931,42 @@ Configure Geiser and Scheme
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
| evil-paredit-mode | geiser-mode | enable-paredit-mode | aggressive-indent-mode | geiser-mode--maybe-activate |
|
| evil-paredit-mode | geiser-mode | enable-paredit-mode | aggressive-indent-mode | geiser-mode--maybe-activate |
|
||||||
|
|
||||||
|
**** Allow saving of an SBCL images
|
||||||
|
|
||||||
|
When trying to call `(save-lisp-and-die #p"somefile")` , sbcl will
|
||||||
|
throw an error that it cannot comply when multiple threads are active.
|
||||||
|
|
||||||
|
For each project using this you need to define some helper function to
|
||||||
|
stop the repl threads before saving the image like the following:
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
|
(defun sbcl-save-sly-and-die ()
|
||||||
|
"Save a sbcl image, even when running from inside Sly.
|
||||||
|
This function should only be used in the *inferior-buffer* buffer,
|
||||||
|
inside emacs."
|
||||||
|
(mapcar #'(lambda (x)
|
||||||
|
(slynk::close-connection
|
||||||
|
x nil nil))
|
||||||
|
slynk::*connections*)
|
||||||
|
(dolist (thread (remove
|
||||||
|
(slynk-backend::current-thread)
|
||||||
|
(slynk-backend::all-threads)))
|
||||||
|
(slynk-backend::kill-thread thread))
|
||||||
|
(sleep 1)
|
||||||
|
(sb-ext:save-lisp-and-die #P"~/your-main-program.exe"
|
||||||
|
:toplevel #'your-main-function-here
|
||||||
|
:executable t
|
||||||
|
:compression t))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
This function has to be called in the *sly-inferior-lisp*
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
|
;; in *sly-inferior-lisp* buffer
|
||||||
|
(sbcl-save-sly-and-die)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
*** Terraform Support
|
*** Terraform Support
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; configure terraform support
|
;; configure terraform support
|
||||||
|
@ -2124,7 +2182,7 @@ the moment.
|
||||||
|
|
||||||
** ERC configuration
|
** ERC configuration
|
||||||
Set up ERC, an IRC client for Emacs, to automatically join specific channels and log in:
|
Set up ERC, an IRC client for Emacs, to automatically join specific channels and log in:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
(use-package erc
|
(use-package erc
|
||||||
:ensure t
|
:ensure t
|
||||||
:defer 5
|
:defer 5
|
||||||
|
@ -2158,7 +2216,7 @@ reconnects after suspend, and sometimes it even works, but mostly I
|
||||||
run this function again to reconnect, which will update the buffers
|
run this function again to reconnect, which will update the buffers
|
||||||
with the rooms I joined.
|
with the rooms I joined.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
(defun snam-erc ()
|
(defun snam-erc ()
|
||||||
"Login to znc bouncer and join rooms."
|
"Login to znc bouncer and join rooms."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -2187,7 +2245,10 @@ fail. I dunno, there is something fishy here...
|
||||||
|
|
||||||
I like to have my IRC channels on workspace 5 in *i3*.
|
I like to have my IRC channels on workspace 5 in *i3*.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
This is no longer useful : I seldom use i3, but it is useful for
|
||||||
|
inspiration
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
(defun my-erc ()
|
(defun my-erc ()
|
||||||
"Create new frame and move to ws5 and launch erc."
|
"Create new frame and move to ws5 and launch erc."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -2208,6 +2269,33 @@ I like to have my IRC channels on workspace 5 in *i3*.
|
||||||
: my-erc
|
: my-erc
|
||||||
|
|
||||||
|
|
||||||
|
** rcirc configuration
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package rcirc
|
||||||
|
|
||||||
|
:config
|
||||||
|
(setopt rcirc-server-alist
|
||||||
|
(let ((data (auth-source-pass-parse-entry "snamellit/znc")))
|
||||||
|
`((,(auth-source-pass--get-attr "server" data)
|
||||||
|
:port ,(auth-source-pass--get-attr "port" data)
|
||||||
|
:encryption tls
|
||||||
|
:server-alias "znc"
|
||||||
|
:nick ,(auth-source-pass--get-attr "nick" data)
|
||||||
|
:user-name ,(concat (auth-source-pass--get-attr "user" data) "@" (system-name))
|
||||||
|
:password ,(auth-source-pass--get-attr 'secret data)
|
||||||
|
:channels '("#emacs" "#erc" "#spritely" "#guix" "#systemcrafters" "#systemcrafters-guix" "#systemcrafters-emacs")))))
|
||||||
|
(setopt rcirc-reconnect-delay 15)
|
||||||
|
(setopt rcirc-dim-nicks '("Marvin2"))
|
||||||
|
(setopt rcirc-bright-nicks '("daviwil" "benoitj" "Fade" "trev" "shom" "alternateved" "dthompson"))
|
||||||
|
(rcirc-track-minor-mode))
|
||||||
|
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
: t
|
||||||
|
|
||||||
|
|
||||||
** Elfeed configuration
|
** Elfeed configuration
|
||||||
Configures Elfeed, an RSS feed reader for Emacs:
|
Configures Elfeed, an RSS feed reader for Emacs:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
Loading…
Reference in a new issue