summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-08-01 14:17:43 +0300
committerThanos Apollo <[email protected]>2023-08-01 14:17:43 +0300
commit9b44d119a0af6444d55a723adc562827be4b1a02 (patch)
tree045fb57dc3e2072e4031a3d67475dafaf7530af4
parent7c1ce56dcf801db6bd1ee4ac867bdd634c8573ba (diff)
fix: use user-emacs-directory
Save saved video list under user-emacs-directory instead of hard coding ~/.emacs.d
-rw-r--r--yeetube.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/yeetube.el b/yeetube.el
index 00c98d9..f8be81d 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -150,7 +150,7 @@ It's recommended you keep it as the default value."
(defun yeetube-load-saved-videos ()
"Load saved videos."
(interactive)
- (let ((file-path "~/.emacs.d/yeetube-saved"))
+ (let ((file-path (concat user-emacs-directory "yeetube-saved")))
(with-temp-buffer
(insert-file-contents file-path)
(goto-char (point-min))
@@ -474,7 +474,7 @@ OPERATION & WHERE are required to work with ='add-variable-watcher."
(defun yeetube-update-saved-videos-list (_symbol new-value _where _environment)
"Updated saved videos."
- (with-temp-buffer (find-file "~/.emacs.d/yeetube-saved")
+ (with-temp-buffer (find-file (concat user-emacs-directory "yeetube-saved"))
(erase-buffer)
(setq yeetube-saved-videos new-value)
(insert (pp-to-string yeetube-saved-videos))