       (when option
         (kill-new fname)
         (when (= 16 (car option))
-          (browse-url-of-file fname))))))
+          (browse-url-of-file fname))))
+    fname))
 
 
 (provide 'htmlize-r2f)

prefix), do the above and also open the html file in the default browser."
  (interactive "P")
  (require 'ox-html)
  (let ((org-html-htmlize-output-type 'css)
        (org-html-htmlize-font-prefix "org-")
        (fname (concat htmlize-r2f-output-directory
                       (if (buffer-file-name)

      (goto-char (point-min))
      (insert (concat "<!-- This file is generated using the "
                      "`htmlize-r2f' function\n"
                      "from " src-link " -->\n"))
      (insert "<html>\n<head>\n<style media=\"screen\" type=\"text/css\">\n")
      ;; Go to the end of the buffer (end of the css code) and
      ;; insert the closing tags for `style' and `head' and opening
