Using the TAGS facility in Emacs for R/S functions

Jeff Mincy jeff at
Mon Jan 28 01:36:49 CET 2002

On Sun, 27 Jan 2002, rmh at wrote:

> is your proposal intended to replace Lubinksy-S-tags or to modify
> it?
> Rich

The Lubinsky-S-tags should be removed and users should be pointed to
either ctags or some other tags program.  ctags is better than other
tags programs (including the one that comes with emacs/xemacs).  But,
tags can be generated with any tags program that supports --regex.
The regex for ctags is shown below.  Here is copy of email that I sent

Note, ctags can only support splus definitions that are on a single
line.  It can not currently handle multiple line definitions like

foofoo <-
## The foofoo function ...
function ( ... )


>From jeff Thu Jul 19 22:27:59 2001
Date: Thu, 19 Jul 01 22:27:59 EDT
From: Jeff Mincy <jeff at>
To: ess-bugs at
Subject: ess-mode 5.1.18; tags

I noticed that some attempt at doing tags is included in ess
under ess-5.1.18/etc/other/Tags/Lubinsky-S-tags

The ctags/etags at:

     The official Exuberant Ctags web site at:

can be coaxed into doing tags:

--regex-Splus=/^[ \t]*([^ \t<]+)[ \t]*<-[ \t\n\r]*function/\1/

bash% etags 
RECURSING into directory "."
OPENING base.s as S language file

When using xemacs, you would need to add the appropriate tag file to

  (setq-default tag-table-alist
         #'(lambda (x) (and (cdr x) (file-exists-p (cdr x))))
         `(("\\.e\\(l\\|macs\\)\\'" . ,(concat "XEMACS-" emacs-program-version "_TAGS"))
           ("\\.[RSs]\\'" . "S_TAGS"))))


>From jeff Fri Jul 20 09:56:44 2001
From: Jeff Mincy <jeff at>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <15192.14492.890499.21990 at>
Date: Fri, 20 Jul 2001 09:56:44 -0400
To: rossini at
Subject: Re: ess-mode 5.1.18; tags
In-Reply-To: <87lmlkz0tv.fsf at>
References: <20010720022759.17366.qmail at>
	<87u208z35m.fsf at>
	<15191.44787.957657.681954 at>
	<87lmlkz0tv.fsf at>
X-Mailer: VM 6.92 under 21.1 (patch 11) "Carlsbad Caverns" XEmacs Lucid

   From: rossini at (A.J. Rossini)
   Date: 19 Jul 2001 21:22:36 -0700
   >>>>> "JM" == Jeff Mincy <jeff at> writes:
       JM>    From: rossini at (A.J. Rossini) Date: 19 Jul
       JM> 2001 20:32:21 -0700
       JM>    Thanks, Jeff, for the suggestions.  We'll try to implement
       JM> (we are supposed to be heading towards a stable 5.2 release,
       JM> but...).
       JM> The tags suggestion was more of a documentation thing.  (I
       JM> didn't make that particularly clear)
   Well, we also can run it as part of a "regenerate tags" style script,
   or at least include a script that people can use.
Yep.  You could also put a link to the tags sourceforge web site so
people can download etags.


Note: The tags suggestion was more of a documentation thing.
(I didn't make that particularly clear)
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at

More information about the ESS-help mailing list