33 lines
843 B
Org Mode
33 lines
843 B
Org Mode
#+TITLE: SKILL: Emacs Edit (org-skill-emacs-edit.org)
|
|
#+AUTHOR: Agent
|
|
#+FILETAGS: :skill:emacs:edit:org:
|
|
#+PROPERTY: header-args:lisp :tangle org-skill-emacs-edit.lisp
|
|
|
|
* Overview
|
|
The *Emacs Edit* skill provides the agent with the capability to read and modify Org-mode files via the Emacs client.
|
|
|
|
* Implementation
|
|
|
|
** Package Context
|
|
#+begin_src lisp
|
|
(in-package :opencortex)
|
|
#+end_src
|
|
|
|
** Emacs Interface Logic
|
|
#+begin_src lisp
|
|
(defun emacs-edit-read-file (filepath)
|
|
"Reads a file via Emacs."
|
|
(harness-log "EMACS: Reading ~a" filepath))
|
|
|
|
(defun emacs-edit-modify (filepath id changes)
|
|
"Modifies an Org node via Emacs."
|
|
(harness-log "EMACS: Modifying ~a in ~a" id filepath))
|
|
#+end_src
|
|
|
|
** Skill Registration
|
|
#+begin_src lisp
|
|
(defskill :skill-emacs-edit
|
|
:priority 100
|
|
:trigger (lambda (ctx) (declare (ignore ctx)) nil))
|
|
#+end_src
|