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

[jasspa] numbering and bulletting III.

Expand Messages
  • Detlef Groth
    Hello all, hello Thomas, Finally an version for bulleting and numbering which is osd-driven, hope this helps enough. Be aware of the 30 line limit. ;
    Message 1 of 1 , Nov 1, 1999
    • 0 Attachment
      Hello all,

      hello Thomas,

      Finally an version for bulleting and numbering which is osd-driven, hope this helps enough. Be aware of the 30 line limit.

      ; Numbering macros and OSD
      ;
      ; Last Modified : <991026.0418>
      ;
      ; Author: Detlef Groth
      ;

      ; setting up the OSD
      set-variable .osd.numbers &pinc .osd.next 1

      ;; This macro recalculates the right numbering

      define-macro change-numbers-renumber
      change-numbers-to-bullets-1
      change-bullets-to-numbers
      !emacro

      ;; change numbers to the `*' bullet
      define-macro change-numbers-to-bullets-1
      ; set-variable $debug 1
      set-alpha-mark "P"
      -30 replace-string "^1." "* "
      -30 replace-string "^2." "* "
      -30 replace-string "^3." "* "
      -30 replace-string "^4." "* "
      -30 replace-string "^5." "* "
      -30 replace-string "^6." "* "
      -30 replace-string "^7." "* "
      -30 replace-string "^8." "* "
      -30 replace-string "^9." "* "
      goto-alpha-mark "P"
      !emacro

      ;; change numbers to the `•' bullet
      define-macro change-numbers-to-bullets-2
      ; set-variable $debug 1
      set-alpha-mark "P"
      -30 replace-string "^1." "• "
      -30 replace-string "^2." "• "
      -30 replace-string "^3." "• "
      -30 replace-string "^4." "• "
      -30 replace-string "^5." "• "
      -30 replace-string "^6." "• "
      -30 replace-string "^7." "• "
      -30 replace-string "^8." "• "
      -30 replace-string "^9." "• "
      goto-alpha-mark "P"
      !emacro

      ;; changes any bullet back to numbers

      define-macro change-bullets-to-numbers
      ; set-variable $debug 1
      set-alpha-mark "P"
      1 replace-string "^. " "1. "
      1 replace-string "^. " "2. "
      1 replace-string "^. " "3. "
      1 replace-string "^. " "4. "
      1 replace-string "^. " "5. "
      1 replace-string "^. " "6. "
      1 replace-string "^. " "7. "
      1 replace-string "^. " "8. "
      1 replace-string "^. " "9. "
      goto-alpha-mark "P"
      !emacro

      ;; the user can choose between *, +, #, o, • and >
      define-macro user-specific
      set-variable .bull @mc1 "Which bullet ? " "*+#o•>" "*"
      set-alpha-mark "P"
      -30 replace-string "^.." &cat .bull " "
      goto-alpha-mark "P"
      !emacro


      osd .osd.numbers 0 "b"
      osd .osd.numbers 10 "" "&renumber" f change-numbers-renumber
      osd .osd.numbers 20 "" "&bullets-to-numbers" f change-bullets-to-numbers
      osd .osd.numbers 30 "" "&numbers-to-bullets *" f change-numbers-to-bullets-1
      osd .osd.numbers 40 "" "n&umbers-to-bullets •" f change-numbers-to-bullets-2
      osd .osd.numbers 50 "" "&user-specific-bullets" f user-specific

      define-macro numbers-popup
      ; redefine the position to be next to the cursor
      osd .osd.numbers 0 "ba" &add $cursor-x 1 &sub $cursor-y 1
      .osd.numbers osd
      !emacro

      global-bind-key numbers-popup "A-2"

      ; END OF FILE

      I think this is the last version....

      best regards,
      Happy bulleting ...
      Detlef
    Your message has been successfully submitted and would be delivered to recipients shortly.