Loading ...
Sorry, an error occurred while loading the content.

Re: [jasspa] global-bind-key

Expand Messages
  • Rick Owen
    Jon, Thanks for the help. The macros are starting to make sense to me and I hope I won t have to keep asking for help for too much longer. Thanks, Rick. ...
    Message 1 of 3 , Aug 30, 2006
    • 0 Attachment
      Jon,

      Thanks for the help.  The macros are starting to make sense to me and I hope I won't have to keep asking for help for too much longer.

      Thanks,
      Rick.
       



      ----- Original Message ----
      From: Jon Green <jon@...>
      To: jasspa@yahoogroups.com
      Sent: Wednesday, August 30, 2006 2:09:29 PM
      Subject: Re: [jasspa] global-bind-key

      Rick Owen wrote:

      > Greetings,
      >
      > 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"
      >
      >
      > Thanks,
      > Rick.

      Follows are some options, not sure exactly what kind of search you are
      looking for.

      Regards
      Jon.

      ; 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.
      define-macro my-search-forward
      ; Lets say we want case insensitive and no magic, forwards direction.
      !force search-buffer "EM" @ml05 "Search"
      !if &not $status
      ml-write "[Not Found]"
      !endif
      !emacro
      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"


    Your message has been successfully submitted and would be delivered to recipients shortly.