help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

buffer completion methods in iswitchb and similar packages


From: Mathias Dahl
Subject: buffer completion methods in iswitchb and similar packages
Date: 06 Sep 2004 20:07:04 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Today I have been implementing a iswitchb-like completion method in a
project of mine (non-emacs related) and after implementing
"prefix-completion" and "substring-completion" I came up with another
version, which looks like this (in some kind of pseudo-code):

match("vx",  "view external") => match
match("xv",  "view external") => no match
match("xt",  "view external") => match
match("xt",  "view external") => match

Currently I call this "character-matching" in search for a better
name. Each character in the search is tested against each available
string to search in, and for each hit the user-entered string gets,
the test position is moved forward to where the hit was found (this is
the reason "xv" above does not match).

I found this behavior quite useful in the case where two (or more)
strings that are very similar (for example "view document internally"
and "view document externally") matches the string I enter and when
the piece of the string that differs matches other strings (print
document externally), thus ruling out substring matching (well, maybe
not ruling out, but the match will not be unique).

Now to my question: does this exist in iswitchb or any of the other
completion-enhancements in Emacs? And yes, I know that it is possible
to cycle the matched buffer names in emacs if there were to be more
than one.

/Mathias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]