From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Proposal: make up-list escape strings Date: Tue, 08 Apr 2014 18:47:04 -0700 Message-ID: <5344A698.6080201@dancol.org> References: <534482F2.6010504@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nMcsrqsi2gg0CMDh1fkdji77oO3fbRMpN" X-Trace: ger.gmane.org 1397008051 31108 80.91.229.3 (9 Apr 2014 01:47:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Apr 2014 01:47:31 +0000 (UTC) Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 09 03:47:25 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WXhbo-000888-Op for ged-emacs-devel@m.gmane.org; Wed, 09 Apr 2014 03:47:25 +0200 Original-Received: from localhost ([::1]:43802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXhbo-0003Pc-AH for ged-emacs-devel@m.gmane.org; Tue, 08 Apr 2014 21:47:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXhbe-0003PO-CH for emacs-devel@gnu.org; Tue, 08 Apr 2014 21:47:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXhbX-0003dy-Vp for emacs-devel@gnu.org; Tue, 08 Apr 2014 21:47:14 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:37342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXhbX-0003c8-LU for emacs-devel@gnu.org; Tue, 08 Apr 2014 21:47:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=cZTIaJneCsJ4AD3XqbNNFoD7tfnAsj4a029Wrd9UKCM=; b=Rt1MicDR4tGS9MocP36+DejhPEHt5pXFZoHyyborHjl4r4A070dH8uiSotS/+bSnuSI2HgVZKAH2QQHPM5B4O2sMNYqEkwP+RFttfR0POAwA9Xxsql6VtiVeh51YFIkf0H5xvCn+Iko/zN6y27DgqBylHRdjOjyTZ9uqp+/gP63JreVL62KL7K01USe49+zEkds/uUMFGIqZoN0c1oTzZPX9MBA+nhZgaftG0vW05cCl6TgjcNkV0eNw2B3rARjp87s7E6prFLBzGR/33g7jkQ2rFCU9ux+++dvzUO07EhdfVa5yVzQSfT7iPJCisksi2PfnPwcvjFPyaK3AUE2pcg==; Original-Received: from c-67-161-115-61.hsd1.wa.comcast.net ([67.161.115.61] helo=[192.168.1.50]) by dancol.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1WXhbW-0005qM-LD; Tue, 08 Apr 2014 18:47:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: X-Enigmail-Version: 1.6 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171354 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nMcsrqsi2gg0CMDh1fkdji77oO3fbRMpN Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 04/08/2014 06:11 PM, Stefan Monnier wrote: >> +If ESCAPE-STRINGS is non-nil (as it is interactively), treat >> +encoding strings as sexps." > ^^^^^^^^ > enclosing, right? ;-) That'll learn me some. > Why limit this to strings? It makes just as much sense to do it for > comments, doesn't it? It's a bit harder to implement for comments (as in, rewrite up-list using parse-partial-sexp), and I'm not sure it's as useful. Probably not too bad though. >=20 >> (while (/=3D arg 0) >> (if (null forward-sexp-function) >> - (goto-char (or (scan-lists (point) inc 1) (buffer-end arg))= ) >> + (condition-case err >> + (goto-char (or (scan-lists (point) inc 1) (buffer-end a= rg))) >> + (scan-error >> + (or (and escape-strings >> + (let ((syntax (syntax-ppss))) >> + (and (nth 3 syntax) >> + (nth 8 syntax)) >> + (goto-char (nth 8 syntax)) >> + (when (> arg 0) (forward-sexp)) >> + t)) >> + (signal (car err) (cdr err))))) >=20 > If @ is point, I think that from >=20 > (a "b (c (d @ e) " "f) g" h) >=20 > up-list should move to >=20 > (a "b (c (d e)@ " "f) g" h) >=20 > and then to >=20 > (a "b (c (d e) "@ "f) g" h) >=20 > whereas I think your code would move to >=20 > (a "b (c (d e) " "f)@ g" h) I'm not sure which behavior is more useful. Your proposed behavior is a departure from what we have today, and one could make a case for either approach. I haven't heard anyone complain about up-list crossing string boundaries. --nMcsrqsi2gg0CMDh1fkdji77oO3fbRMpN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTRKaYAAoJEMAaIROpHW7IoHMP/i4PjPj7SURjKANz3FIsXH3w T7JF88Xdxlbo3lfWucuSj9eq2y/Sl5aCNj1KCrmTrFyN/Lw0VjfHiTR/beZShgSp 8Pjq0VehWN9B7546dXaC2AVkk8rKVX5ql5UQDb88DFStCquCeJf6JjPcy2B4Js2I FlTZ8ORXX09GLhGB//HSkYf5/V3EnEjjebP/u/L2+APq4Z6nhSZPbdtUM1UbQEmb Zjpf+L+HwSjTCny5tQXoH5RP85r7q0pWH+6rvd8zium2smrKNGaJF5mVfG4k4QbO EBB3zCLNcEIQ1VlKdkT5oju4Wbj11EorM2SV148UZmbvpg0DSlW1xypQEkgXQT0U Rq4AOLV2kjbFjnwsvPgWeNAAQFlzUOF98lzPOQA6iThQbnW4UWp+5W3ciKJM/AAP e6x5dYYkh/JwvIKtQ8x/7ejNPIQCTr7Gp82/xn9QnVBojVfyJcIJXVkoV8/hoLaJ whiJFqzLOjoHM7OSqcK9QxxJAa89W9iqzfhn4GToiGwoa7CN2djdvpVe12gTKkgN SkyjNlmRPeyAfgaZRpuwft6PasA7L1I/jjTfpLlUnqVliUHfBPsT0ntbB6h2Pfsj aG1Z9q3Jm4IZg1o0gpckIurQvweJ3ep6OOx1Abwpk9Hf1QdKTinWwQYCnx6oQgWI L2ZoxUzHcf5PP+Yt94pI =NP2R -----END PGP SIGNATURE----- --nMcsrqsi2gg0CMDh1fkdji77oO3fbRMpN--