all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Noam Postavsky" <npostavs@gmail.com>, "Óscar Fuentes" <ofv@wanadoo.es>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: RE: `grep' command on MS Windows with Cygwin, looking for text with Unicode chars
Date: Wed, 13 Jun 2018 12:26:27 -0700 (PDT)	[thread overview]
Message-ID: <6568494b-e721-410f-8658-c4df45ef92f1@default> (raw)
In-Reply-To: <CAM-tV-_t65E5yXCuUhkOy+O_=efgv_cb==OeHxJqaOQkzDmx1A@mail.gmail.com>

> >> Is there a simple way to use `M-x grep' (e.g., giving it
> >> some switches or escape chars or replacing them with hex
> >> escapes or...) to search for some text that includes
> >> non-ASCII Unicode chars?
> 
> > If there is a method, I'll like to know as well. This is the main
> reason
> > why I don't use Unicode in my source files.
> 
> This seems to do the right with thing with the grep I have installed:
> 
>     grep "[^[:cntrl:][:print:]]" *.el
> 
> According to the GNU grep manual [:cntrl:][:print:] looks equivalent
> to Emacs' [:ascii:], in the C locale.
> 
> The grep I have installed doesn't seem to support anything but the C
> locale anyway (at least, setting LANG isn't needed). It identifies
> itself in the --help output as:
> 
> GNU grep version 2.0d
> Win32 port with subdirectory search created by Tim Charron
> (full source available at
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.interlog.com_-
> 7Etcharron_grep.html&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_J
> nE&r=kI3P6ljGv6CTHIKju0jqInF6AOwMCYRDQUmqX22rJ98&m=mwTRqK15rRKM1JijTtXJcy
> fypP_2OPkAexmNd725LFQ&s=ElcYIkHLVnToY1wdciKB3H6WEeO6g1KYRX-M4tBIsro&e=)
> 
> That web page indicates it's from 2001, but works well enough that
> I've never bothered to change it. Not sure how Cygwin grep would act.

Interesting; thanks.

With my (old) Cygwin grep, in the `lisp' directory, that shows 4 hits,
3 in char-fold.el and one in mpc.el.  The first char-fold.el hit shows
matches for curly quotes, for example.  But I guess that won't help me
find just curly quotes. ;-)

In each case, the grep hits show octal escapes instead of Unicode-char glyphs.



  parent reply	other threads:[~2018-06-13 19:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13 18:23 `grep' command on MS Windows with Cygwin, looking for text with Unicode chars Drew Adams
2018-06-13 18:40 ` Óscar Fuentes
2018-06-13 19:09   ` Drew Adams
2018-06-13 19:16   ` Noam Postavsky
2018-06-13 19:22     ` Noam Postavsky
2018-06-13 19:28       ` Drew Adams
2018-06-13 19:26     ` Drew Adams [this message]
2018-06-13 19:08 ` Eli Zaretskii
2018-06-13 19:43   ` Tomas Nordin
2018-06-14  2:33     ` Eli Zaretskii
2018-06-14  2:40       ` Eli Zaretskii
     [not found] <<356e7bf9-3f93-448c-a067-f6b567d5aa5a@default>
     [not found] ` <<83y3fi33or.fsf@gnu.org>
2018-06-13 19:16   ` Drew Adams
2018-06-13 19:42     ` Eli Zaretskii
2018-06-13 23:09     ` Bob Proulx
2018-06-13 23:37       ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6568494b-e721-410f-8658-c4df45ef92f1@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=npostavs@gmail.com \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.