Copy Emacs File Names To The Mac Clipboard

** TL; DR

This copies the name of the current Emacs buffer to the Mac pasteboard.

I load that in my init files and set a hotkey to call it with this:

The original version that just does a copy paste to the pasteboard of whatever is selected came from [[https://gist.github.com/the-kenny/267162][this gist]]. For completeness, it looks like this:

I use the evil vim binding so I don't need that version. I also don't totally understand how it works. I just know it does.

Reference:

https://gist.github.com/the-kenny/267162

https://emacs.stackexchange.com/questions/10900/copy-text-from-emacs-to-os-x-clipboard