From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vr Rm Newsgroups: gmane.emacs.devel Subject: Re: Raw strings (experimental patches inside) Date: Fri, 10 Aug 2012 14:11:05 -0700 Message-ID: <502578E9.1020407@gmail.com> References: <651F6603-F798-4381-929E-7D86A28DBC4D@gmail.com> <502464D6.4000103@gmail.com> <87wr1749m0.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1344633088 19104 80.91.229.3 (10 Aug 2012 21:11:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2012 21:11:28 +0000 (UTC) Cc: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 10 23:11:26 2012 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 1SzwUO-0000Hh-7U for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2012 23:11:24 +0200 Original-Received: from localhost ([::1]:39687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzwUN-0008RX-9F for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2012 17:11:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzwUE-0008RQ-LV for emacs-devel@gnu.org; Fri, 10 Aug 2012 17:11:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzwU8-0007AI-KU for emacs-devel@gnu.org; Fri, 10 Aug 2012 17:11:14 -0400 Original-Received: from mail-pb0-f67.google.com ([209.85.160.67]:63238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzwU8-000780-7U for emacs-devel@gnu.org; Fri, 10 Aug 2012 17:11:08 -0400 Original-Received: by pbbrr4 with SMTP id rr4so1195156pbb.6 for ; Fri, 10 Aug 2012 14:11:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=UoCLUdW6QTsTaA3EXd6LBieBwKROhL76cMziDbzJkbQ=; b=MxmhpiONxJM1Z2qoBHK7R1wPAEOZ9JG4TtvJIQd1djpZBpg1d7EOhGv2o7O8rQZpUD zARlOwRJWLDxpn6KoWEmf/ATaxyzkUdMb+yVnHth/195v7R/7tFo4EUPKZTQ/7ZqUvei UNHHr0u2BP5i96FCj+QUhPX3HsXuU2qDJvVuM9yI8kGuZYUaG10IITwbDeibOaMIJFKX yBdoafFsb6qBrO5aOugAv/u/boTd7JLcp7MBCfDUkI1D+SOH5ES+EBc9svOmMz//ojwH fyZaIw3Hbj2ckW38rf06c10rA6lD0bKROD8GAM4WogOn8n9stII8GOcHX8gfmF+2wXjm udGA== Original-Received: by 10.68.217.202 with SMTP id pa10mr565914pbc.15.1344633067399; Fri, 10 Aug 2012 14:11:07 -0700 (PDT) Original-Received: from [172.28.13.82] (70-35-42-138.static.wiline.com. [70.35.42.138]) by mx.google.com with ESMTPS id ru4sm4017797pbc.66.2012.08.10.14.11.06 (version=SSLv3 cipher=OTHER); Fri, 10 Aug 2012 14:11:06 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: <87wr1749m0.fsf@uwakimon.sk.tsukuba.ac.jp> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.67 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:152422 Archived-At: On 08/09/2012 10:08 PM, Stephen J. Turnbull wrote: > Vr Rm writes: > > > But the difficulty in using Emacs regular expressions shouldn't be > > underestimated, especially for those of us on the dim side of the > > superhuman spectrum. > > Nothing personal, but if you can't even search for tabs (C-s C-q TAB > will do), of course you're going to find regexps difficult. It's hard > to see how they can be simplified -- as used in all languages I know, > regexps are extremely compact notation. Such notation is going to be > non-trivial if you can't remember to use C-q to insert command > characters literally, and I don't think raw strings are going to help. > (A sane assignment of character classes such that punctuation is > always an operator, as in Perl or Python, would be much more mnemonic > help, I think.) I do totally agree that I'm appealing from the lower 50%, maybe even the top 90%, of the population of programming proficiency. For myself, I wish it weren't true but alas it is. (But as a profession does, as a middle aged man -- for which there's nothing else I'm qualified to do, nor would anyone have the slightest interest hiring me to learn -- keep me from going homeless and hungry and from becoming a burden to society.) However, I have been using Emacs for 20 years, since 1992 when it was installed in our university's brand new Sparc stations, on a somewhat continual basis. (And for the last 5 years intensely for more or less all my programming tasks.) In addition, I use regular expressions, if not ever day, quite often in a variety of languages, Javascript, Groovy, Python and Clojure being my favourite implementations. And, while they all have their own idiosyncrasy I can move between them pretty easily. Yet every time I try to use Emacs regular expressions, either on the command line or in elisp, for anything more complex than "ca+dr", I'm thwarted. As for the TAB, yes I completely agree, Emacs has a fully complete regular expression system. Yet, I always fail at using it. I thought I'd try it again just to see if perhaps things have improved or maybe I was miss remembering but if I want to search for: /.*\)$/ i.e. a parenthesis at the end of a line. I can't do it! Same is true for a search find all tabs not at the beginning of the line and not preceded by a tab: /^[^\t]+\t/ It's entirely possible that the above are actually close. Or that the Emacs versions are even more efficient and compact. But I can't figure them out without spending a bunch of time reading through info, and then, by the next time I return to them, I will have forgotten the Emacs specific quirks. (Or can only remember the quirks of other languages, if you prefer.) Again, I'm fully aware that with respect to Emacs proficiency (and probably programming proficiency in general) I'm far below most subscribers to this list and certainly the contributors. And I'm not really arguing this feature for myself, but rather, on humanitarian grounds if you will :) ... as a single data point of a population that would dramatically benefit if they could actually use Emacs regular expressions.