t.link Software Links

XFF -- extended find-file

Description
Known Problems
Download
Version history

Description

This package extends `find-file' with some special syntax of the form:

	file*keyword1=arg1*keyword2=arg2
	file*keyword1=arg1*keyword2:rest

A split char in the file name has to be escaped with a backslash.

At the moment the following keywords are defined (see `xff-commands'):

line=LINE
goto line
char=CHAR
goto char
find=TEXT or rather find:SOME TEXT
find text
select=BEG-END
select/mark the region from BEG to END

Installation: Put (require 'xff) (xff-install) into your init file (~/.xemacs/init.el or ~/.emacs.el).

Original Syntax

The original syntax can still be enabled setting `xff-mode' to 'original, though it is not recommended to change this variable:

	file?keyword1=arg1&keyword2=arg2&...
	file?keyword1=arg1&keyword2:rest

The REST argument may contain any characters, incl. '&'.

Examples:

	(find-file "~/.bashrc?line=10")
	(find-file "~/.bashrc?char=10")
	(find-file "~/.bashrc?select=10-20")
	(find-file "~/.bashrc?find=TEXINPUTS")

or from the command line:

	editclient.sh ~/.bashrc?find=TEXINPUTS

Simplified Syntax

Basically the same as the original syntax, except that the split-string and the next-string are asterisks. An asterisk in the filename has to be escaped by prepending "\".

	file*keyword1=arg1*keyword2=arg2
	file*keyword1=arg1*keyword2:rest

Known Problems

Download

Requirements: tellib

v 1.4: xff.el.gz

All elisp files on this site: tellib.tar.gz

Version history

1.4
view command (open a file as "file*view=1" to show it in `view-mode')
1.3
Removed revised syntax; bugfix (interactiv use)
1.2
Revised syntax (following a proposal by D. Goel aka deego AT glue umd edu); check if we are dealing with a xff argument first; simplified original syntax (new default mode); works with gnuserv.
1.1
Initial release (tested with XEmacs 21.4.8)


(c) 2003 Thomas Link (last updated Aug 30 2003) home top