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

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

Re: Searching for command options in man pages (searching for a hyphen n


From: Kevin Rodgers
Subject: Re: Searching for command options in man pages (searching for a hyphen not represented by ASCII 2d)
Date: Fri, 21 Feb 2003 10:40:53 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Jerry Asher wrote:

Alan Shutko <ats@acm.org> wrote in message 
news:<87lm0a7ojl.fsf@wesley.springies.com>...

jerry.nospam@theashergroup.com (Jerry Asher) writes:


In Red Hat (8.0 but I am pretty sure in 7.x as well), in emacs 21.2
hexl-mode shows the bolded hyphen is not ASCII 2D, but is represented
by ASCII 92 (ex).
RHL 8 defaults to a UTF8, iirc.  So you'd have to enter the unicode
version of the hyphen... whichever it is that man outputs.  Gee,
thanks....

Not only that, but I think the unicode hyphen (-) is different from
the unicode dash (--).  Bleh. So you have searching for <hyphen>b is
different than searching for <dash>backup.

So we should bind "-" in isearch-mode-map like " " is bound: to a special
command that searches for a regexp that matches these variations.  The only
tricky thing is that Emacs doesn't provide a separate syntax class for dash/
hyphen, unlike space/tab/newline/formfeed, and I don't know how to represent
the Unicode characters in a regexp string in a way that would be relevant for
other encodings (including single-byte buffers):

HYPHEN is U+2010
EN DASH is U+2013
EM DASH is U+2014

and of course there are many others (e.g. SOFT HYPHEN and NON-BREAKING HYPHEN).

--
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>



reply via email to

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