From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.aquamacs.devel,gmane.emacs.devel Subject: Re: lisp/term/ns-win.el modification Date: Fri, 28 Apr 2017 10:49:42 +0900 Message-ID: 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> Reply-To: aquamacs-devel-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1493344249 31901 195.159.176.226 (28 Apr 2017 01:50:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Apr 2017 01:50:49 +0000 (UTC) Cc: aquamacs-devel-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To: emacs-devel Original-X-From: aquamacs-devel+bncBDE4RK5S4YGBB6N7RLEAKGQE3TRS3WY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Apr 28 03:50:45 2017 Return-path: Envelope-to: gead-aquamacs-devel@m.gmane.org Original-Received: from mail-pf0-f183.google.com ([209.85.192.183]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3v3T-0008AY-V4 for gead-aquamacs-devel@m.gmane.org; Fri, 28 Apr 2017 03:50:44 +0200 Original-Received: by mail-pf0-f183.google.com with SMTP id i4sf607023pfc.1 for ; Thu, 27 Apr 2017 18:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=iMzDBQSzOgjLaEnahxTq8sFqKnTXENiZT7Y7pw18KEU=; b=MLTu7PpyfBFy40AQeGbHYhBVpInse4gAsHPlKXcpY6A10rJAuPLFeShcSF8WZehYPV 1m3dcp0J1uFXtQj67c3Kqs0ZWlVNm6Vyfb7/3iAMb93sXSdDZ5DVLMLqwYaqMmVOhbNT 5B5PVodOtEB6GocT6dDvVB3cdjSCu3x03Oj+lZKlZ5Ykr+fquDKrPeEv18lKfAzQTUNn I5tcxncO3jQq5JNaxtn0IvJTLb7OTZWZ1E96E/Zo0b+r5LW4YG7WQzQPqFPGoJytlYHh Isgc6boo1XScpu5++u2MgtYBi5TtkloHU9XbPYtbPFX6XMfpTyUPNmAGn5+1EeFANM3J 7idQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=iMzDBQSzOgjLaEnahxTq8sFqKnTXENiZT7Y7pw18KEU=; b=NRByrTnkbMmzD4G5x9DBIvu9JMLcXqEfoGddgM59LxHWDMFvkpk2ikQ1cOK7gBirUI TpBwMKspJZhhlxCQFBDBRGMskYzevJw3SKegU03lSsCHpzuBjXnQTwE7wa9voMmzaavH E2bVGL/E8K4dJpYKVpvfmQOyONtmt+jW7n6COsTOViqCcHTkcrffDz6NKxwMwWHyOzof AstjufI0r/JIOfgCc4FxmWVL9XI2AznW2V6dmD41xuH+eBxU32vMmkTh2Ivb8wPW/MNb FmVLbRbYuOVXPoxp0+Iyxu6ef/gMCcyYYtto+fdLAGSInugukzPAaXIhGeTQqkTMAd8b Ppzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:subject:from:in-reply-to :date:cc:content-transfer-encoding:message-id:references:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=iMzDBQSzOgjLaEnahxTq8sFqKnTXENiZT7Y7pw18KEU=; b=JieRULFQoofeiVqLsdZMFVtebNcIyq8DMoryVlCBHqzQlf8+TQbvSNVHFWo7IoKECz IYNQ6rYNvhn+em3J4J51x9wyHx+ZFdfNMDCI7f6npw1UfVduwRto45lTsvShAyBhdCaI 46jpvLG95+lCSnB7dJCg6t73CS/NI9sHYx4qQjDOT5A/ZdJ3nHbvnb6A5ZvsRwQRMMk7 V++qR+ySQxZksKY5CY13OLr0D/K/Yo3biP6QZVCbJRhNQvvD6Dp6SPq0P861EB/KTT/t H1tvPd5BcwVeOF4U77RvfsorYzmSQZNKTvIcUwdN56g+tJQCsl0Pmd33Yq0U91wk6Qd4 Original-Sender: aquamacs-devel-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AN3rC/4OmMCzK6YfW4/Bz6hhKu3E1de1avzzZVQkgzreWV2gxgAGbbGx qL+CdRrr4y3qeQ== X-Received: by 10.157.80.33 with SMTP id a33mr184894oth.13.1493344249542; Thu, 27 Apr 2017 18:50:49 -0700 (PDT) X-BeenThere: aquamacs-devel-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.36.166 with SMTP id z35ls5070596ota.42.gmail; Thu, 27 Apr 2017 18:50:49 -0700 (PDT) X-Received: by 10.200.43.68 with SMTP id 4mr3751043qtv.81.1493344249303; Thu, 27 Apr 2017 18:50:49 -0700 (PDT) Original-Received: from mail-pg0-x22e.google.com (mail-pg0-x22e.google.com. [2607:f8b0:400e:c05::22e]) by gmr-mx.google.com with ESMTPS id y184si645455pfb.1.2017.04.27.18.50.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Apr 2017 18:50:49 -0700 (PDT) Received-SPF: pass (google.com: domain of jean.christophe.helary-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:400e:c05::22e as permitted sender) client-ip=2607:f8b0:400e:c05::22e; Original-Received: by mail-pg0-x22e.google.com with SMTP id t7so6901804pgt.3 for ; Thu, 27 Apr 2017 18:50:49 -0700 (PDT) X-Received: by 10.99.2.84 with SMTP id 81mr9004074pgc.17.1493344249034; Thu, 27 Apr 2017 18:50:49 -0700 (PDT) Original-Received: from [10.251.100.9] ([210.160.37.44]) by smtp.gmail.com with ESMTPSA id w124sm5880373pgb.62.2017.04.27.18.50.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Apr 2017 18:50:47 -0700 (PDT) In-Reply-To: <15112485-03CC-4FFF-8A9D-BA28D2490A91-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> X-Mailer: Apple Mail (2.3273) X-Original-Sender: jean.christophe.helary-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com; spf=pass (google.com: domain of jean.christophe.helary-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:400e:c05::22e as permitted sender) smtp.mailfrom=jean.christophe.helary-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list aquamacs-devel-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact aquamacs-devel+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 891992928160 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.emacs.aquamacs.devel:1701 gmane.emacs.devel:214373 Archived-At: Thank you everybody for the advice. Following yesterday's discussion, I hav= e modified the patch the following way: 1) The code from ergomacs was removed and replaced with the string-trim fun= ction from subr-x 2) The splitting on \f, \t, \v was removed (I've kept the splitting on \n a= nd \r since they are "natural" splitters when selecting multiple lines) 3) The ns- prefix was added to the function 4) while was replaced by dolist Regarding 3) and Anders' comment "If all you do is to place the call inside= a dolist, you should be ok. Introducing additional functions (only used in= one location) isn't 100% clean either." I'm not sure I want to change the = cond block because it is very elegant as it is. Please advise. I have yet to investigate how to implement Mitsuharu's suggestion but it se= ems to be involving Objective-C programming which I am not sure I can handl= e. The new patch is now waiting to be considered for a merge in Aquamacs and i= s available here: https://github.com/davidswelt/aquamacs-emacs/pull/129/files Jean-Christophe > On Apr 28, 2017, at 8:32, Jean-Christophe Helary wrote: >=20 >>=20 >> On Apr 28, 2017, at 0:09, Davis Herring wrote: >>=20 >>>> I mean what the string contains. Your code splits it on certain charac= ters: "[\f\t\n\r\v]+". It is always good to be able to go to some documenta= tion, to verify that these really are the characters that delimiter file na= mes. However, if the content is an arbitrary text file, then that should be= mentioned. >>>=20 >>> The content is an arbitrary string selected in any application that sup= ports services. I've removed \s from the delimiters *because* spaces can be= part of a path on Mac. >>=20 >> All those characters could appear as well: macOS is Unix, after all, and= so supports anything except NUL (and reserves / as a directory separator, = although in some interfaces / and : are interchanged). That said, of cours= e spaces are much more common in names, but it's good to remember that this= is a human factors decision, not a technical one based on OS rules. >=20 > After a night of sleep, I guess I could split only on \n and \r since the= y are the one that the user will use as a visual cue to select paths put on= multiple lines. Would that be satisfying ? >=20 > Jean-Christophe --=20 You received this message because you are subscribed to the Google Groups "= aquamacs-devel" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to aquamacs-devel+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org