Should this function be broken down into several? (defun define-special-note (name…
- User
Should this function be broken down into several?
(defun define-special-note (name &optional opening body preamble) (push name special-notes) (let* ((kebab-name (replace-regexp-in-string "\s-+" "-" (downcase name) t)) (function-name (intern kebab-name)) (buffer-name (format "%s" kebab-name)) (content (concat preamble opening body))) (defalias function-name (lambda () (interactive) (if (buffer-live-p (get-buffer buffer-name)) (kill-buffer buffer-name)) (get-buffer-create buffer-name) (with-current-buffer buffer-name (org-mode) (insert content) (goto-char (point-min)) (setq-local buffer-read-only t)) (switch-to-buffer buffer-name)))))
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.