emacs-devel
[Top][All Lists]
Advanced

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

RE: new-flex-completion-style


From: Drew Adams
Subject: RE: new-flex-completion-style
Date: Thu, 14 Feb 2019 19:20:47 +0000 (UTC)

> > > Tho the equivalent regexp I'm using here is ".*a.*b.*c.*" not
> > > "a.*b.*c" as your page states.
> >
> > With Icicles regexp matching for completion you don't need the
> > initial `.*'.

And you don't need the final `.*', I should have added
(didn't notice it in your pattern).

It sounds like you're always trying to match all chars
in a line.  I'm not.  I'm not dealing with lines, in
general.  I'm matching a pattern against a string, in
general.
 
> Let me state it another way.  Does your system match "foo"
> to "barfoobaz" or does it fail?

It matches.

> If so, then I think your _equivalent_ regexp is probably .*f.*o.*o.*

(string-match-p "f.*o.*o" "barfoobaz") => 3

Scatter-matching is used with "apropos" completion.
It's just regexp completion, using the substituted
regexp.  Substituting regexp `f.*o.*o' for input
`foo' just does the above `string-match-p'.

> > I don't use any scoring for scatter matching.
> > Icicle users usually have a bunch of sort orders they can use
> 
> Right. Which one do you use, when you use scatter-matching?

Any of them.  Depends on what I'm doing and what I want.
Scatter-matching is typically not specific to particular
contexts, and thus to any context-specific sort orders.

Can you see that some of the following predefined orders
might be advantageous in particular contexts/use cases?
Can you see that whether matching is scatter, regexp,
basic prefix, or others, any of the following can be
useful?

(As I said, there are a couple of fuzzy-match methods
that impose their own sort order, but most do not.
Similarly, a few commands impose their own sort order -
they don't allow re-sorting.)

some of the Icicles sort orders that exist by default:

General:

 alphabetical
 case-insensitive
 by last use as input
 by previous use alphabetically

Color completion:

 by color name (colors)
 by hue (colors)
 by purity/saturation (colors)
 by brightness/value/luminance (colors)
 by all HSV components, in order (colors)
 by HSV distance from a base color (colors)
 by amount of red (colors)
 by amount of green (colors)
 by amount of blue (colors)
 by all RGB components, in order (colors)
 by RGB distance from a base color (colors)

Key completion:

 by key name, prefix keys first (keys)
 by key name, local bindings first (keys)

Command completion:

 by command name (commands)
 by abbrev frequency (commands)

Buffer-name completion:

 by buffer size (buffer names)
 *…* buffers last (buffer names)
 by major mode name (buffer names)
 by mode-line mode name (buffer names)
 by file/process name (buffer names)

File-name completion:

 by last file modification time (file names)
 by file type (extension) (file names)
 by directories first or last (file names)

Other:

 in book order (Info)
 special candidates first
 proxy candidates first
 extra candidates first
 by second multi-completion part (multi-completions)

 turned OFF (does not sort at all) 




reply via email to

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