From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: [External] : Re: Regexp for matching control character, say, FORM FEED. (Was: Re: The `^L' appeared in built-in help.) Date: Thu, 22 Jul 2021 09:13:31 +0800 Message-ID: References: <87mtr0889q.fsf@zoho.eu> <87a6n084rz.fsf@zoho.eu> <87lf61ymol.fsf@zoho.eu> <87im14xv08.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27723"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Help-Gnu-Emacs \(help-gnu-emacs@gnu.org\)" , Emanuel Berg To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 22 03:14:11 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6NHv-00070p-DG for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 22 Jul 2021 03:14:11 +0200 Original-Received: from localhost ([::1]:57988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6NHt-0008FX-QK for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 21 Jul 2021 21:14:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6NHX-0008FP-VB for help-gnu-emacs@gnu.org; Wed, 21 Jul 2021 21:13:47 -0400 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:43579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6NHW-0007NM-0j for help-gnu-emacs@gnu.org; Wed, 21 Jul 2021 21:13:47 -0400 Original-Received: by mail-lf1-x135.google.com with SMTP id f30so5971650lfv.10 for ; Wed, 21 Jul 2021 18:13:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZDXdDOEHk4iB2LOpDKCaZYxKKKGFwGttgOGPyY8aUc0=; b=GMcboTaUXMcUx5t8W8/ZrkTVpmLU3UpfveOb47xaa35f/J2Ic5GWwu6+GP2nrmGmZ+ IkbJotgEkpP87hnTgMAnTopYoNLgKRa1FXOtuad4Mn0EY+UkeWhRjHjXkYKiP22XQb1B Hksxsi34mya+R9YHcA2EpOhsqm/wtJ8SZyFUIindmKtWmsm1yuwteUC7liWG3e/sD2YS Ljr9JToQP8bZpQ234+VsYiaFvZxMiTOYzuOV6P688v6wMo59JXyJSYCSvJ3BmAgHDdwY eqwFyzJrb4TfB9bP3ODYnDPzS6TirYt00gj84/+n0jbqi11ipTHxYHYEAaJVwNLW+MyW lNdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZDXdDOEHk4iB2LOpDKCaZYxKKKGFwGttgOGPyY8aUc0=; b=HmzfX0oTx++pWMSW2mihQaO3R+Q5gzIGwbwFmsNiRxLdfNE9OmgGLXQNl1Mp5xRGmo Soqv424SEIMSji/RLDKuewz6wsf2WNHmTKqm5/nRhiZYoxefHENG6HszmUVAGc5Cuk/l D69uUjWGlYVcSAd8A5R0CwcsKJRse9Dz1qtyntBd8JadMKpRzHH77xC7JCYk77rXJ+Cq a2RfSryBzQk6aqDnYUXqAi5/SkyfqVFg4oQ0tks4MbE7tfKV1HaAy6JxHePy60sqfazM y1DKSlbq1/pS52C0DMBDvbDPY5hcB7MQCK7HzIVHh2DWAeTICUdGROIBo3c2hcmYNzcy yypA== X-Gm-Message-State: AOAM531eGk3wZbsWI7dsb5mVLhXmDlqa40kcw9xCrBRZPb3hAHbeVulw llrfO5ZHz9G16laFlRD4k/nbMPzTunX9iDyCq7Y= X-Google-Smtp-Source: ABdhPJz4soEpBOupD8QHhebw05Dq7Ts4sjyjQqeijhVLJNlv+qo8iBAiDTNmZ4s1bTHj/Z6UpseSlLKzufSf/S0tB90= X-Received: by 2002:a05:6512:da:: with SMTP id c26mr28521208lfp.390.1626916423238; Wed, 21 Jul 2021 18:13:43 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131996 Archived-At: On Thu, Jul 22, 2021 at 1:08 AM Drew Adams wrote: > > > > > M-x insert-char RET form feed (ff) RET > > > > > > aka: > > > > > > `C-q C-l' > > > > > > https://www.gnu.org/software/emacs/manual/html_node/emacs/Inserting-Text.html > > > > If I don't know the Unicode name and the above input sequence of it, > > to be more specifically, I only know its representation in Emacs is > > ^L, then how to search/match/find/filter out it with regexp. > > > > As a similar example, I can grep it with the following > > > > $ grep $'\014' 11.txt | cat -te > > ^L$ > > $ grep $'\f' 11.txt | cat -te > > ^L$ > > It's not clear (to me) what you're trying to do. > The initial question was about _inserting_ the char, I believe. > For that, `C-q' is the easiest way for a control char, since > you can just hit the key for the control char (`C-l' in this case). As I've recapped the title of the issue, I've made another slightly different discussion from the OP, i.e., searching the document with regexp for matching the control characters. > For other Unicode chars, `M-x insert-char' can help, but you don't > need that just to insert an ASCII control char. > > Now you seem to be asking something else, and what it is is not > clear to me. If you're asking about search, Yes, that's what I'm concerned about > then just use `C-q': > `C-s C-q C-l' I want to know whether there are some similar regexp patterns in Emacs as the ones used by grep, say, $'\014' or $'\f'. HY