bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#52558: Option for easier typing of regexps


From: Richard Stallman
Subject: bug#52558: Option for easier typing of regexps
Date: Sun, 19 Dec 2021 23:43:53 -0500

[[[ 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. ]]]

  > I think it would be really confusing to have a different regexp syntax
  > when prompting interactively to when you're writing code, so I don't
  > think this would be a good idea.

Actually, the two already are different, in precisely the way that you
worry will be confusing.

Regexps in Lisp code are in string constants, so you have to escape
each backslash with a second backslash.  Regexps in the minibuffer
don't do that.  "\\(foo\\|bar\\)" vs `\(foo\|bar\)'.

It IS confusing.  But I don't see a good way to simplify it.

However, if we could invent a way to specify, "Use extended regexp
syntax", where there are no backslashes for many of these constructs,
we could unify the two.  "(foo|bar)" and `(foo|bar)'.

Unfortunately, there are many \-letter constructs which this
change would not simplify.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







reply via email to

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