This is the only way I can open smb files with emacs org-mode links, as far as I can tell. smb: file paths do not seem to work.
This method (/run/usr/1000/gvfs) works with evince (pdf) files. This suggests that this is an issue with libreoffice rather than with emacs org-mode (aside from smb: file paths not working).
I am able to use org-mode links to local libreoffice files in org files just fine, eg:
[[file:///home/user/Documents/foo.odt][foo]]
My .emacs file has
'(org-file-apps
(quote
((auto-mode . emacs)
("\\.odt\\'" . "/usr/bin/libreoffice %s")
("\\.pdf\\'" . "/usr/bin/evince %s")
...
From a terminal (outside of emacs), the following will work for LO:
/usr/bin/soffice smb://100.100.100.100/server_name_1/Documents/foo.odt
However if I try the org-mode link:
[[smb://100.100.100.100/server_name_1/Documents/foo.odt][foo]]
emacs asks if I want to create a new header. So emacs org-mode does not play well with smb: file paths.
If I try an org-mode link to the /run/usr/1000/gvfs mount point:
[[file:///run/user/1000/gvfs/smb-share:server=100.100.100.100,share=server_name_1/Documents/foo.odt]]
I get a general I/O error: “General input/output error while accessing /run/user/1000/gvfs/smb-share:server=100.100.100.100,share=server_name_1/Documents/foo.odt.”
This is the same error I get from a terminal with LibreOffice if I try
/usr/bin/soffice /run/user/1000/gvfs/smb-share:server=100.100.100.100,share=server_name_1/Documents/foo.odt
(or another symbolic link to this).
But this method opens pdf (evince) files from emacs org-mode links:
[[file:///run/user/1000/gvfs/smb-share:server=100.100.100.100,share=server_name_1/Documents/foo.pdf]]
In a terminal, this path also works for evince, with quotes:
evince "/run/user/1000/gvfs/smb-share:server=100.100.100.100,share=server_name_1/Documents/foo.pdf"
Adding quotes to the path for the odt file in a terminal does not help for LibreOffice. I get the same I/O error. That is in a terminal,
/usr/bin/soffice "/run/user/1000/gvfs/smb-share:server=100.100.100.100,share=server_name_1/Documents/foo.odt"
also fails