0

我的.emacs文件中有以下函数来获取当前缓冲区在迷你缓冲区中的路径:

(defun show-file-name ()
  "Show the full path file name in the minibuffer."
  (interactive)
  (message (buffer-file-name)))
(defalias 'pwd 'show-file-name)

我的问题是,如何修改此功能以路径复制到剪贴板?

4

1 回答 1

3
(defun show-file-name ()
  "Show the full path file name in the minibuffer."
  (interactive)
  (kill-new (buffer-file-name))
  (message (buffer-file-name)))
于 2012-10-03T19:37:30.540 回答