From xemacs-m  Tue Jan 28 11:53:09 1997
Received: from icemark.thenet.ch (root@icemark.TheNet.CH [193.135.252.47])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id LAA25865 for <xemacs-beta@xemacs.org>; Tue, 28 Jan 1997 11:52:41 -0600 (CST)
Received: from localhost by icemark.thenet.ch
	 with smtp id m0vpHhb-0003jAC
	(Debian Smail-3.2 1996-Jul-4 #2); Tue, 28 Jan 1997 18:52:11 +0100 (MET)
Date: Tue, 28 Jan 1997 18:52:11 +0100 (MET)
From: Benedikt Eric Heinen <beh@icemark.thenet.ch>
To: XEmacs Beta mailing list <xemacs-beta@xemacs.org>
Subject: extending file-completion?
Message-ID: <Pine.LNX.3.95.970128174327.16762H-100000@icemark.thenet.ch>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


Hi there,

   [I hope I can properly explain, what I'd like to see... Please bear
    with the fact, that English is NOT my native language - if something
    is unclear, please try and explain to me *which* part is unclear and
    which part you understand].

   filename completion in xemacs supports ignoring files with certain
extensions, but I can't find the 'opposite' feature. Is their a way to
extend file completion to also contain:

  a)   preferred-extensions ?
	- I'd like to supply a list of preferred extensions, xemacs will
          basically complete every file whose extension is not in the
          ignored-list, but if the extension contains only one file with
          one of the preferred extensions (and the names are exactly the
          same except for the extension), then it'll automatically 
          complete that file. Example:

		preferred extensions are:	.pc .sql .sh

		The following files are present:

			hello		hello.c		hello.pc

		When I enter 'hel' and then type complete, I'd like 
		xemacs to immediately complete to hello.pc

	  An extension to that could be, to also take into account
	  the order of the preferred extension list:

		preferred extensions are:	.pc .c .sql .sh

		The following files are present:

			hello		hello.c		hello.pc

		When I enter 'hel' and then type complete, I'd like 
		xemacs to immediately complete to hello.pc, ignoring
		hello.c since that is only the second extension in 
		the list.

	  This list should not contain 'exclusive' extensions, i.e. 
	  using the same preference list but the following files in 
	  the directory:
			hello		hello.c		hello.pc
			hello2.ext

		Here completing 'hel' should only complete through
		'hello' and then list all the above files in the
		completion list (not just the files from the 
		preference list).

  b)   RCS files and the completion.
	Imagine the following directory list:

		./	-->		hello		Makefile
		./RCS	-->		hello.c,v	Makefile,v

	If I do find-file and enter './hello.c', emacs will automatically
	extract latest RCS release from RCS/hello.c,v

	Still, if I do find-file, enter 'hel' and then complete, xemacs
	will complete hello (and not even list hello.c as an alternative).



From a look at the documentation, I am somewhat sure, that both things
aren't possible *YET*.  Personally I would *very much* like to see these
things, but I don't think I can develop those myself (as I do not
sufficiently well know the source and don't have the time to get into the
source deep enough), but I'd be interested to know whether someone else
would like to make the changes necessary, or whether there is enough
interest from other people as well?



  Benedikt

signoff
---
 Benedikt Eric Heinen  -  Muehlemattstrasse 53  -  CH3007 Bern  -   SWITZERLAND
                          email: beh@icemark.thenet.ch

