[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gptel ed0bfc9ed1 116/273: gptel: Offer suggestion when set
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gptel ed0bfc9ed1 116/273: gptel: Offer suggestion when setting gptel-topic |
Date: |
Wed, 1 May 2024 10:02:10 -0400 (EDT) |
branch: elpa/gptel
commit ed0bfc9ed122b2b64ed8d311a391749ac1926df5
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
gptel: Offer suggestion when setting gptel-topic
gptel.el (gptel-set-topic): Offer a suggestion when setting a GPTEL_TOPIC
property for an Org heading.
Fix linting in docstring.
---
gptel.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/gptel.el b/gptel.el
index 3285ebd5e2..287e64ecb0 100644
--- a/gptel.el
+++ b/gptel.el
@@ -66,6 +66,7 @@
(declare-function org-property-values "org")
(declare-function org-open-line "org")
(declare-function org-at-heading-p "org")
+(declare-function org-get-heading "org")
(eval-when-compile
(require 'subr-x)
@@ -110,7 +111,7 @@ This option is ignored unless Curl is in use (see
`gptel-use-curl').
When set to nil, Emacs waits for the full response and inserts it
all at once. This wait is asynchronous.
-'tis a bit silly."
+\='tis a bit silly."
:group 'gptel
:type 'boolean)
(make-obsolete-variable 'gptel-playback 'gptel-stream "0.3.0")
@@ -648,7 +649,14 @@ current heading and the cursor position."
(org-set-property
"GPTEL_TOPIC"
(completing-read "Set topic as: "
- (org-property-values "GPTEL_TOPIC"))))
+ (org-property-values "GPTEL_TOPIC")
+ nil nil (downcase
+ (truncate-string-to-width
+ (substring-no-properties
+ (replace-regexp-in-string
+ "\\s-+" "-"
+ (org-get-heading)))
+ 50)))))
('markdown-mode
(message
"Support for multiple topics per buffer is not implemented for
`markdown-mode'."))))
- [nongnu] elpa/gptel f0953d569e 069/273: gptel: Simplify response API, (continued)
- [nongnu] elpa/gptel f0953d569e 069/273: gptel: Simplify response API, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 6c47c0a483 066/273: README: Add videos with streaming, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel c11e53061c 078/273: gptel-transient: New gptel-menu transient options, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 422eba8048 087/273: gptel-curl: Run post-response-hook in gptel buffer, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 42132d3662 093/273: README: tweak description of package, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 07f27be696 101/273: gptel-transient: UI tweak for custom prompt, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel e6df1a5e33 098/273: gptel: Use :require for auth-source-search (#78), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 9c4af204a3 102/273: gptel-transient: Add crowdsourced prompts, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel e6a1468bd2 094/273: gptel: Make API host configurable (#67), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel c20fba8247 107/273: gptel-curl: Only convert to Org in Org buffers, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel ed0bfc9ed1 116/273: gptel: Offer suggestion when setting gptel-topic,
ELPA Syncer <=
- [nongnu] elpa/gptel cee5893d79 130/273: gptel: Appease the byte compiler., ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 66d2bafad6 132/273: gptel-ollama: Fix buffer parsing, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel e105a52541 142/273: gptel: Update docstrings for prompt/response prefixes, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel c9d362a3e9 153/273: gptel-transient: Set model when redirecting to new buffer, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 9126bed43f 159/273: gptel: Set window when doing auto-scrolling, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 85bd47cb4c 164/273: README: Add support for llama.cpp, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 4d01dddf7d 155/273: gptel, gptel-curl: Address checkdoc warnings, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel e5357383ce 166/273: gptel: Appease byte-compiler and linter, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel d5b10c3d6d 169/273: gptel: gptel-model can be an arbitrary string, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel d6ef79f621 177/273: gptel-transient: Show descriptions of directives, ELPA Syncer, 2024/05/01