Skip to main content
This is not about elisp. It is about url-browse und find-file.
Link
Tobias
  • 33.7k
  • 1
  • 38
  • 78
Source Link
Dan
  • 33.4k
  • 7
  • 106
  • 171

Function to find a file or open a URL depending on argument?

Q: in there a function that can find a file or open a URL as needed?

I have a string that can be either a) a local filename, or b) a URL. Is there an existing function that I can call on the string that will do what I mean and open the file if it's a file, or open the URL in a browser if it's a URL?

It wouldn't be hard to write such a function, but I'd rather not reinvent the wheel.