Dear all, I’m trying to understand the rationale behind the definition of the function url_general in url.cpp:
url url_general (string name, int type= URL_SYSTEM) { if (starts (name, "local:")) return url_local (name (6, N (name))); if (starts (name, "file://")) return url_file (name (7, N (name))); if (starts (name, "http://")) return url_http (name (7, N (name))); if (starts (name, "https://")) return url_https (name (8, N (name))); if (starts (name, "ftp://")) return url_ftp (name (6, N (name))); if (starts (name, "tmfs://")) return url_tmfs (name (7, N (name))); if (starts (name, "//")) return url_blank (name (2, N (name))); #ifdef OS_ANDROID if (starts (name, "content://")) return url_content (name (10, N (name))); #endif if (heuristic_is_path (name, type)) return url_path (name, type); if (heuristic_is_default (name, type)) return url_default (name, type); if (heuristic_is_mingw_default (name, type)) return url_mingw_default (name, type); if (type != URL_CLEAN_UNIX) { if (heuristic_is_http (name)) return url_http (name); if (heuristic_is_ftp (name)) return url_ftp (name); } return url_get_name (name, type); } I would like to allow other URLs, for example mail messages in MacOS are defined via URL of the form message:%3c67dd051e.050a0220.1987fe.5a73scho...@google.com%3E and can be opened form the command line via open message:%3c67dd051e.050a0220.1987fe.5a73scho...@google.com%3E but I cannot create for them hyperlinks in documents, as the schema is not recognized by url_general. Do you see any solution to have a more general approach to URLs? Also the code above looks quite repetitive, but maybe there is a reason for this. @Joris?? Max
_______________________________________________ Texmacs-dev mailing list Texmacs-dev@gnu.org https://lists.gnu.org/mailman/listinfo/texmacs-dev