Rick Owen wrote:
> I used global-bind- key to bind a key to search-buffer. That works fine
> except that with each invocation of the bound key I am prompted to enter
> "Search Flags:" and then the search string. Is there any way to pass
> arguments using global-bind- key other than the numeric argument shown in
> the example from the help file. If not, how would I write a macro that
> I could bind to a key that would ask for the search string and then call
> buffer-search with the default set of flags that I define?
> Example from help file:
> n global-bind- key "command" "key"
Follows are some options, not sure exactly what kind of search you are
; Example using search buffer. search-buffer is used for macro
; development invocation only and should be used wrapped in a
; macro. Note we have to test the exist status if we want to
; show a message when the search pattern is not found. Use @ml
; with the search history.
; Lets say we want case insensitive and no magic, forwards direction.
!force search-buffer "EM" @ml05 "Search"
!if ¬ $status
ml-write "[Not Found]"
global-bind- key my-search-forward "f9"
; Bind the isearch; isearch is best once you get used to it.
global-bind- key isearch-forward "S-f9"
; A regular search, honours the current exact+magic modes
global-bind- key search-forward "C-f9"