(defun zs-copy-current-file-name-to-system-clipboard (&optional full-path-p)
"copy, if the current buffer accesses a file, the name or file path(given a
prefix argument) to the system clipboard(if under X) and append to the killing
ring."
(interactive "P")
(if (buffer-file-name)
(if full-path-p
;; (x-select-text (buffer-file-name))
(kill-new (buffer-file-name))
;; (x-select-text (file-name-nondirectory (buffer-file-name)))
(kill-new (file-name-nondirectory (buffer-file-name)))
)))