I just migrated from vim
to emacs
and I'm editing an HTML
file now.
In vim
, I can use !firefox %
to open current file.
But in emacs
, if I typed M-!
then firefox %f
, it uses firefox to open
http://www.%f.com/
page.
I tried firefox (buffer-name)
, it doesn't work for me as well.
Could anyone tell me the expression which stands for the current file?
I found some similar questions, but the solutions are all about writing lisp function then use key bindings. I wish I could just use some kind of placeholder like %f
within the shell command, and have it automatically expand to the buffer's filename when Emacs runs the command.