From e6df1a5e335620c2c6729ad36c4938cd27364176 Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Sun, 18 Jun 2023 21:10:43 +0200 Subject: [PATCH] gptel: Use :require for auth-source-search (#78) gptel.el (gptel-api-key-from-auth-source): To read from .authinfo.gpg the key parameter :require for auth-source-search is needed. --- gptel.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gptel.el b/gptel.el index f0807f9..3a4b74e 100644 --- a/gptel.el +++ b/gptel.el @@ -229,7 +229,8 @@ To set the temperature for a chat session interactively call By default, `gptel-host' is used as HOST and \"apikey\" as USER." (if-let ((secret (plist-get (car (auth-source-search :host (or host gptel-host) - :user (or user "apikey"))) + :user (or user "apikey") + :require '(:secret))) :secret))) (if (functionp secret) (encode-coding-string (funcall secret) 'utf-8)