Config: change gptel session derictory.

This commit is contained in:
2026-05-03 19:17:38 +08:00
parent 29b2bfb592
commit 1a941344bf
2 changed files with 5 additions and 3 deletions

View File

@@ -63,7 +63,7 @@
(string-trim clean)))
(defun my-gptel-save-session ()
"Save current gptel session to ~/gptel/ with AI-generated filename.
"Save current gptel session to ~/gptel/sessions/ with AI-generated filename.
The filename is prefixed with a YYYYMMDD-HHmmss timestamp and generated
from the last 1500 characters of the buffer."
(interactive)
@@ -94,7 +94,7 @@ from the last 1500 characters of the buffer."
"gptel-session"
generated))
(timestamp (format-time-string "%Y%m%d-%H%M%S"))
(dir (expand-file-name "~/gptel/"))
(dir (expand-file-name "~/gptel/sessions/"))
(base (concat timestamp "-" generated))
(file (expand-file-name (concat base ".org") dir)))
;; handle name collision

View File

@@ -146,7 +146,9 @@
"C-c i" 'consult-outline
"C-c o w" 'my-org-refile-to-new-file
"C-c o l" 'org-toggle-link-display
"C-c C-k" 'kmacro-call-macro)
"C-c C-k" 'kmacro-call-macro
"M-{" 'org-previous-visible-heading
"M-}" 'org-next-visible-heading)
;; emms
(general-def emms-playlist-mode-map