From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: lisp/term/ns-win.el modification Date: Mon, 01 May 2017 11:59:23 +0300 Message-ID: <83efw9j6l0.fsf@gnu.org> References: <44D4AA3B-8F87-42B6-A2D2-00487B066183@gmail.com> <74D20593-63B6-46FB-BAC3-D841D0BCD461@gmail.com> <0A49E755-3D18-48E8-81D4-253160F60A16@gmail.com> <40f503a4-49eb-a3ff-fe5f-993c8f346c33@lanl.gov> <15112485-03CC-4FFF-8A9D-BA28D2490A91@gmail.com> <42CDF1D0-015D-4F0D-A8A2-A55776D34FEE@gmail.com> <83inlmkmqq.fsf@gnu.org> <5d3d3f3d-e49e-2b83-0591-14b3e19f8cb0@gmail.com> <834lx5lxz6.fsf@gnu.org> <7A82B268-C40B-4D45-8973-68A2408F7F28@gmail.com> <83r309jdcj.fsf@gnu.org> <00A24BD4-FE6F-4098-A8DD-73240899FA13@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1493629207 22400 195.159.176.226 (1 May 2017 09:00:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 May 2017 09:00:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jean-Christophe Helary Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 01 10:59:54 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d57BS-0005ZE-QQ for ged-emacs-devel@m.gmane.org; Mon, 01 May 2017 10:59:54 +0200 Original-Received: from localhost ([::1]:47385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d57BY-0002T8-LD for ged-emacs-devel@m.gmane.org; Mon, 01 May 2017 05:00:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d57BR-0002T0-5o for emacs-devel@gnu.org; Mon, 01 May 2017 04:59:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d57BO-0003mY-53 for emacs-devel@gnu.org; Mon, 01 May 2017 04:59:53 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d57BO-0003mU-1d; Mon, 01 May 2017 04:59:50 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3372 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d57BN-0003hl-DO; Mon, 01 May 2017 04:59:49 -0400 In-reply-to: <00A24BD4-FE6F-4098-A8DD-73240899FA13@gmail.com> (message from Jean-Christophe Helary on Mon, 1 May 2017 17:23:19 +0900) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214471 Archived-At: > 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.