我在.emacs
文件中有以下函数来获取迷你缓冲区中当前缓冲区的路径:
(defun show-file-name ()
"Show the full path file name in the minibuffer."
(interactive)
(message (buffer-file-name)))
(defalias 'pwd 'show-file-name)
我的问题是,如何将此功能修改为还将路径复制到剪贴板?
答案 0 :(得分:1)
(defun show-file-name ()
"Show the full path file name in the minibuffer."
(interactive)
(kill-new (buffer-file-name))
(message (buffer-file-name)))