I read this post but I have a little problem with the following code (I am using Emacs 24.3 and Cygwin and I don't know Lisp):
(defun open-in-browser()
  "Open buffer in browser, unless it is not a file. Then fail silently (ouch)."
  (interactive)
  (if (buffer-file-name)
      (let ((filename (buffer-file-name)))
        (shell-command (concat "start firefox.exe \"file://" filename "\"")))))
My shell-command is bash. I changed the last line to
(shell-command (concat "cygstart d:/program/fox/firefox.exe ...
Opening
d:/documents/test.htmlworks well.Opening
d:/documents/my notes/test.htmldoes not work. I get the following error in Firefox:Can not find file
d:/documents/my
I think bash is missing the space in my notes. How can I fix it?