> On May 1, 2017, at 17:59, Eli Zaretskii wrote: > >> From: Jean-Christophe Helary >> Date: Mon, 1 May 2017 17:23:19 +0900 >> >> The function only understand paths that start from / or from ~, so the path can't start with ws. As for paths ending with ws, that's a very marginal case. Currently, in a triple-click all the ws ending the string is selected and the function will thus fail to open the selected path. It should be possible to test incrementally whether the trimmed path points to a file, or if the path ending with the first ws does, etc until the end of the trailing ws list, but that's not practical. > > OK, thanks. > > Then I'd suggest to use split-string, which can trim any regexp > specified by its 4th argument. That way, you can include NBSP in the > characters to trim. I don't think we should include any additional > characters that have the Zs Unicode category need to be trimmed, as I > believe they are unlikely to be encountered in this scenario. Perhaps > a comment to that effect is in order. Ok, I have something that works here. I'm attaching a diff. Let me know if that is satisfactory. Jean-Christophe