branch: externals/ellama
commit 863193ee6f6d3f459c51e77527b5d0951f4f3601
Author: Sergey Kostyaev <sskosty...@gmail.com>
Commit: Sergey Kostyaev <sskosty...@gmail.com>

    Add markdown to org filter to ellama-write command
    
    Added a condition to apply `ellama--translate-markdown-to-org-filter`
    as a filter when the current mode is derived from org-mode during the
    ellama-stream function execution.
---
 ellama.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ellama.el b/ellama.el
index 49726ff0df..f635d3cf4a 100644
--- a/ellama.el
+++ b/ellama.el
@@ -2211,7 +2211,9 @@ ARGS contains keys for fine control.
   (when (region-active-p)
     (ellama-context-add-selection))
   (ellama-stream (format ellama-write-prompt-template instruction)
-                :point (point)))
+                :point (point)
+                :filter (when (derived-mode-p 'org-mode)
+                          #'ellama--translate-markdown-to-org-filter)))
 
 ;;;###autoload
 (defun ellama-change (change &optional edit-template)

Reply via email to