Created
February 8, 2022 22:15
-
-
Save thomp/87d3cebf31778cde37b5f7720ef5b96e to your computer and use it in GitHub Desktop.
Grab file URL corresponding to file at point in Dired
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun dat-url-of-dired-file () | |
"Add to the kill ring the URL for tthe file named at the current Dired point." | |
(interactive) | |
(let ((tem (dired-get-filename t t))) | |
(if tem | |
; (message "file: %s" | |
(kill-new | |
(concatenate 'string "file://" | |
(expand-file-name tem))) | |
(error "No file on this line")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment