I'm trying to autoexport a file from orgmode to html, so I decided to make a function to check the major mode of the buffer and check if the buffer has open the file that I want to export but when I try it the function export all the orgmode files and not the one that I want.
Here is the code:
(defun org-mode-export-hook()
"Auto export html"
(when (eq major-mode 'org-mode)
(when (eq buffer-file-name "/home/rafa/org/to-read.org")
(org-twbs-export-to-html t))))
Can anyone tell me what I'm doing wrong??