Skip to content

Commit 0c5a95d

Browse files
authored
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.
1 parent 42fb1bf commit 0c5a95d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gptel-org.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ current heading and the cursor position."
184184
(substring-no-properties
185185
(replace-regexp-in-string
186186
"\\s-+" "-"
187-
(org-get-heading)))
187+
(org-entry-get nil "ITEM")))
188188
50))))))
189189
(when (stringp topic) (org-set-property "GPTEL_TOPIC" topic)))
190190

0 commit comments

Comments
 (0)