From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Raw string literals in Emacs lisp. Date: Tue, 05 Aug 2014 08:15:14 +0200 Message-ID: <874mxro425.fsf@fencepost.gnu.org> References: <878ungor1v.fsf@uwakimon.sk.tsukuba.ac.jp> <8761ijng08.fsf@uwakimon.sk.tsukuba.ac.jp> <871tt7lzro.fsf@fencepost.gnu.org> <53D567FD.4030708@porkrind.org> <87r412iobp.fsf@lifelogs.com> <53D9586F.6020705@porkrind.org> <87bns6in3g.fsf@lifelogs.com> <20140802084744.GA3541@acm.acm> <87vbqbqmn3.fsf@fencepost.gnu.org> <8738dem5hr.fsf@uwakimon.sk.tsukuba.ac.jp> <87zjfmowu0.fsf@fencepost.gnu.org> <87y4v5lntb.fsf@uwakimon.sk.tsukuba.ac.jp> <87egwxputn.fsf@fencepost.gnu.org> <87sildliqr.fsf@uwakimon.sk.tsukuba.ac.jp> <87ppggoj3m.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1407219365 22813 80.91.229.3 (5 Aug 2014 06:16:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Aug 2014 06:16:05 +0000 (UTC) Cc: stephen@xemacs.org, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 05 08:15:56 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 1XEY2M-0007v0-Er for ged-emacs-devel@m.gmane.org; Tue, 05 Aug 2014 08:15:54 +0200 Original-Received: from localhost ([::1]:56896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEY2H-0004IV-W8 for ged-emacs-devel@m.gmane.org; Tue, 05 Aug 2014 02:15:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEY2D-0004IM-AQ for emacs-devel@gnu.org; Tue, 05 Aug 2014 02:15:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEY2A-0007jo-9S for emacs-devel@gnu.org; Tue, 05 Aug 2014 02:15:45 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEY2A-0007jj-5a for emacs-devel@gnu.org; Tue, 05 Aug 2014 02:15:42 -0400 Original-Received: from localhost ([127.0.0.1]:35616 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEY23-0007LJ-3X; Tue, 05 Aug 2014 02:15:35 -0400 Original-Received: by lola (Postfix, from userid 1000) id E6193E0821; Tue, 5 Aug 2014 08:15:14 +0200 (CEST) In-Reply-To: (Richard Stallman's message of "Mon, 04 Aug 2014 21:41:09 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:173424 Archived-At: Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > Well, I am not sure about the size of the wart in practice. It has not > apparently caused much of a disturbance for XEmacs. It certainly seems > less relevant in practice than our traditional wart > > (info "(emacs) Left Margin Paren") > > with regard to reliable detection of strings out of context. > > That problem is in a different feature (finding the start of a > function), and we recommend a preventive measure to avoid it. The preventive measure is not working in source buffers other than Elisp and it requires manual intervention. M-q seems to avoid _moving_ an opening parent to the front of the line in strings: that is already a big help in avoiding them to creep in when reformatting code. auto-fill-mode however doesn't, so you don't get help against accidentally introducing them. > So it is not a real problem. In Elisp, it is a solved problem. More like a "problem with known manual workarounds". > But even if it were a real problem, this argument is invalid in form. > The existence of one problem we can't fix does not make it good > to create another. Sure. I was just putting it in perspective: in practice the ambiguity of r#"?\" without leading context is not going to cause anywhere near the pain users already have to deal with. I am not saying that this is a non-problem. But in contrast to the paren problem, it is a fringe problem not likely to occur in practice. So I consider it likely to be less annoying in its effects to users than a raw string syntax diverging from that of XEmacs which would basically imply that any portable code has to forego raw strings completely. Of course, if Emacs can come up with a significantly better proposal, there is some likelihood that it will eventually _also_ be adopted by XEmacs. But as long as strings and raw strings share the same ending delimiter and/or the ending delimiter of a raw string has a valid other syntactic interpretation on its own, the ambiguity will be there. ASCII does not offer a wealth of delimiter candidates, and having to write something like #r"fa\fa d\fd \fd safa"#r would likely be more annoying than the problem it is supposed to cure. I am not saying that #r"..." is what we should ultimately take, just that I don't see the counterargument as weighing all that strongly. I actually would likely prefer something like #"..." as input but that's even more likely to trip up backward parsing. -- David Kastrup