Extract real-path function for emacs