[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gptel 04da0a42af 10/11: gptel: Truncate function documenta
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gptel 04da0a42af 10/11: gptel: Truncate function documentation to newline |
Date: |
Sat, 30 Nov 2024 07:00:05 -0500 (EST) |
branch: elpa/gptel
commit 04da0a42af7fd81be6bd004f311c710b5cf3111e
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
gptel: Truncate function documentation to newline
* gptel.el (gptel--describe-directive): Return function
documentation only up to the first newline. Most of the following
documentation is usually irrelevant in the context that we show it
in gptel.
* gptel-rewrite.el (gptel-rewrite-menu): Prettify rewrite
directive display in the menu.
---
gptel-rewrite.el | 2 +-
gptel.el | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gptel-rewrite.el b/gptel-rewrite.el
index 7a2aebd01a..97cb8e98cf 100644
--- a/gptel-rewrite.el
+++ b/gptel-rewrite.el
@@ -352,7 +352,7 @@ By default, gptel uses the directive associated with the
`rewrite'
[:description
(lambda ()
(gptel--describe-directive
- gptel--rewrite-directive (max (- (window-width) 14) 20) "⮐"))
+ gptel--rewrite-directive (max (- (window-width) 14) 20) " "))
[""
("s" "Set full directive" gptel--rewrite-directive-menu)
(gptel--infix-rewrite-extra)]]
diff --git a/gptel.el b/gptel.el
index 599d5b8929..3e91d91b47 100644
--- a/gptel.el
+++ b/gptel.el
@@ -1013,7 +1013,8 @@ replaced with REPLACEMENT."
(string-replace
"\n" (or replacement " ")
(truncate-string-to-width
- (or (documentation directive)
+ (or (and-let* ((doc (documentation directive)))
+ (substring doc nil (string-match-p "\n" doc)))
"[Dynamically generated; no preview available]")
width nil nil t))))
(list (and-let* ((from-template (car directive)))
- [nongnu] elpa/gptel updated (a84461245e -> 7cf8e3b19b), ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 4ae9c1b24c 06/11: gptel-rewrite: Improve rewrite UI and feature, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel c645444de9 09/11: README: Fix formatting errors, mention more packages, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 04da0a42af 10/11: gptel: Truncate function documentation to newline,
ELPA Syncer <=
- [nongnu] elpa/gptel d177822a7f 01/11: README: Add a section about selecting backends explicitly (#467), ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel ffed97d2e4 05/11: gptel: Adjust persistence for dynamic directives, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 41158decde 08/11: README: Reorder, adjust formatting, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 7cf8e3b19b 11/11: gptel: Fix gptel--parse-directive, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 10752576e4 02/11: gptel: Move system-message to gptel--request-data, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 67903a1ac5 04/11: gptel: Generalize gptel directives, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel 0dacb474f8 03/11: gptel: Add generic gptel--parse-list function, ELPA Syncer, 2024/11/30
- [nongnu] elpa/gptel f887dadb49 07/11: gptel-rewrite: Rewrite directive handling changes, ELPA Syncer, 2024/11/30