unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Searching for command options in man pages (searching for a hyphen not represented by ASCII 2d)
@ 2003-02-20 18:43 Jerry Asher
  2003-02-20 19:22 ` Alan Shutko
  0 siblings, 1 reply; 5+ messages in thread
From: Jerry Asher @ 2003-02-20 18:43 UTC (permalink / raw)


I like displaying man pages w/i emacs.  At some point, these man pages
started displayed fields in bold.

I want to search for a switch option, but I can't because the damned
hyphen is bolded.

For instance, m-x man mv shows there is a -b option to mv. (never knew
that).  I cannot search for the -b.  isearch-forward just beeps at me.

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).  It's not a hyphen, but it displays as a hyphen.  A
long switch option (--backup) is represented by 8892 (hex).

How do I search for these characters?

I note than in both NT Emacs (21.2) and in Cygwin (emacs 21.2), the
hyphens are displayed in bold, and hexl shows they are all 2D (hex).

Man is this annoying (m-x man annoying)

How can I search my man pages in emacs?

Thanks,


Jerry
jerry.nospam@nospam.theashergroup.com
(Please reply to usenet and/or remove the .nospam in my email address)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Searching for command options in man pages (searching for a hyphen not represented by ASCII 2d)
  2003-02-20 18:43 Searching for command options in man pages (searching for a hyphen not represented by ASCII 2d) Jerry Asher
@ 2003-02-20 19:22 ` Alan Shutko
  2003-02-21  2:00   ` Jerry Asher
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Shutko @ 2003-02-20 19:22 UTC (permalink / raw)


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

Here, we just changed /etc/sysconfig/i18n to be just en_US, not
en_US.UTF-8.

-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
Looking for a developer in St. Louis? http://web.springies.com/~ats/
Parts of Texas look like Kansas with a goiter.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Searching for command options in man pages (searching for a hyphen not represented by ASCII 2d)
  2003-02-20 19:22 ` Alan Shutko
@ 2003-02-21  2:00   ` Jerry Asher
  2003-02-21 17:40     ` Kevin Rodgers
  0 siblings, 1 reply; 5+ messages in thread
From: Jerry Asher @ 2003-02-21  2:00 UTC (permalink / raw)


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.
 
> Here, we just changed /etc/sysconfig/i18n to be just en_US, not
> en_US.UTF-8.

Yes, that did fix the problem, thanks!

Jerry

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Searching for command options in man pages (searching for a hyphen not represented by ASCII 2d)
  2003-02-21  2:00   ` Jerry Asher
@ 2003-02-21 17:40     ` Kevin Rodgers
  2003-02-22 22:48       ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Rodgers @ 2003-02-21 17:40 UTC (permalink / raw)


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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Searching for command options in man pages (searching for a hyphen not represented by ASCII 2d)
  2003-02-21 17:40     ` Kevin Rodgers
@ 2003-02-22 22:48       ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2003-02-22 22:48 UTC (permalink / raw)


> From: Kevin Rodgers <kevin.rodgers@ihs.com>
> Newsgroups: gnu.emacs.help
> Date: Fri, 21 Feb 2003 10:40:53 -0700
> > 
> > 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.

That's ridiculous: next we will bind each Latin-2 letter to a regexp
that matches both ISO-8859 and Unicode varieties.  Then we do the
same with all the other Latin-n characters.  Then we do that for
Greek, Hebrew, and whatsnot.  Come on!

Isn't it easier to configure `man' to produce ASCII or Latin-1
formatted pages?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-02-22 22:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-20 18:43 Searching for command options in man pages (searching for a hyphen not represented by ASCII 2d) Jerry Asher
2003-02-20 19:22 ` Alan Shutko
2003-02-21  2:00   ` Jerry Asher
2003-02-21 17:40     ` Kevin Rodgers
2003-02-22 22:48       ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).