fix(linux): port startup and dictation fixes from the private working copy
Fixes that only existed on the Linux machine (unpushed commit and uncommitted work there), without which a fresh clone breaks on Linux: - config.el resolved coe-xx/mostalive/qwan against ~/.doom.d, but the config lives at ~/.config/doom, so (require 'coe-xx) aborted startup with "Cannot open load file". Resolve them against doom-user-dir. - lisp/live-dictate.el only spoke whisper.cpp's POST /inference, which Lemonade (the Linux transcription server) does not serve -- every utterance came back as a not_found object and was dropped silently. It now auto-detects between /inference and the OpenAI-compatible /v1/audio/transcriptions endpoint, remembers which one answered, reports unusable replies, reads the VAD peak from the high byte of little-endian PCM16 (the low byte made silence look like speech), prints the peak level on stop, and gains M-x live-dictate-reload, wired into doom-after-reload-hook on both OSes. - config.el hardcoded the macOS org-directory (~/MyDocuments, inside iCloud). Where the notes live is now owned by config-linux.el (~/Documents) and config-mac.el (~/MyDocuments), and the OS leaf loads before org and org-roam load below instead of after them. Blog export targets stay in the OS files, where they belong. - mostalive/my-org-roam.el: compute org-agenda-files by listing the daily/ directory instead of org-roam-db-query at load time, and defer the full org-roam DB sync to idle time. Doom advises the first DB query of a session into a full org-roam-db-sync, which SHA1s all ~8.4k notes before the first frame is drawn (blank-screen startup). Also correct the ~/.doom.d paths in AGENTS.md, the export-test header and README that the sanitization base predated the fix for.
This commit is contained in:
@@ -5,6 +5,17 @@
|
||||
;; home for anything with a macOS path, macOS binary, or macOS-hosted
|
||||
;; backend. It is no longer a pristine vendor copy -- treat it as ours.
|
||||
|
||||
;;; Where the notes live
|
||||
;;
|
||||
;; Owned per machine (config.el loads this file before org and org-roam, so
|
||||
;; these are in place in time). Linux uses ~/Documents; on the mac the
|
||||
;; notes sit in ~/MyDocuments, which is iCloud-synced -- fine for now, but
|
||||
;; the private notes should move out of iCloud and this value with them.
|
||||
;; Override in config-local.el if the notes live somewhere else.
|
||||
(setq org-directory "~/MyDocuments/qwan/essays/willem"
|
||||
org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||
org-roam-directory org-directory)
|
||||
|
||||
;; Enable tool use in gptel
|
||||
(setq gptel-use-tools t)
|
||||
|
||||
@@ -261,6 +272,7 @@ Returns answer with org-roam links to sources."
|
||||
;; one as a WAV, so no WebSocket or Lemonade server is needed.
|
||||
(add-load-path! "lisp")
|
||||
(autoload #'live-dictate "live-dictate" nil t)
|
||||
(autoload #'live-dictate-reload "live-dictate" nil t)
|
||||
|
||||
(use-package! whisper
|
||||
:commands (whisper-run whisper-file whisper-select-language)
|
||||
@@ -289,4 +301,14 @@ Returns answer with org-roam links to sources."
|
||||
(with-eval-after-load 'live-dictate
|
||||
(setopt live-dictate-debug nil))
|
||||
|
||||
;; `require' keeps the first copy of a library it reads, so edits to
|
||||
;; lisp/live-dictate.el are invisible until Emacs restarts -- `doom/reload'
|
||||
;; reloads config.el but not the library. Drop and re-read it afterwards.
|
||||
;; By hand: `M-x live-dictate-reload'.
|
||||
(add-hook 'doom-after-reload-hook
|
||||
(defun live-dictate--reload-after-doom-reload ()
|
||||
"Re-read lisp/live-dictate.el if it has been loaded."
|
||||
(when (featurep 'live-dictate)
|
||||
(live-dictate-reload))))
|
||||
|
||||
;;; config-mac.el ends here
|
||||
|
||||
Reference in New Issue
Block a user