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

One More Time...

Expand Messages
  • Gadrin
    the new install added a few new things... I included your shove-back shove-over macros in my Owner.emf, but they don t seem to work, either by calling them by
    Message 1 of 7 , Sep 17, 2005
    • 0 Attachment
      the new install added a few new things...

      I included your

      shove-back
      shove-over

      macros in my Owner.emf, but they don't seem to work, either by
      calling them by name or the C-x --> C-x <-- key combos. I tried
      executing the file separately, then executing the buffer then
      calling them but nothing happens. I did create a region (it's high-
      lighted) and tried both ways. The hilight disappears but the text
      doesn't budge (yes I indented some lines and not others within the
      region).

      I also tried it with USER SETUP --> STARTUP --> MS SHIFT REGION
      (checked) but nothing.

      Is there a buffer mode that must be set with it ?

      I take it these macros function similar to other Windows programs
      where you hilight a section of text and it adds/removes tabs from
      the start of the line(s), which is something very useful.
    • Thomas Hundt
      I m the one who wrote these... I have them bound to C-x C-i and C-x C-u. I can t tell without you pasting your code here what you re doing. Are you sure this
      Message 2 of 7 , Sep 17, 2005
      • 0 Attachment
        I'm the one who wrote these...

        I have them bound to C-x C-i and C-x C-u. I can't tell without you
        pasting your code here what you're doing.

        Are you sure this owner.emf is being run? Perhaps you have another
        owner.emf in another directory? (company vs macros directory). When
        you say "nothing happens" do you mean it gives an error, or does seem to
        execute but does nothing?

        Here is the code I'm current using (there's also a separate
        shove-over-region posted by Jon). I have this in my company file
        (mycompanyname.emf).

        ;------------------------------------------------------------
        ; shove-over
        ;------------------------------------------------------------
        define-macro shove-over
        !while &gre &pdec @# 1 0 ; C-u prefix support
        beginning-of-line
        insert-string " "
        forward-line
        beginning-of-line
        !done
        !emacro
        global-bind-key shove-over "C-x C-i"
        global-bind-key shove-over "C-x tab" ; for non-gui unix

        As you can see, this code is totally trivial and primitive.
        If it still doesn't work for you, you can try
        1. setting $debug to 1 and trying it
        2. executing each of the commands in sequence and see what happens


        -Th


        Gadrin wrote:
        > the new install added a few new things...
        >
        > I included your
        >
        > shove-back
        > shove-over
        >
        > macros in my Owner.emf, but they don't seem to work, either by
        > calling them by name or the C-x --> C-x <-- key combos. I tried
        > executing the file separately, then executing the buffer then
        > calling them but nothing happens. I did create a region (it's high-
        > lighted) and tried both ways. The hilight disappears but the text
        > doesn't budge (yes I indented some lines and not others within the
        > region).
        >
        > I also tried it with USER SETUP --> STARTUP --> MS SHIFT REGION
        > (checked) but nothing.
        >
        > Is there a buffer mode that must be set with it ?
        >
        > I take it these macros function similar to other Windows programs
        > where you hilight a section of text and it adds/removes tabs from
        > the start of the line(s), which is something very useful.
        >
      • Gadrin
        originally from: C: Program Files JASSPA MicroEmacs contrib user.emf both are roughly 80 lines of macro code each. I cut & pasted them into my Owner.emf file.
        Message 3 of 7 , Sep 17, 2005
        • 0 Attachment
          originally from:
          C:\Program Files\JASSPA\MicroEmacs\contrib\user.emf

          both are roughly 80 lines of macro code each.

          I cut & pasted them into my Owner.emf file. I know it's executed
          because my keyboard bindings are working. I also tried executing the
          user.emf file separately, then the keystrokes/macro names, but
          nothing happens.

          ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
          ;;;;;;;;
          ; Macro to increase 'n' lines by a tab stop. If a region is
          hilighted then
          ; the whole region is shoved back by a tab stop. If there is no
          region, or a
          ; numeric argument is specified then 'n' lines are indented by a tab
          stop.

          define-macro shove-back
          ...
          !emacro
          global-bind-key shove-back "C-x left"

          ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
          ;;;;;;;;
          ; Macro to decrease 'n' lines by a tab stop. If a region is
          hilighted then
          ; the whole region is indented back by a tab stop. If there is no
          region, or
          ; a numeric argument is specified then 'n' lines are indented by a
          tab stop.

          define-macro shove-over
          ...
          !emacro
          global-bind-key shove-over "C-x right"


          I'll give yours a try though.

          --- In jasspa@yahoogroups.com, Thomas Hundt <thundt@s...> wrote:
          > I'm the one who wrote these...
          >
          > I have them bound to C-x C-i and C-x C-u. I can't tell without
          you
          > pasting your code here what you're doing.
          >
          > Are you sure this owner.emf is being run? Perhaps you have
          another
          > owner.emf in another directory? (company vs macros directory).
          When
          > you say "nothing happens" do you mean it gives an error, or does
          seem to
          > execute but does nothing?
          >
          > Here is the code I'm current using (there's also a separate
          > shove-over-region posted by Jon). I have this in my company file
          > (mycompanyname.emf).
          >
          > ;------------------------------------------------------------
          > ; shove-over
          > ;------------------------------------------------------------
          > define-macro shove-over
          > !while &gre &pdec @# 1 0 ; C-u prefix support
          > beginning-of-line
          > insert-string " "
          > forward-line
          > beginning-of-line
          > !done
          > !emacro
          > global-bind-key shove-over "C-x C-i"
          > global-bind-key shove-over "C-x tab" ; for non-gui unix
          >
          > As you can see, this code is totally trivial and primitive.
          > If it still doesn't work for you, you can try
          > 1. setting $debug to 1 and trying it
          > 2. executing each of the commands in sequence and see what happens
          >
          >
          > -Th
        • Gadrin
          Thanks for your help Thomas, you solved it. Setting $debug was another question i was going to get around to, but you solved two with one post. while debugging
          Message 4 of 7 , Sep 17, 2005
          • 0 Attachment
            Thanks for your help Thomas, you solved it. Setting $debug was
            another question i was going to get around to, but you solved two
            with one post.

            while debugging the User.emf file, I set $debug to 1 and executed
            the macros. All the statements seemed to be executed, including...

            $tabsize insert-string " "

            After aborting and checking the variables, I found that $tabsize was
            never defined.

            but...

            $tab-width .................... "8"

            was, so I simply

            set-variable $tabsize $tab-width

            and now it's working. It's a minor bug but probably needs to be
            addressed. Either remove $tabsize altogether or set it like I have.

            Thanks for the $debug, I'm reaching the point in scripting macros
            where I'm going to need it, since using !abort is too slow ;)
          • Thomas Hundt
            Oh, right. $tabsize is my own personal tab width. I m sure Jon s is better code, so you re probably better off if you can make his version work. Something
            Message 5 of 7 , Sep 17, 2005
            • 0 Attachment
              Oh, right. $tabsize is my own personal tab width. I'm sure Jon's is
              better code, so you're probably better off if you can make his version work.

              Something about $debug, I set it to 1 in my company file, that value
              means "complain about unhandled errors only". Probably you should do
              that, too.

              -Th




              Gadrin wrote:
              > Thanks for your help Thomas, you solved it. Setting $debug was
              > another question i was going to get around to, but you solved two
              > with one post.
              >
              > while debugging the User.emf file, I set $debug to 1 and executed
              > the macros. All the statements seemed to be executed, including...
              >
              > $tabsize insert-string " "
              >
              > After aborting and checking the variables, I found that $tabsize was
              > never defined.
              >
              > but...
              >
              > $tab-width .................... "8"
              >
              > was, so I simply
              >
              > set-variable $tabsize $tab-width
              >
              > and now it's working. It's a minor bug but probably needs to be
              > addressed. Either remove $tabsize altogether or set it like I have.
              >
              > Thanks for the $debug, I'm reaching the point in scripting macros
              > where I'm going to need it, since using !abort is too slow ;)
              >
            • Phillips, Steven
              The $debug setting has only recently changed; this referenced setting of 1 is only available in the development build. If set to 1 in the last release the user
              Message 6 of 7 , Sep 18, 2005
              • 0 Attachment
                The $debug setting has only recently changed; this referenced setting of
                1 is only available in the development build. If set to 1 in the last
                release the user is prompted before executing each line of macro code.

                Steve

                > -----Original Message-----
                > From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com] On Behalf
                Of
                > Thomas Hundt
                > Sent: Sunday, September 18, 2005 4:00 AM
                > To: jasspa@yahoogroups.com
                > Subject: Re: [jasspa] Shove-over, Shove-back Fixed
                >
                > Oh, right. $tabsize is my own personal tab width. I'm sure Jon's is
                > better code, so you're probably better off if you can make his version
                > work.
                >
                > Something about $debug, I set it to 1 in my company file, that value
                > means "complain about unhandled errors only". Probably you should do
                > that, too.
                >
                > -Th
                >
                >
                >
                >
                > Gadrin wrote:
                > > Thanks for your help Thomas, you solved it. Setting $debug was
                > > another question i was going to get around to, but you solved two
                > > with one post.
                > >
                > > while debugging the User.emf file, I set $debug to 1 and executed
                > > the macros. All the statements seemed to be executed, including...
                > >
                > > $tabsize insert-string " "
                > >
                > > After aborting and checking the variables, I found that $tabsize was
                > > never defined.
                > >
                > > but...
                > >
                > > $tab-width .................... "8"
                > >
                > > was, so I simply
                > >
                > > set-variable $tabsize $tab-width
                > >
                > > and now it's working. It's a minor bug but probably needs to be
                > > addressed. Either remove $tabsize altogether or set it like I have.
                > >
                > > Thanks for the $debug, I'm reaching the point in scripting macros
                > > where I'm going to need it, since using !abort is too slow ;)
                > >
                >
                >
                > ------------------------ Yahoo! Groups Sponsor
                >
                >
                ________________________________________________________________________
                __
                >
                > 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
                >
                >
                >
                >
              • Gadrin
                which is what I have and is fine, that way I can tell which lines are getting executed, and have it act on either the entire macro or a subset of it. ... of
                Message 7 of 7 , Sep 19, 2005
                • 0 Attachment
                  which is what I have and is fine, that way I can tell which lines are
                  getting executed, and have it act on either the entire macro or a
                  subset of it.

                  --- In jasspa@yahoogroups.com, "Phillips, Steven" <sphillips@p...>
                  wrote:
                  > The $debug setting has only recently changed; this referenced setting
                  of
                  > 1 is only available in the development build. If set to 1 in the last
                  > release the user is prompted before executing each line of macro code.
                  >
                  > Steve
                  >
                Your message has been successfully submitted and would be delivered to recipients shortly.