unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* man page prompter thinks "|" is legitimate
@ 2002-10-15 21:28 Dan Jacobson
  2002-10-18  8:17 ` Man-follow-manual-reference and non-() references Dan Jacobson
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Jacobson @ 2002-10-15 21:28 UTC (permalink / raw)


Gentlemen, type s o r t | u n i q <escape> x m a n <return>
We are then prompted with
        Manual entry (default sort|uniq):
Why, that's ridiculous.  How could a potential man page have a | in
its name?  Can't the prompter be more intelligent in guessing what man
page we want?
-- 
http://jidanni.org/ Taiwan(04)25854780

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

* Re: man page prompter thinks "|" is legitimate
@ 2002-10-16 14:40 David R. Linn
  2002-10-17 23:51 ` Dan Jacobson
  2002-10-19  2:41 ` Francesco Potorti`
  0 siblings, 2 replies; 5+ messages in thread
From: David R. Linn @ 2002-10-16 14:40 UTC (permalink / raw)


>> Gentlemen, type s o r t | u n i q <escape> x m a n <return>
>> We are then prompted with
>>         Manual entry (default sort|uniq):
>> Why, that's ridiculous.  How could a potential man page have a | in
>> its name?  Can't the prompter be more intelligent in guessing what man
>> page we want?


$$ mkdir demo.for.dan
$$ cd demo.for.dan
$$ touch filename\|including\|vbars
$$ ls
filename|including|vbars
$$ touch sort\|uniq.1
$$ ls
filename|including|vbars  sort|uniq.1


vertical-bar *is* a legitmate filename character under UNIX.  Thus,
if I felt it was appropriate, I could name a man page with a vbar
in it's filename.  This might not be particularly *wise* but it *would*
be legit so tools need to handle it.

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

* Re: man page prompter thinks "|" is legitimate
  2002-10-16 14:40 man page prompter thinks "|" is legitimate David R. Linn
@ 2002-10-17 23:51 ` Dan Jacobson
  2002-10-19  2:41 ` Francesco Potorti`
  1 sibling, 0 replies; 5+ messages in thread
From: Dan Jacobson @ 2002-10-17 23:51 UTC (permalink / raw)
  Cc: bug-gnu-emacs

D> vertical-bar *is* a legitmate filename character under UNIX.  Thus,
D> if I felt it was appropriate, I could name a man page with a vbar
D> in it's filename.  This might not be particularly *wise* but it
D> *would* be legit so tools need to handle it.

Yes, vertical bar might even be a legitimate character in an English
given name (Hello, I'm Monty [vertical bar] Python) however, all this
will slow up my lifestyle, and RMS agrees with me, so there.

From: Richard Stallman <rms@gnu.org>
Subject: Re: man page prompter thinks "|" is legitimate
To: jidanni@dman.ddts.net
How about this change?

*** man.el.~1.112.~	Tue Oct 15 18:21:41 2002
--- man.el	Wed Oct 16 11:36:04 2002
***************
*** 497,503 ****
      (save-excursion
        ;; Default man entry title is any word the cursor is on, or if
        ;; cursor not on a word, then nearest preceding word.
!       (setq word (current-word))
        (if (string-match "[._]+$" word)
  	  (setq word (substring word 0 (match-beginning 0))))
        ;; If looking at something like ioctl(2) or brc(1M), include the
--- 497,506 ----
      (save-excursion
        ;; Default man entry title is any word the cursor is on, or if
        ;; cursor not on a word, then nearest preceding word.
!       (skip-chars-backward "-a-zA-Z0-9._+")
!       (let ((start (point)))
! 	(skip-chars-forward "-a-zA-Z0-9._+")
! 	(setq word (buffer-substring start (point))))
        (if (string-match "[._]+$" word)
  	  (setq word (substring word 0 (match-beginning 0))))
        ;; If looking at something like ioctl(2) or brc(1M), include the

--------
P.S. how about those Perl::Pages with those ::'s jazz, did RMS's
change remember them [:: could be expected, but not |, because nobody
would put a | in a man page name and expect their jazz to not break
debian, redhat, etc. distribution scripts before even making it into a
distribution.]
-- 
http://jidanni.org/ Taiwan(04)25854780 

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

* Man-follow-manual-reference and non-() references
  2002-10-15 21:28 man page prompter thinks "|" is legitimate Dan Jacobson
@ 2002-10-18  8:17 ` Dan Jacobson
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Jacobson @ 2002-10-18  8:17 UTC (permalink / raw)
  Cc: neteler

Now that we are fixing emacs' M-x man command, what should we do about
GRASS manual pages [e.g. mirror
http://grass.cis.sinica.edu.tw/gdp/online.html ]
They come with e.g.

SEE ALSO
       s.in.ascii

       s.out.shape

       s.out.ascii

       parser

which shows up with underlines, but Man-follow-manual-reference
doesn't know about them because they don't have "(1)" or whatever
appended, I bet.

Therefore, emacs should be "enhanced" to recognize them, or [I say:]
GRASS should get with the program, and add "(1)" (1G)? (1GR)? ... and
indeed, they do live in /man1/ etc. directories.
-- 
http://jidanni.org/ Taiwan(04)25854780

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

* Re: man page prompter thinks "|" is legitimate
  2002-10-16 14:40 man page prompter thinks "|" is legitimate David R. Linn
  2002-10-17 23:51 ` Dan Jacobson
@ 2002-10-19  2:41 ` Francesco Potorti`
  1 sibling, 0 replies; 5+ messages in thread
From: Francesco Potorti` @ 2002-10-19  2:41 UTC (permalink / raw)
  Cc: bug-gnu-emacs, jidanni

> >>         Manual entry (default sort|uniq):
> >> Why, that's ridiculous.  How could a potential man page have a | in
> $$ ls
> filename|including|vbars
> vertical-bar *is* a legitmate filename character under UNIX.  

If I am not wrong, all characters are legitimate in file names under
Unix, apart from the slash.  This does not mean that it is reasonable to
assume that all characters are likely to be found in man page names.

The `|' character should be removed, and the `:' character added.  The
latter is used in Perl man pages.

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

end of thread, other threads:[~2002-10-19  2:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-15 21:28 man page prompter thinks "|" is legitimate Dan Jacobson
2002-10-18  8:17 ` Man-follow-manual-reference and non-() references Dan Jacobson
  -- strict thread matches above, loose matches on Subject: below --
2002-10-16 14:40 man page prompter thinks "|" is legitimate David R. Linn
2002-10-17 23:51 ` Dan Jacobson
2002-10-19  2:41 ` Francesco Potorti`

Code repositories for project(s) associated with this public inbox

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

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