How can I write a function or keybind in emacs which simply runs the function below to…
- User
How can I write a function or keybind in emacs which simply runs the function below to get the full file path?
(defun easy-kill-on-buffer-file-name (n) "Get
buffer-file-name' ordefault-directory'. If N is zero, remove the directory part; -, remove the file name part; +, full path." (if (easy-kill-get mark) (easy-kill-echo "Not supported ineasy-mark'") (pcase (or buffer-file-name default-directory) (nil (easy-kill-echo "Nobuffer-file-name'")) (file (let* ((file (directory-file-name file)) (text (pcase n (- (file-name-directory file)) (`0 (file-name-nondirectory file)) (_ file)))) (easy-kill-adjust-candidate 'buffer-file-name text)))))) Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.