[Top][All Lists]

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

bug#7567: Please add a history variable to read-regexp

From: Drew Adams
Subject: bug#7567: Please add a history variable to read-regexp
Date: Mon, 6 Dec 2010 16:31:12 -0800

> >> Why should that regexp be used to make buffer names? It is 
> >> probably a regexp that has been used for matching strings in buffers.
> >
> > Why is it "probably" that?
> >
> > I use regexps interactively all over the place.  Matching 
> > text in a buffer is only one use.
> Can you give examples of other interactive uses, please? That might
> make it easier to know what we are really talking about.

Use your imagination. But yes, of course anything _could_ be put in a buffer, so
conceivably any use of a regexp could involve matching some buffer's text...

What about the very functions you mentioned?  Why wouldn't regexps they read
also be useful in some buffer?  Or vice versa, why couldn't some buffer-text
regexp be useful for those functions?

Anyway, if you insist, here are a few examples: `icicle-customize-apropos':
Customize all user options matching REGEXP.  Likewise, customize faces and
groups.  Likewise Icicles apropos functions.  I even use it in the Icicles
version of `apropos-zippy' (but the vanilla version uses (interactive "s...")).
`icicle-find-tag': Navigate among all tags whose names match REGEXP.   I use it
for `icicle-keyword-list', which reads a list of keywords, each of which could
actually be a regexp.  I use it in `icicle-widen-candidates', which adds
completion candidates based on an alternative regexp.

And there are specialized vanilla regexp histories, such as

And you yourself mentioned matching a buffer name.  (I do that in
`icicle-add-buffer-config', for instance: buffer names to match for inclusion
and for exclusion as completion candidates.)

Now you can imagine lots of others, I think.  A regexp can be used anywhere, and
a function to read a regexp can be used in any regexp use case.

I guess what I'd really like to ask you is this: Please give a reason why
`read-regexp', which is extremely general, should _not_ use the general regexp
history variable.

reply via email to

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