I've been having problems recently with links of the form
[[thing.owl]]
which get interpreted into HTML as
<a href="thing.owl.html">thing.owl</a>
which is not what I wanted. But
[[thing.tgz]]
gives
<a href="thing.zip">thing.tgz<a/>
which is what I expected.
So I did some poking around at the weekend and discovered the
cause. Muse checks to see what kind of link a thing is and treats the
link differently. To detect files it uses this...
(defcustom muse-file-regexp
(concat "\\`[~/]\\|\\?\\|\\."
"\\(html?\\|pdf\\|mp3\\|el\\|zip\\|txt\\|tar\\)"
"\\(\\.\\(gz\\|bz2\\)\\)?\\'")
"A link matching this regexp will be regarded as a link to a file."
:type 'regexp
:group 'muse-regexp)
Hence, the difference between the two.
I can't quite see the logic behind this regexp. It requires extension
for every new file type that I wish to reference.
I've set mine to this instead...
(setq muse-file-regexp "[a-zA-Z]+[.][a-zA-Z]+")
Which basically says anything with a "." in it. Of course, this means
that muse links can't have dots in them anymore, but it seems to me
that the number of people wanted to do this is likely to be far less
than the number of people wishing to link to files which are not html,
pdf, mp3 etc.
Or have I missed something obvious? Would changing muse-file-regexp in
the way I suggest have some implications that I haven't seen?
Thanks
Phil
_______________________________________________
Muse-el-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/muse-el-discuss