[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/svg-lib 6ceae83 16/32: Change `svg-lib-icons-dir` defau
From: |
ELPA Syncer |
Subject: |
[elpa] externals/svg-lib 6ceae83 16/32: Change `svg-lib-icons-dir` default value |
Date: |
Mon, 27 Sep 2021 16:57:48 -0400 (EDT) |
branch: externals/svg-lib
commit 6ceae8324723523428b2a006056690b52aee7fbe
Author: Damon Chan <damon.chan@freshup.com.hk>
Commit: Damon Chan <damon.chan@freshup.com.hk>
Change `svg-lib-icons-dir` default value
It saves to "~/.emacs.d/.cache/svg-lib/" by default. If `svg-lib-icons-dir`
does not exist, create it.
---
svg-lib.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/svg-lib.el b/svg-lib.el
index 682916a..40fc697 100644
--- a/svg-lib.el
+++ b/svg-lib.el
@@ -103,7 +103,8 @@ collection (there are way too many to store them)."
:value-type (string :tag "URL"))
:group 'svg-lib)
-(defcustom svg-lib-icons-dir "~/Downloads"
+(defcustom svg-lib-icons-dir
+ (expand-file-name (concat user-emacs-directory ".cache/svg-lib/"))
"svg-lib icons directory."
:group 'svg-lib
:type 'directory)
@@ -313,7 +314,9 @@ Cached version is returned if it exists unless FORCE-RELOAD
is t."
;; Build url from collection and name without checking for error
(let ((url (format (cdr (assoc collection svg-lib-icon-collections)) name)))
- ;; Get data from cache
+ ;; create the svg-lib-icons-dir if not exists
+ (unless (file-exists-p svg-lib-icons-dir)
+ (make-directory svg-lib-icons-dir))
(let* ((filename (expand-file-name (format "%s_%s.svg" collection name)
svg-lib-icons-dir))
(buffer (if (or force-reload (not (file-exists-p filename)))
(with-current-buffer (url-retrieve-synchronously url)
- [elpa] externals/svg-lib ebde091 22/32: Added progress pies, (continued)
- [elpa] externals/svg-lib ebde091 22/32: Added progress pies, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib b67b120 30/32: Cosmetic changes, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 90bb561 18/32: Added tag example, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 0ce0302 19/32: Merge remote-tracking branch 'origin/master', ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 83834c6 20/32: Fix usage example in comment., ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 6876d54 26/32: Fix `font-info` query format., ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 2cab1a0 29/32: Merge remote-tracking branch 'origin/master', ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib f9e1bbb 32/32: Fix some warnings, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 04fdd1a 08/32: Added svg-lib-concat function for org-mode demo, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib d9a49ac 14/32: Delete the redundant url checking, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 6ceae83 16/32: Change `svg-lib-icons-dir` default value,
ELPA Syncer <=
- [elpa] externals/svg-lib f775af4 21/32: Merge pull request #5 from 404cn/master, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 8427772 23/32: Merge remote-tracking branch 'origin/master', ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 5c206f3 24/32: Remove hard coded image scaling factor, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib f0b2136 25/32: Merge pull request #7 from HyunggyuJang/remove-hard-image-scale, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib e0423a2 27/32: Merge pull request #8 from HyunggyuJang/fix-font-info-query-format, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 11bc5dc 28/32: Make stroke to be fully contained inside the svg, ELPA Syncer, 2021/09/27
- [elpa] externals/svg-lib 5cb5865 31/32: Bug fix, ELPA Syncer, 2021/09/27