GNU bug report logs -
#13687
24.3.50; `read-regexp' should provide regex for symbol at point as defaults
Previous Next
Reported by: Jambunathan K <kjambunathan <at> gmail.com>
Date: Mon, 11 Feb 2013 06:30:02 UTC
Severity: wishlist
Found in version 24.3.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Let the command decide its own defaulting. Individual commands that read the
> minibuffer should control such defaulting, at the point of call.
Since when the command commands the user, and not other way round?
> They can rely on user options if they want to. But a single user option for
> this kind of thing, and especially if it somehow takes control of defaulting
> away from the caller (command), is a bad idea.
Perhaps you missed the whole thread, but see what the users are forced to use
http://stackoverflow.com/questions/15161592/make-emacs-rgrep-default-to-last-search-term-rather-than-word-at-point
in the absence of customizable options.
> FWIW, in my code I do something that I'm guessing might be similar to the
> _effect_ you want, but I stay completely away from command lookup/dispatching.
There is no command lookup/dispatching since Jambunathan implements
the third variant, and not the second cited above.
> I have a user option, `search/replace-default-fn', whose value (a function)
> provides the default value(s) for functions `query-replace', `occur',
> `how-many', `flush-lines',...
Your `search/replace-default-fn' is exactly the same thing as
`occur-read-regexp-defaults-function', so why do you object?
This bug report was last modified 12 years and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.