KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I need to get the full path of the file that I'm editing with emacs. Is there a function for that? If not, what would be the elisp function for getting that? How can I copy the result (path name) to a clipboard so that I can reuse it? I'm using Mac OS X and Aqumacs. (setq filepath (get-fullpath-current-file)) ??? (copy-to-clipboard 'filepath) ??? ADDED (defun show-file-name () "Show the full path file name in the minibuffer." (interactive) (message (buffer-file-name)) (kill-new (file-truename buffer-file-name)) ) (global-set-key "\C-cz" 'show-file-name) Combining the two answers that I got, I could get what I want. Thanks for the answers. And some more questions. What's for (file-truename)? Can I copy the path name to System(OS)'s clipboard, not the kill ring so that I can use the info with the other apps?
Tags (comma-separated)
Save Edits
Cancel