[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gptel 95925f3571 198/273: Automatically create parent dire
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gptel 95925f3571 198/273: Automatically create parent directories for gptel-crowdsourced-prompts-file (#203) |
Date: |
Wed, 1 May 2024 10:02:22 -0400 (EDT) |
branch: elpa/gptel
commit 95925f3571bbb2f3f800be37fa8a3a7998d1ecb4
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: GitHub <noreply@github.com>
Automatically create parent directories for gptel-crowdsourced-prompts-file
(#203)
* gptel-transient.el (gptel--crowdsourced-prompts): Create containing
directory for `gptel-crowdsourced-prompts-file' if necessary.
Fixes #202.
---
gptel-transient.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/gptel-transient.el b/gptel-transient.el
index 4fcfa1ba63..0f4dc5763b 100644
--- a/gptel-transient.el
+++ b/gptel-transient.el
@@ -78,11 +78,13 @@ which see."
"?"))
;; Fetch file
(message "Fetching prompts...")
- (if (url-copy-file gptel--crowdsourced-prompts-url
- gptel-crowdsourced-prompts-file
- 'ok-if-already-exists)
- (message "Fetching prompts... done.")
- (message "Could not retrieve new prompts."))))
+ (let ((dir (file-name-directory gptel-crowdsourced-prompts-file)))
+ (unless (file-exists-p dir) (mkdir dir 'create-parents))
+ (if (url-copy-file gptel--crowdsourced-prompts-url
+ gptel-crowdsourced-prompts-file
+ 'ok-if-already-exists)
+ (message "Fetching prompts... done.")
+ (message "Could not retrieve new prompts.")))))
(if (not (file-readable-p gptel-crowdsourced-prompts-file))
(progn (message "No crowdsourced prompts available")
(call-interactively #'gptel-system-prompt))
- [nongnu] elpa/gptel 97ab6cbd1e 273/273: gptel: Add .elpaignore, (continued)
- [nongnu] elpa/gptel 97ab6cbd1e 273/273: gptel: Add .elpaignore, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 4356f6fbec 103/273: gptel: correct system message with gptel-request, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 3308449761 133/273: gptel: Fix prompt string handling in gptel-request, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 190d1d20e2 121/273: gptel: Update header line and package info description, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel f571323174 163/273: gptel-gemini: Simulate system-message for gemini, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 7c2e342f35 176/273: gptel-transient: Add prompting from kill-ring, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 1752f1d589 180/273: gptel-kagi: Add support for the Kagi summarizer, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel d0c685e501 189/273: gptel: checkdoc linting and indentation rules, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 8a25058eed 190/273: gptel-openai: default :header key to simplify config, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel f0e4889c36 196/273: gptel: Update OpenAI model list, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 95925f3571 198/273: Automatically create parent directories for gptel-crowdsourced-prompts-file (#203),
ELPA Syncer <=
- [nongnu] elpa/gptel af5444a2ea 201/273: gptel: docstrings for multi-LLM support, bump version, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 49cfc78378 203/273: gptel: Add page boundaries, restructure files, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 0d6264f268 214/273: gptel-curl: Adjust response beginning position, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 39376aa3f4 020/273: gptel-transient: Add transient menus for setting parameters, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel dfca03a266 028/273: LICENSE: Add GPLv3 license, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 048eaf9b64 044/273: README: Update description of chat parameters, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 051501c892 035/273: README: Change installation instructions (no aio), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 1ab8a57183 051/273: add installation instructions, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel cd22ea836c 045/273: Add autoload for gptel-send, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel f843614f5b 048/273: gptel: Set gptel-api-key if reading from minibuffer, ELPA Syncer, 2024/05/01