I would like to ask how to get the file name from interactive command in lisp.
Btw, this is taken from another stackoverflow thread.
Paste an image on clipboard to Emacs Org mode file without saving it
(defun markdown-insert-clipboard-image (&optional file)
(interactive "G")
(shell-command (concat "pngpaste " file))
(insert (concat "")))
My problem is the file is using absolute path instead of just the filename causing the file to have an error when pushed to the server.
Instead of yahoocom.png only, I get
/Users/test/test/test/test/yahoocom.png
I would only want to get
yahoocom.png
Is there anyway that I can modify the code so that it only uses the filename.