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

mewbie question: narrowing of the unknown

Expand Messages
  • Meino Christian Cramer
    Hi, again I step into my own trap, I fear. I am currently fighting with a version of a macro of region-replace-string. My setup: One me Two frames One frame
    Message 1 of 3 , Jul 1, 2005
    • 0 Attachment
      Hi,

      again I step into my own trap, I fear.

      I am currently fighting with a version of a macro of
      region-replace-string.

      My setup:

      One me
      Two frames
      One frame with a scratch buffer to write down the macro and "make
      it real" with execute-buffer
      The other frame with some lines of blabla fro testing.

      The macro so far:

      define-macro rreplace-string
      set-variable $stringa $ml "Replace:"
      set-variable $stringb $ml "With:"
      3 screen-update
      3 narrow-buffer
      begining of buffer
      replace-string $stringa $stringb
      1 narrow-buffer
      0 screen-upate
      !emacro


      I execute-buffer the buffer, C-x 5 o to the test-text-buffer, mark a
      region, A-x rreplace-string....and thats it. No one is asking me for
      a string or even for the current time...

      I cannot see the bug in it....could someone please give me a hint,
      what I am doing wrong here ???

      happy microemacsing!
      Meino
    • Thomas Hundt
      You want @ml, not $ml. $ means system variable % means user global variable # means register variable (which is probably what you should use) -- local to a
      Message 2 of 3 , Jul 1, 2005
      • 0 Attachment
        You want @ml, not $ml.

        $ means system variable
        % means user global variable
        # means register variable (which is probably what you should use) --
        local to a macro
        @ means "interactive" variable (more like a function)

        Read the help under "Macro-Dev" and the other links hanging off of that
        at the end.

        Also it's fun to grep through the macros directory and see how others
        have used various things.

        Have fun,

        -Th




        Meino Christian Cramer wrote:
        > define-macro rreplace-string
        > set-variable $stringa $ml "Replace:"
        > set-variable $stringb $ml "With:"
      • Meino Christian Cramer
        From: Thomas Hundt Subject: Re: [jasspa] mewbie question: narrowing of the unknown Date: Fri, 01 Jul 2005 11:46:23 -0700 Hi, yes, I did grep
        Message 3 of 3 , Jul 1, 2005
        • 0 Attachment
          From: Thomas Hundt <thundt@...>
          Subject: Re: [jasspa] mewbie question: narrowing of the unknown
          Date: Fri, 01 Jul 2005 11:46:23 -0700

          Hi,

          yes, I did grep through all this....I simply mistyped that
          variable.
          I _also_ want @ml....but my fingers... ;)

          Thanks for identifying the mistake I made...

          -mcc

          > You want @ml, not $ml.
          >
          > $ means system variable
          > % means user global variable
          > # means register variable (which is probably what you should use) --
          > local to a macro
          > @ means "interactive" variable (more like a function)
          >
          > Read the help under "Macro-Dev" and the other links hanging off of that
          > at the end.
          >
          > Also it's fun to grep through the macros directory and see how others
          > have used various things.
          >
          > Have fun,
          >
          > -Th
          >
          >
          >
          >
          > Meino Christian Cramer wrote:
          > > define-macro rreplace-string
          > > set-variable $stringa $ml "Replace:"
          > > set-variable $stringb $ml "With:"
          >
          >
          > __________________________________________________________________________
          >
          > This is an unmoderated list. JASSPA is not responsible for the content of
          > any material posted to this list.
          >
          > To unsubscribe, send a mail message to
          >
          > mailto:jasspa-unsubscribe@yahoogroups.com
          >
          > or visit http://groups.yahoo.com/group/jasspa and
          > modify your account settings manually.
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.