emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/gptel 0690c8b6a9 161/273: gptel-transient: Exit transient


From: ELPA Syncer
Subject: [nongnu] elpa/gptel 0690c8b6a9 161/273: gptel-transient: Exit transient when writing directive
Date: Wed, 1 May 2024 10:02:18 -0400 (EDT)

branch: elpa/gptel
commit 0690c8b6a9d9844a1be5729592e05f3d04e48ec5
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>

    gptel-transient: Exit transient when writing directive
    
    * gptel-transient.el (gptel--suffix-system-message): Explicitly
    set the :transient slot of the system-message editor commands to
    `transient--do-exit` (#157).
---
 gptel-transient.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gptel-transient.el b/gptel-transient.el
index 6eecd3e58a..6bb91f97ca 100644
--- a/gptel-transient.el
+++ b/gptel-transient.el
@@ -188,7 +188,10 @@ which see."
         prompt-suffixes
         (list (list "SPC" "Pick crowdsourced prompt"
                     'gptel--read-crowdsourced-prompt
-                   :transient nil))))))
+                   ;; NOTE: Quitting the completing read when picking a
+                   ;; crowdsourced prompt will cause the transient to exit
+                   ;; instead of returning to the system prompt menu.
+                    :transient 'transient--do-exit))))))
 
 (transient-define-prefix gptel-system-prompt ()
   "Change the system prompt to send ChatGPT.
@@ -522,7 +525,7 @@ This uses the prompts in the variable
 
 (transient-define-suffix gptel--suffix-system-message ()
   "Set directives sent to ChatGPT."
-  :transient nil
+  :transient 'transient--do-exit
   :description "Set custom directives"
   :key "h"
   (interactive)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]