From 427fe5f7df2ec401cec1cb120d2a7a1516dc1ecf Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Fri, 19 Jan 2024 00:13:35 +0200 Subject: Refactor directory and database naming conventions - Updated gnosis-dir to use `locate-user-emacs-file` for consistent file location - Updated gnosis-images-dir to use `expand-file-name` for consistent filepath - Updated gnosis-db to use `expand-file-name` for consistent filepath in emacsql-sqlite initialization --- gnosis.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnosis.el b/gnosis.el index 7ddeb30..3c38364 100644 --- a/gnosis.el +++ b/gnosis.el @@ -51,7 +51,7 @@ :group 'external :prefix "gnosis-") -(defcustom gnosis-dir (concat user-emacs-directory "gnosis") +(defcustom gnosis-dir (locate-user-emacs-file "gnosis") "Gnosis directory." :type 'directory :group 'gnosis) @@ -62,13 +62,13 @@ :group 'gnosis) -(defvar gnosis-images-dir (concat (file-name-as-directory gnosis-dir) "images") +(defvar gnosis-images-dir (expand-file-name "images" gnosis-dir) "Gnosis images directory.") (defconst gnosis-db (if (not (file-directory-p gnosis-dir)) (gnosis-db-init) - (emacsql-sqlite (concat (file-name-as-directory gnosis-dir) "gnosis.db"))) + (emacsql-sqlite (expand-file-name "gnosis.db" gnosis-dir))) "Gnosis database file.") (defvar gnosis-testing nil -- cgit v1.2.3