vendredi 13 janvier 2017

Copy current buffer absolute file path to the OS clipboard

(defun copy-full-path ()
  (interactive)
  (let ((path (buffer-file-name)))
    (when path
      (setq path (expand-file-name path))
      (funcall interprogram-cut-function path)
      (message "copied %s in clipboard" path))))

Aucun commentaire:

Enregistrer un commentaire