The use of format in org-open-file assumes that there will only ever
be a single '%s' in a mailcap entry:
(cond
((and (stringp cmd) (not (string-match "^\\s-*$" cmd)))
;; Remove quotes around the file name - we'll use
shell-quote-argument.
(if (string-match "['\"]%s['\"]" cmd)
(setq cmd (replace-match "%s" t t cmd)))
(setq cmd (format cmd (shell-quote-argument file)))
However this is not necessarily the case, e.g. I have
text/html; mailcap_bg %s url_handler.sh "@s" || logger
"url_handler.sh failed on %s"; test=test -n "$DISPLAY" &&
mailcap_test %s firefox; nametemplate=%s.html
text/html; w3m -T text/html -dump %s || lynx -dump %s || links -dump
%s; copiousoutput; nametemplate=%s.html; description=HTML text
The mailcap(4) man page doesn't explicitly say whether multiple %s is
allowed or not, but it has always worked for me. The
w3m || lynx || links
example above is a particularly common use case, AFAIK.
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode