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

[jasspa] More robust version of super-delete + insert-date

Expand Messages
  • Jon Green
    Follows is a more robust version of the macro super-delete. Problems were encountered with the existing macro when on the last line but 1 when it would tend to
    Message 1 of 3 , Sep 29, 1999
    • 0 Attachment
      Follows is a more robust version of the macro super-delete. Problems
      were encountered with the existing macro when on the last line but 1
      when it would tend to lock up.

      ;
      ;--- Macro to delete the whitespace, or if on a word all of the
      ; word until the next word is reached.
      define-macro super-delete
      set-variable #l0 0
      !while ¬ &sin @wc " \t\n"
      forward-char
      set-variable #l0 &add #l0 1
      !done
      !repeat
      !force forward-char
      !if $status
      set-variable #l0 &add #l0 1
      !endif
      !until &or &seq @wc "" ¬ &sin @wc " \t\n"
      #l0 backward-delete-char
      !return
      !emacro

      global-bind-key super-delete "C-delete"

      Another user macro which might be useful is "insert-date"
      This simply inserts the current date at the cursor position
      in much the same way as "insert-file-name" inserts the
      current filename.

      ; insert-date; Insert the current date into the text.
      define-macro insert-date
      ascii-time
      ; ascii-time returns a formatted string in #l9
      insert-string #l9
      !emacro

      Regards
      Jon.

      --
      ______________________________________________________________________

      Jon Green - jon@...
      ______________________________________________________________________
    • Detlef Groth
      Hello, ... Thu Sep 30 09:17:23 1999 Nice idea, but is a german-version also possible ? Donnerstag, den 30.9.1999 or simple 30.9.99. I was looking in the macro
      Message 2 of 3 , Sep 30, 1999
      • 0 Attachment
        Hello,
        >Another user macro which might be useful is "insert-date"
        >This simply inserts the current date at the cursor position
        >in much the same way as "insert-file-name" inserts the
        >current filename.
        >
        >; insert-date; Insert the current date into the text.
        >define-macro insert-date
        > ascii-time
        > ; ascii-time returns a formatted string in #l9
        > insert-string #l9
        >!emacro
        >
        >Regards
        >Jon.

        Thu Sep 30 09:17:23 1999
        Nice idea, but is a german-version also possible ?
        Donnerstag, den 30.9.1999
        or simple 30.9.99.
        I was looking in the macro
        ascii-time and trying something but Me was very stubborn...

        best regards,
        Detlef
      • Steven Phillips,,,
        All, I think I may be one step ahead on the date insertion issue. I ve added a Date & Time item to the main osd Insert menu and this gives you 10
        Message 3 of 3 , Sep 30, 1999
        • 0 Attachment
          All,

          I think I may be one step ahead on the date insertion issue. I've added a
          "Date & Time" item to the main osd Insert menu and this gives you 10 different
          formats to choose from. The function is American aware, i.e. the form is
          MM/DD/YY if your language is not American its DD/MM/YY etc. It also uses the
          Organizer to get the Month and Date names (Set in Organizer Setup page) so if
          you've setup up Organizer to use 'Donnerstag' then that what the insert date
          will use.

          This will be in the next release (which I keep on saying will be soon).
          Hopefully that will be sufficient for you all,

          Steve

          > Subject: [jasspa] Re: insert-date
          > From: Detlef Groth <dgroth@...>
          > Date: Thu, 30 Sep 1999 09:43:32 +0200
          > To: jasspa@egroups.com
          >
          > Hello,
          > >Another user macro which might be useful is "insert-date"
          > >This simply inserts the current date at the cursor position
          > >in much the same way as "insert-file-name" inserts the
          > >current filename.
          > >
          > >; insert-date; Insert the current date into the text.
          > >define-macro insert-date
          > > ascii-time
          > > ; ascii-time returns a formatted string in #l9
          > > insert-string #l9
          > >!emacro
          > >
          > >Regards
          > >Jon.
          >
          > Thu Sep 30 09:17:23 1999
          > Nice idea, but is a german-version also possible ?
          > Donnerstag, den 30.9.1999
          > or simple 30.9.99.
          > I was looking in the macro
          > ascii-time and trying something but Me was very stubborn...
          >
          > best regards,
          > Detlef
          >
          >
          > ------------------------------------------------------------------------
          > __________________________________________________________________________
          >
          > This is an unmoderated list. JASSPA is not responsible for the content of
          > any material posted to this list.
          >
          >
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.