branch: elpa/gptel
commit 0c5a95d527b22380112356cda1719fc43de893bd
Author: Akira Komamura <6270544+aki...@users.noreply.github.com>
Commit: GitHub <nore...@github.com>

    gptel-org: Don't include tags in gptel-org-set-topic (#801)
    
    gptel-org.el (gptel-org-set-topic): The function `org-get-heading`
    returns the heading text along with any tags if the heading has
    tags. In contrast, the `ITEM` property gives the actual heading
    text of the entry and should be used for that purpose. When
    available, the function uses the org-element cache to improve
    efficiency.
---
 gptel-org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gptel-org.el b/gptel-org.el
index a26a961b4a..67add2a782 100644
--- a/gptel-org.el
+++ b/gptel-org.el
@@ -184,7 +184,7 @@ current heading and the cursor position."
                                  (substring-no-properties
                                   (replace-regexp-in-string
                                    "\\s-+" "-"
-                                   (org-get-heading)))
+                                   (org-entry-get nil "ITEM")))
                                  50))))))
   (when (stringp topic) (org-set-property "GPTEL_TOPIC" topic)))
 

Reply via email to