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: Thu, 09 Aug 2012 18:33:10 -0700 Message-ID: <502464D6.4000103@gmail.com> References: <651F6603-F798-4381-929E-7D86A28DBC4D@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1344562399 3670 80.91.229.3 (10 Aug 2012 01:33:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2012 01:33:19 +0000 (UTC) Cc: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 10 03:33:20 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 1Sze6I-00074a-Lu for ged-emacs-devel@m.gmane.org; Fri, 10 Aug 2012 03:33:18 +0200 Original-Received: from localhost ([::1]:35927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sze6H-0004ek-SH for ged-emacs-devel@m.gmane.org; Thu, 09 Aug 2012 21:33:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sze6E-0004eQ-PN for emacs-devel@gnu.org; Thu, 09 Aug 2012 21:33:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sze6D-0006J3-LD for emacs-devel@gnu.org; Thu, 09 Aug 2012 21:33:14 -0400 Original-Received: from mail-pb0-f67.google.com ([209.85.160.67]:40363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sze6D-0006Is-En for emacs-devel@gnu.org; Thu, 09 Aug 2012 21:33:13 -0400 Original-Received: by pbbrr4 with SMTP id rr4so689255pbb.6 for ; Thu, 09 Aug 2012 18:33:12 -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=G+ApqDzolU7FSzPrxpx5rNyuYL++VUv8A8kuhwNujck=; b=C70vu+sE8IHnKIJMyijpDmYyHIG2yOJLRxj5fSx/glpTTSkq3fOZXmHHOsC5CpWf8e xPN317EMYVDDar8YqYjY4mbxHwUJkpE+clA+uDzdzAPGrXlftUNbJUQ6w3Eo1B4nstM2 0kfdSIKZXOV4rtBKrq9Ngooe/QlZioxzSU0VPtvsgLtbmlVw3cgZoBo1vR2aDyw7Q4a4 7+J9MmVHzSFfDMPyNjWbD69a4eMgGQTx8iD2zGkOGg78zJoCW1ZpVtWFk0JmghJz6t7Q PVOc+KC8xQGlRBD+CvQfcsFxMT1u6z6ji0kIcs7Jy+I6eG443+SyFV5vJc207L+ikktJ XpvA== Original-Received: by 10.68.201.198 with SMTP id kc6mr8183283pbc.122.1344562392210; Thu, 09 Aug 2012 18:33:12 -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 pn4sm2207990pbb.50.2012.08.09.18.33.10 (version=SSLv3 cipher=OTHER); Thu, 09 Aug 2012 18:33:11 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: 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:152390 Archived-At: Hi, Sorry for jumping in on this thread so late! But this is the biggest, by far, usability problem I have with Emacs. I don't really have a good idea of the amount of effort raw strings would be (in my eyes, pretty much all all Emacs changes seem to have been accomplish by super-humans.) 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. Several years ago I finally bit the bullet and decided that I was going to figure out how to find and replace buffer carriage returns in a file I was editing even if I had to instrument the sum total of Emacs' elisp code and single step through it all defun by defun. It took me an ungodly amount of time, I think over an hour, before I finally managed to find the solution, I know that it had something to do with c-j. And when I blogged about it, it was and still is by far the most trafficked item I have ever posted. And now that the blog is long defunct, I still don't know how to search for tabs, carriage returns or use Emacs regular expressions, meaning that I still, to this day -- in 2012!, have to use grep and awk to do do regular expression editing operations that were standard issue for editors in the 80s. I do love Emacs and it would take vastly more than that to dissuade me from using it for pretty much all my editing. And of course the capability for these things is there, I just don't either have the natural aptitude or the inclination to learn them. (though I have tried) Still, I'm certainly not alone in my inability. Regular expression handling continues I would say is the biggest Bugbear for many people learning Emacs or using it to it's full capabilities. And it's obviously a core piece of editor functionality. On 08/04/2012 04:47 PM, Stefan Monnier wrote: >>>> When I type a regex I'm always annoyed by the amount of escaping >>>> I have to do. I've always wished Emacs Lisp had raw strings >>>> ie. a syntax to type litteral text without interpretation. >>> AFAIK, the only real use-case is indeed regexp, and for them a better >>> solution would be to not escape the parentheses at all. >> That doesn't handle the horror that is searching for backslashes... > > That is not a problem significant enough to warrant the introduction of > something like raw-strings. > >> It would also be nice to have a function which takes a string representation >> and converts it to an `rx' representation, which I couldn't find in rx when >> I looked. > > Indeed, we don't have that right now. > My lex.el includes something pretty close, but I'd rather not include > lex.el into Emacs because it's not clean enough. OTOH maybe I could add > it to GNU ELPA. > > > Stefan > >