From shigio@tamacom.com  Sat Dec  8 19:53:41 2001
Return-Path: <shigio@tamacom.com>
Received: from t-mta2.odn.ne.jp (mfep2.odn.ne.jp [143.90.131.180])
	by hub.freebsd.org (Postfix) with ESMTP id 61D1037B419
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  8 Dec 2001 19:53:40 -0800 (PST)
Received: from choota.signet.or.jp ([61.209.170.140]) by t-mta2.odn.ne.jp
          with ESMTP
          id <20011209035339402.DUKM.1902.t-mta2.odn.ne.jp@mta2.odn.ne.jp>
          for <FreeBSD-gnats-submit@freebsd.org>;
          Sun, 9 Dec 2001 12:53:39 +0900
Received: (from shigio@localhost) by choota.signet.or.jp (8.11.3/) id fB93pqo00851; Sun, 9 Dec 2001 12:51:52 +0900 (JST)
Message-Id: <200112090351.fB93pqo00851@tamacom.com>
Date: Sun, 9 Dec 2001 12:51:52 +0900 (JST)
From: shigio@tamacom.com
Reply-To: shigio@tamacom.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Improved less powered by GLOBAL.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32636
>Category:       bin
>Synopsis:       Improved less powered by GLOBAL.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ps
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 08 20:00:02 PST 2001
>Closed-Date:    Mon Jan 7 13:07:23 PST 2002
>Last-Modified:  Mon Jan 07 13:07:46 PST 2002
>Originator:     Shigio Yamaguchi
>Release:        FreeBSD 4.3-RELEASE i386
>Organization:
Tama Communications Corporation
>Environment:
System: FreeBSD choota.signet.or.jp 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Thu Jul 5 11:01:05 JST 2001 shigio@choota.signet.or.jp:/usr/src/sys/compile/GENERIC i386


>Description:

I have made a patch for less-358. It support following facilities:

o Support multi tag

  Improved less supports following tag files:
	Traditional tags by ctags.
	Extended tags by Exuberant Ctags <http://ctags.sourceforge.net>
	GLOBAL's tag by global.
	Ctags -x format from stdin.

  User can specify tag file by the -T option.
  By default, Tag file name is "tags". But if the file is not found
  then new less use GTAGS.

	% ls tags
	tags
	% less -t main			-- tag file is 'tags' (default)

	% less -TGTAGS -t main		-- use GTAGS

	% ctags -x *.c | less -T-	-- use ctags -x format from stdin

	% ls tags
	ls: tags: No such file or directory
	% less -t main			-- use GTAGS

  About GLOBAL's tag, GTAGS, GRTAGS, GSYMS and GPATH are available as tag
  file name. User must not specify the path (GLOBAL locate the path instead
  of you.)

  About ctags -x format, both of standard and extended format are supported.

	[standard format]
	<tag>   <lineno>  <file>         <image>
	+------------------------------------------------
	|main     30      main.c         main(argc, argv)
	|func     21      subr.c         func(arg)

	The following commands write this format.
	   o Traditinal Ctags with -x option
	   o Global with -x option

	[extended format]
	<tag>   <type>  <lineno>   <file>        <image>
	+----------------------------------------------------------
	|main     function 30      main.c         main(argc, argv)
	|func     function 21      subr.c         func(arg)

	Exuberant Ctags with -x option write this format.
	See <http://ctags.sourceforge.net>

  Following usages are available with this facility.

        % global -xg 'lseek(.*)' | less -T-	# grep(1) needed.
        % global -xI func | less -T-		# id-utils(1) needed.
        % ctags -x func | less -T-


o Support duplicated tag

  Improved less also supports duplicated tag entries.
  This facility is supported in all tag files. In traditional tag file,
  it is treated special case that tag is only one.

  At first, less shows the first tag. User can move to the next or previous
  entry by 't'(next) and 'T'(previous) command.

        't'             go to the next entry
        'T'             go to the previous entry

o Rare case spec

  If user invoke examin command while tag structure loaded,
  less cleanup tag structure leaving ifile structure.

	(1)
	% less -t main
	...
	[lessecho.c (tag 1 of 4)]	<- 4 tags found.
					   currently lessecho.c loaded.

	(2)
	Examine: edit.c			<- examine 'edit.c'

	(3)
	...
	[edit.c (file 2 of 2)]		<- insert edit.c in ifile structure.

	(4)
	t				<- go to next tag
	[No next tag  (press RETURN)]	<- no tag structure

  If user use stdin as tag file (by -T- option) and invoke ':t' command
  in less then less use default tag file, that is, 'tags'.

>How-To-Repeat:
	N/A
>Fix:

	Above patch is available at:

	http://www.tamacom.com/unix/less-358+gtags.tar.gz


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Mon Dec 10 03:29:13 PST 2001 
State-Changed-Why:  
The less supplied with FreeBSD is GNU less, and is maintained outside the  
FreeBSD src tree (which is why it's in src/contrib). 

Please liase with the GNU less maintainer to arrange for your patches to 
be incorporated into the vendor distribution so that we  can pick up 
the changes the next time we update the version in src/contrib/less. 

More information on contactin the vendor: 

http://www.greenwoodsoftware.com/less/ 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32636 

From: "Shigio Yamaguchi" <shigio@tamacom.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc: shigio@tamacom.com
Subject: Re: bin/32636: Improved less powered by GLOBAL.
Date: Sat, 29 Dec 2001 21:37:41 +0900

 Hi,
 > Please liase with the GNU less maintainer to arrange for your patches to 
 >       be incorporated into the vendor distribution so that we  can pick up 
 >       the changes the next time we update the version in src/contrib/less. 
 
 Thank you for your advice.
 
 Now, less-371, which includes my patch, is available.
 Please see:
 http://www.greenwoodsoftware.com/less/ 
 
 Thanks.
 --
 Shigio Yamaguchi - Tama Communications Corporation
 
State-Changed-From-To: closed->open 
State-Changed-By: sheldonh 
State-Changed-When: Sat Dec 29 15:45:39 PST 2001 
State-Changed-Why:  
Patches incorporated into distribution, new version available. 


Responsible-Changed-From-To: freebsd-bugs->ps 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Sat Dec 29 15:45:39 PST 2001 
Responsible-Changed-Why:  
Paul maintains contrib/less 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32636 
State-Changed-From-To: open->closed 
State-Changed-By: ps 
State-Changed-When: Mon Jan 7 13:07:23 PST 2002 
State-Changed-Why:  
its in -current now.  will MFC in a few weeks 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32636 
>Unformatted:
