On Thu, Jul 22, 2021 at 12:14 PM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Drew Adams wrote: > > >>>>> I want to know whether there are some similar regexp > >>>>> patterns in Emacs as the ones used by grep, say, $'\014' > >>>>> or $'\f'. > >>>> > >>>> (re-search-forward "\C-l") > >>> > >>> Yes, or (re-search-forward "[\f]") > >>> or (re-search-forward "[\014]") > >> > >> What about > >> > >> (re-search-forward (kbd "C-l")) > > > > Sure. Which is the same as (re-search-forward "\f"). > > So far, these works > > (re-search-forward "[\014]") > (re-search-forward "[\f]") > (re-search-forward "\C-l") > (re-search-forward "\f") > (re-search-forward (kbd "C-l")) > > It seems subexpressions at lines 1 and 2 evaluate to the same > "[^L]", as does for their part lines 3, 4 and 5, and then it > is "^L"... I observed another strange phenomenon as described below. Suppose I've the following content in scratch buffer: (re-search-forward "\f") ^L I put the point at the end of sexp line, and hit `C-j' to evaluate it. I find that each time after the sexp has been evaluated successfully, the `^L' line will be moved to the next line. See the screenshot in the attachment, where I've evaluated the sexp 4 times. Any hints for this behavior? Regards, HY