[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Raw strings (experimental patches inside)

From: Vr Rm
Subject: Re: Raw strings (experimental patches inside)
Date: Fri, 10 Aug 2012 14:11:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0

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:


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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]