I have a bash script which Sweaves .Rnw files into pdf's.
I am wanting to write a emacs function to invoke this script on the current buffer. So far I have this:
(defun sweave_to_pdf () "sweave_to_pdf function" (interactive) (shell-command "~/Scripts/Shell/sweave_to_pdf.sh" (buffer-file-name (window-buffer (minibuffer-selected-window)))) )
It seems the file name and path of the buffer is not being passed to the shell script as a line argument. Any ideas how I could achieve this?