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

Re: [jasspa] improved buffer popup: ordered by file extension

Expand Messages
  • dgroth@gmx.de
    this works well, so I should build the menus on the fly using two nested while s (OK one while, one goto -- nested while s are in ME impossible - a pitty ...)
    Message 1 of 10 , Aug 9, 2001
    • 0 Attachment
      this works well,
      so I should build the menus on the fly using two nested while's
      (OK one while, one goto -- nested while's are in ME impossible - a
      pitty ...) getting the infos from the registry. After studying osd.emf
      this seems to be possible, however I am still confused by these #l0,
      #l1, #l2, etc vars. It's difficult to manage so it takes a little bit
      time to understand the code ...
      But what is @# ??? It is used a lot but not described in the docs.

      Detlef
      >
      >Attached is a fixed version, still a small problem which the automatic
      >opening of the sub-menus when you use the mouse to execute the command.
      >
      >Would be good if it used the Quick Open file type list - users could then
      >use user-setup to define there own list of buffer/file types.
      >
      >Steve
      >
      >> -----Original Message-----
      >> From: dgroth@... [mailto:dgroth@...]
      >> Sent: Wednesday, August 08, 2001 2:36 PM
      >> To: jasspa@yahoogroups.com
      >> Subject: [jasspa] improved buffer popup: ordered by file extension
      >>
      >>
      >> Hello,
      >>
      >> sometimes I have dozens of files open and with the ordinary buffer-menu,
      >> there are difficult to get. java-files are laying between makefiles,
      >> perl-files are laying between emf-files so I will order them.
      >>
      >> The following code still has one problem,
      >> I cant't find these *-files ....
      >> again this problem with the number of backslashes I tried from
      >> one to eight
      >> each number of backslashes but these star-files remains hidden ...
      >>
      >> try it with C-mouse-pick-1.
      >>
      >> In order to avoid bad wrapping: the file is attached.
      >>
      >> regards,
      >> Detlef
      >>
      <snip>
    • dgroth@gmx.de
      this works well, so I should build the menus on the fly using two nested while s (OK one while, one goto -- nested while s are in ME impossible - a pitty ...)
      Message 2 of 10 , Aug 9, 2001
      • 0 Attachment
        this works well,
        so I should build the menus on the fly using two nested while's
        (OK one while, one goto -- nested while's are in ME impossible - a
        pitty ...) getting the infos from the registry. After studying osd.emf
        this seems to be possible, however I am still confused by these #l0,
        #l1, #l2, etc vars. It's difficult to manage so it takes a little bit
        time to understand the code ...
        But what is @# ??? It is used a lot but not described in the docs.

        Detlef
        >
        >Attached is a fixed version, still a small problem which the automatic
        >opening of the sub-menus when you use the mouse to execute the command.
        >
        >Would be good if it used the Quick Open file type list - users could then
        >use user-setup to define there own list of buffer/file types.
        >
        >Steve
        >
        >> -----Original Message-----
        >> From: dgroth@... [mailto:dgroth@...]
        >> Sent: Wednesday, August 08, 2001 2:36 PM
        >> To: jasspa@yahoogroups.com
        >> Subject: [jasspa] improved buffer popup: ordered by file extension
        >>
        >>
        >> Hello,
        >>
        >> sometimes I have dozens of files open and with the ordinary buffer-menu,
        >> there are difficult to get. java-files are laying between makefiles,
        >> perl-files are laying between emf-files so I will order them.
        >>
        >> The following code still has one problem,
        >> I cant't find these *-files ....
        >> again this problem with the number of backslashes I tried from
        >> one to eight
        >> each number of backslashes but these star-files remains hidden ...
        >>
        >> try it with C-mouse-pick-1.
        >>
        >> In order to avoid bad wrapping: the file is attached.
        >>
        >> regards,
        >> Detlef
        >>
        <snip>
      • Steven Phillips
        I ve just noticed a bug in the documentation, @# is documented twice! Using the search in the OSD based help (Help - General Help) finds lots of docs and
        Message 3 of 10 , Aug 9, 2001
        • 0 Attachment
          I've just noticed a bug in the documentation, @# is documented twice! Using
          the search in the OSD based help (Help -> General Help) finds lots of docs
          and examples using it in a flash.

          Steve

          > -----Original Message-----
          > From: Jon Green [mailto:jnaught@...]
          > Sent: Thursday, August 09, 2001 6:04 PM
          > To: jasspa@yahoogroups.com
          > Subject: Re: [jasspa] improved buffer popup: ordered by file extension
          >
          >
          > @# is in the documentation @#(4).
          >
          > @# this is the numeric argument passed to the macro !!
          > @? the truth (i.e. was it specified) of the numeric argument.
          > @1..n are the command line arguments passed to the macro.
          > @0 is the name of the macro.
          >
          > The following are register variables #l0-9, #p0-9 #g0-9,
          > #lx is used most. We use these because they are cheap and
          > fast, the #px allows us to get/set arguments in the
          > parent (macro) context. #gx are global.
          >
          > Look under macro-dev for a description of these
          >
          > Regards
          > Jon.
          >
          > "dgroth@..." wrote:
          > >
          > > this works well,
          > > so I should build the menus on the fly using two nested while's
          > > (OK one while, one goto -- nested while's are in ME impossible - a
          > > pitty ...) getting the infos from the registry. After studying osd.emf
          > > this seems to be possible, however I am still confused by these #l0,
          > > #l1, #l2, etc vars. It's difficult to manage so it takes a little bit
          > > time to understand the code ...
          > > But what is @# ??? It is used a lot but not described in the docs.
          > >
          > > Detlef
          > > >
          > > >Attached is a fixed version, still a small problem which the
          > automatic
          > > >opening of the sub-menus when you use the mouse to execute
          > the command.
          > > >
          > > >Would be good if it used the Quick Open file type list -
          > users could then
          > > >use user-setup to define there own list of buffer/file types.
          > > >
          > > >Steve
          > > >
          > > >> -----Original Message-----
          > > >> From: dgroth@... [mailto:dgroth@...]
          > > >> Sent: Wednesday, August 08, 2001 2:36 PM
          > > >> To: jasspa@yahoogroups.com
          > > >> Subject: [jasspa] improved buffer popup: ordered by file extension
          > > >>
          > > >>
          > > >> Hello,
          > > >>
          > > >> sometimes I have dozens of files open and with the
          > ordinary buffer-menu,
          > > >> there are difficult to get. java-files are laying between
          > makefiles,
          > > >> perl-files are laying between emf-files so I will order them.
          > > >>
          > > >> The following code still has one problem,
          > > >> I cant't find these *-files ....
          > > >> again this problem with the number of backslashes I tried from
          > > >> one to eight
          > > >> each number of backslashes but these star-files remains hidden ...
          > > >>
          > > >> try it with C-mouse-pick-1.
          > > >>
          > > >> In order to avoid bad wrapping: the file is attached.
          > > >>
          > > >> regards,
          > > >> Detlef
          > > >>
          > > <snip>
          > >
          > >
          > >
          > __________________________________________________________________________
          > >
          > > This is an unmoderated list. JASSPA is not responsible for the
          > content of
          > >
          > > any material posted to this list.
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to
          http://docs.yahoo.com/info/terms/

          --
          ______________________________________________________________________

          Jon Green J.D.Naughton-Green
          Project Manager

          SAMSUNG Electronics (UK) Ltd
          Samsung Electronics Research Institute (Audio / Visual Labs)
          The Communication Centre
          South Street
          Staines Tel(direct): +44 (0)1784 428614
          MIDDLESEX Tel(s/w board): +44 (0)1784 428600 ext 614
          TW18 4QE Fax: +44 (0)1784 428620
          England Email (work): jon@...
          Email (home): jon@...
          _______________________________________________________________________


          __________________________________________________________________________



          This is an unmoderated list. JASSPA is not responsible for the content of

          any material posted to this list.




          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        • Jon Green
          @# is in the documentation @#(4). @# this is the numeric argument passed to the macro !! @? the truth (i.e. was it specified) of the numeric argument. @1..n
          Message 4 of 10 , Aug 9, 2001
          • 0 Attachment
            @# is in the documentation @#(4).

            @# this is the numeric argument passed to the macro !!
            @? the truth (i.e. was it specified) of the numeric argument.
            @1..n are the command line arguments passed to the macro.
            @0 is the name of the macro.

            The following are register variables #l0-9, #p0-9 #g0-9,
            #lx is used most. We use these because they are cheap and
            fast, the #px allows us to get/set arguments in the
            parent (macro) context. #gx are global.

            Look under macro-dev for a description of these

            Regards
            Jon.

            "dgroth@..." wrote:
            >
            > this works well,
            > so I should build the menus on the fly using two nested while's
            > (OK one while, one goto -- nested while's are in ME impossible - a
            > pitty ...) getting the infos from the registry. After studying osd.emf
            > this seems to be possible, however I am still confused by these #l0,
            > #l1, #l2, etc vars. It's difficult to manage so it takes a little bit
            > time to understand the code ...
            > But what is @# ??? It is used a lot but not described in the docs.
            >
            > Detlef
            > >
            > >Attached is a fixed version, still a small problem which the automatic
            > >opening of the sub-menus when you use the mouse to execute the command.
            > >
            > >Would be good if it used the Quick Open file type list - users could then
            > >use user-setup to define there own list of buffer/file types.
            > >
            > >Steve
            > >
            > >> -----Original Message-----
            > >> From: dgroth@... [mailto:dgroth@...]
            > >> Sent: Wednesday, August 08, 2001 2:36 PM
            > >> To: jasspa@yahoogroups.com
            > >> Subject: [jasspa] improved buffer popup: ordered by file extension
            > >>
            > >>
            > >> Hello,
            > >>
            > >> sometimes I have dozens of files open and with the ordinary buffer-menu,
            > >> there are difficult to get. java-files are laying between makefiles,
            > >> perl-files are laying between emf-files so I will order them.
            > >>
            > >> The following code still has one problem,
            > >> I cant't find these *-files ....
            > >> again this problem with the number of backslashes I tried from
            > >> one to eight
            > >> each number of backslashes but these star-files remains hidden ...
            > >>
            > >> try it with C-mouse-pick-1.
            > >>
            > >> In order to avoid bad wrapping: the file is attached.
            > >>
            > >> regards,
            > >> Detlef
            > >>
            > <snip>
            >
            >
            > __________________________________________________________________________
            >
            > This is an unmoderated list. JASSPA is not responsible for the content of
            >
            > any material posted to this list.
            >
            >
            >
            > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

            --
            ______________________________________________________________________

            Jon Green J.D.Naughton-Green
            Project Manager

            SAMSUNG Electronics (UK) Ltd
            Samsung Electronics Research Institute (Audio / Visual Labs)
            The Communication Centre
            South Street
            Staines Tel(direct): +44 (0)1784 428614
            MIDDLESEX Tel(s/w board): +44 (0)1784 428600 ext 614
            TW18 4QE Fax: +44 (0)1784 428620
            England Email (work): jon@...
            Email (home): jon@...
            _______________________________________________________________________
          • Jon Green
            Just installed this - it works very well - Thanks. I did change the binding from C-xxx-1 to C-xxxx-3 because I use the C-xxx-1 binding for folding/unfolding
            Message 5 of 10 , Aug 22, 2001
            • 0 Attachment
              Just installed this - it works very well - Thanks.

              I did change the binding from C-xxx-1 to C-xxxx-3
              because I use the C-xxx-1 binding for folding/unfolding
              operations (right button instead of left).

              I do like the fact that it does not immediately
              bring up the sub-menus. I currently have problems
              with the "Tools" pull down menu in 'C' because as you
              pass over "Tools->C tools" then you cannot get
              to the other entries. Thinking about it we ought
              to move this entry to tbe bottom of the pull down
              menu then it will not cause any problems.

              Regards
              Jon.

              "dgroth@..." wrote:
              >
              > hello,
              > So finally I got it working, here is the ordered buffer-popup using the
              > user registry. It is similar to the right-mouse-click quick open
              > function but only shows already opened buffers.
              >
              > This function emulates the gnu-emacs-lisp-function (msb.el,
              > about 1000 lines of elisp-code) in less than 100 lines of emf-code.
              > You can customize the file extensions via Help->User Setup->File types....
              >
              > OS tested: win2000, linux
              >
              > regards, Detlef
              >
            • dgroth@gmx.de
              hello, So finally I got it working, here is the ordered buffer-popup using the user registry. It is similar to the right-mouse-click quick open function but
              Message 6 of 10 , Aug 22, 2001
              • 0 Attachment
                hello,
                So finally I got it working, here is the ordered buffer-popup using the
                user registry. It is similar to the right-mouse-click quick open
                function but only shows already opened buffers.

                This function emulates the gnu-emacs-lisp-function (msb.el,
                about 1000 lines of elisp-code) in less than 100 lines of emf-code.
                You can customize the file extensions via Help->User Setup->File types....

                OS tested: win2000, linux

                regards, Detlef


                add in your <user>.emf
                define-macro-file dgbuffer dg-buffer-popup
                global-bind-key "dg-buffer-popup" "C-mouse-pick-1" ; like in gnu-emacs
                global-bind-key "dg-buffer-popup" "C-mouse-drop-1"

                ; dgbuffer.emf start
                define-macro dg-buffer-popup
                !if ¬ &exi .osd.dgroth-buffer
                set-variable .osd.dgroth-buffer &pinc .osd.next 1 ; buffer-main
                set-variable .osd.dgroth-buffer-starfiles &pinc .osd.next 1 ; buffer with *
                !endif
                osd .osd.dgroth-buffer 0 "b"
                osd .osd.dgroth-buffer 1 "Mde" "&*-files" .osd.dgroth-buffer-starfiles
                osd .osd.dgroth-buffer 2 "-"
                set-variable #l0 &cat ® "/history" "file-type" "\b" "All files\b"
                set-variable #l1 &cat ® "/history" "file-mask" "\b" ".*\b"
                set-variable :counter 1
                process-starfiles
                set-variable :osd-file-counter 11000
                !while ¬ &seq &lget #l0 :counter ""
                set-variable #l3 &lget #l0 :counter
                set-variable #l4 &lget #l1 :counter
                set-variable .osd.files :osd-file-counter
                osd .osd.dgroth-buffer &pinc :osd-file-counter 3 "Mde" #l3 .osd.files
                process-submenu #l3 #l4
                set-variable :counter &inc :counter 1
                !done
                .osd.dgroth-buffer osd 0 "ba" &add $cursor-x 1 &sub $cursor-y 1
                !emacro
                define-macro process-submenu
                set-variable :regex &cat &cat "," @2 ","
                !if ¬ &isin "All files" @1
                filemask-to-regex :regex
                !endif
                -1 osd .osd.files
                osd .osd.files 0 "b"
                set-variable :fileflag 0
                set-variable $buffer-names ".*"
                !while ¬ &seq &set #l0 $buffer-names ""
                ; a hack for 5 possible fileendings
                !if &xisequal #l0 &lget :regex 1
                set-variable :fileflag &inc :fileflag 1
                osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                !elif &xisequal #l0 &lget :regex 2
                ; 300 ml-write "something is equal"
                set-variable :fileflag &inc :fileflag 1
                osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                !elif &xisequal #l0 &lget :regex 3
                set-variable :fileflag &inc :fileflag 1
                osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                !elif &xisequal #l0 &lget :regex 4
                set-variable :fileflag &inc :fileflag 1
                osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                !elif &xisequal #l0 &lget :regex 5
                set-variable :fileflag &inc :fileflag 1
                osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                !endif
                !done
                !if &equ :fileflag 0
                osd .osd.files 1 "" "None found"
                !endif
                !emacro


                define-macro process-starfiles
                -1 osd .osd.dgroth-buffer-starfiles
                osd .osd.dgroth-buffer-starfiles 0 "b"
                set-variable :star-file 1
                set-variable $buffer-names ".*"
                !while ¬ &seq &set #l0 $buffer-names ""
                !if &seq &lef #l0 1 "*"
                set-variable :star-file &inc :star-file 1
                osd .osd.dgroth-buffer-starfiles :star-file "" #l0 f dg-buffer-osd-goto
                !endif
                !done
                !if &equ :star-file 1
                osd .osd.dgroth-buffer-starfiles 1 "" "None found"
                !endif
                !emacro
                0 define-macro dg-buffer-osd-goto
                find-buffer $result
                !emacro


                ; end dgbuffer.emf
                >
                >this works well,
                >so I should build the menus on the fly using two nested while's
                >(OK one while, one goto -- nested while's are in ME impossible - a
                >pitty ...) getting the infos from the registry. After studying osd.emf
                >this seems to be possible, however I am still confused by these #l0,
                >#l1, #l2, etc vars. It's difficult to manage so it takes a little bit
                >time to understand the code ...
                >But what is @# ??? It is used a lot but not described in the docs.
                >
                >Detlef
                <snip>

                --
                Dr. Detlef Groth
                Neue Scheune 5
                14548 Ferch
                Tel. 033209-80278
                e-mail: dgroth@...
              • dgroth@gmx.de
                hello, So finally I got it working, here is the ordered buffer-popup using the user registry. It is similar to the right-mouse-click quick open function but
                Message 7 of 10 , Aug 22, 2001
                • 0 Attachment
                  hello,
                  So finally I got it working, here is the ordered buffer-popup using the
                  user registry. It is similar to the right-mouse-click quick open
                  function but only shows already opened buffers.

                  This function emulates the gnu-emacs-lisp-function (msb.el,
                  about 1000 lines of elisp-code) in less than 100 lines of emf-code.
                  You can customize the file extensions via Help->User Setup->File types....

                  OS tested: win2000, linux

                  regards, Detlef


                  add in your <user>.emf
                  define-macro-file dgbuffer dg-buffer-popup
                  global-bind-key "dg-buffer-popup" "C-mouse-pick-1" ; like in gnu-emacs
                  global-bind-key "dg-buffer-popup" "C-mouse-drop-1"

                  ; dgbuffer.emf start
                  define-macro dg-buffer-popup
                  !if ¬ &exi .osd.dgroth-buffer
                  set-variable .osd.dgroth-buffer &pinc .osd.next 1 ; buffer-main
                  set-variable .osd.dgroth-buffer-starfiles &pinc .osd.next 1 ; buffer with *
                  !endif
                  osd .osd.dgroth-buffer 0 "b"
                  osd .osd.dgroth-buffer 1 "Mde" "&*-files" .osd.dgroth-buffer-starfiles
                  osd .osd.dgroth-buffer 2 "-"
                  set-variable #l0 &cat ® "/history" "file-type" "\b" "All files\b"
                  set-variable #l1 &cat ® "/history" "file-mask" "\b" ".*\b"
                  set-variable :counter 1
                  process-starfiles
                  set-variable :osd-file-counter 11000
                  !while ¬ &seq &lget #l0 :counter ""
                  set-variable #l3 &lget #l0 :counter
                  set-variable #l4 &lget #l1 :counter
                  set-variable .osd.files :osd-file-counter
                  osd .osd.dgroth-buffer &pinc :osd-file-counter 3 "Mde" #l3 .osd.files
                  process-submenu #l3 #l4
                  set-variable :counter &inc :counter 1
                  !done
                  .osd.dgroth-buffer osd 0 "ba" &add $cursor-x 1 &sub $cursor-y 1
                  !emacro
                  define-macro process-submenu
                  set-variable :regex &cat &cat "," @2 ","
                  !if ¬ &isin "All files" @1
                  filemask-to-regex :regex
                  !endif
                  -1 osd .osd.files
                  osd .osd.files 0 "b"
                  set-variable :fileflag 0
                  set-variable $buffer-names ".*"
                  !while ¬ &seq &set #l0 $buffer-names ""
                  ; a hack for 5 possible fileendings
                  !if &xisequal #l0 &lget :regex 1
                  set-variable :fileflag &inc :fileflag 1
                  osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                  !elif &xisequal #l0 &lget :regex 2
                  ; 300 ml-write "something is equal"
                  set-variable :fileflag &inc :fileflag 1
                  osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                  !elif &xisequal #l0 &lget :regex 3
                  set-variable :fileflag &inc :fileflag 1
                  osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                  !elif &xisequal #l0 &lget :regex 4
                  set-variable :fileflag &inc :fileflag 1
                  osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                  !elif &xisequal #l0 &lget :regex 5
                  set-variable :fileflag &inc :fileflag 1
                  osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                  !endif
                  !done
                  !if &equ :fileflag 0
                  osd .osd.files 1 "" "None found"
                  !endif
                  !emacro


                  define-macro process-starfiles
                  -1 osd .osd.dgroth-buffer-starfiles
                  osd .osd.dgroth-buffer-starfiles 0 "b"
                  set-variable :star-file 1
                  set-variable $buffer-names ".*"
                  !while ¬ &seq &set #l0 $buffer-names ""
                  !if &seq &lef #l0 1 "*"
                  set-variable :star-file &inc :star-file 1
                  osd .osd.dgroth-buffer-starfiles :star-file "" #l0 f dg-buffer-osd-goto
                  !endif
                  !done
                  !if &equ :star-file 1
                  osd .osd.dgroth-buffer-starfiles 1 "" "None found"
                  !endif
                  !emacro
                  0 define-macro dg-buffer-osd-goto
                  find-buffer $result
                  !emacro


                  ; end dgbuffer.emf
                  >
                  >this works well,
                  >so I should build the menus on the fly using two nested while's
                  >(OK one while, one goto -- nested while's are in ME impossible - a
                  >pitty ...) getting the infos from the registry. After studying osd.emf
                  >this seems to be possible, however I am still confused by these #l0,
                  >#l1, #l2, etc vars. It's difficult to manage so it takes a little bit
                  >time to understand the code ...
                  >But what is @# ??? It is used a lot but not described in the docs.
                  >
                  >Detlef
                  <snip>

                  --
                  Dr. Detlef Groth
                  Neue Scheune 5
                  14548 Ferch
                  Tel. 033209-80278
                  e-mail: dgroth@...
                • dgroth@gmx.de
                  hello, So finally I got it working, here is the ordered buffer-popup using the user registry. It is similar to the right-mouse-click quick open function but
                  Message 8 of 10 , Aug 22, 2001
                  • 0 Attachment
                    hello,
                    So finally I got it working, here is the ordered buffer-popup using the
                    user registry. It is similar to the right-mouse-click quick open
                    function but only shows already opened buffers.

                    This function emulates the gnu-emacs-lisp-function (msb.el,
                    about 1000 lines of elisp-code) in less than 100 lines of emf-code.
                    You can customize the file extensions via Help->User Setup->File types....

                    OS tested: win2000, linux

                    regards, Detlef


                    add in your <user>.emf
                    define-macro-file dgbuffer dg-buffer-popup
                    global-bind-key "dg-buffer-popup" "C-mouse-pick-1" ; like in gnu-emacs
                    global-bind-key "dg-buffer-popup" "C-mouse-drop-1"

                    ; dgbuffer.emf start
                    define-macro dg-buffer-popup
                    !if ¬ &exi .osd.dgroth-buffer
                    set-variable .osd.dgroth-buffer &pinc .osd.next 1 ; buffer-main
                    set-variable .osd.dgroth-buffer-starfiles &pinc .osd.next 1 ; buffer with *
                    !endif
                    osd .osd.dgroth-buffer 0 "b"
                    osd .osd.dgroth-buffer 1 "Mde" "&*-files" .osd.dgroth-buffer-starfiles
                    osd .osd.dgroth-buffer 2 "-"
                    set-variable #l0 &cat ® "/history" "file-type" "\b" "All files\b"
                    set-variable #l1 &cat ® "/history" "file-mask" "\b" ".*\b"
                    set-variable :counter 1
                    process-starfiles
                    set-variable :osd-file-counter 11000
                    !while ¬ &seq &lget #l0 :counter ""
                    set-variable #l3 &lget #l0 :counter
                    set-variable #l4 &lget #l1 :counter
                    set-variable .osd.files :osd-file-counter
                    osd .osd.dgroth-buffer &pinc :osd-file-counter 3 "Mde" #l3 .osd.files
                    process-submenu #l3 #l4
                    set-variable :counter &inc :counter 1
                    !done
                    .osd.dgroth-buffer osd 0 "ba" &add $cursor-x 1 &sub $cursor-y 1
                    !emacro
                    define-macro process-submenu
                    set-variable :regex &cat &cat "," @2 ","
                    !if ¬ &isin "All files" @1
                    filemask-to-regex :regex
                    !endif
                    -1 osd .osd.files
                    osd .osd.files 0 "b"
                    set-variable :fileflag 0
                    set-variable $buffer-names ".*"
                    !while ¬ &seq &set #l0 $buffer-names ""
                    ; a hack for 5 possible fileendings
                    !if &xisequal #l0 &lget :regex 1
                    set-variable :fileflag &inc :fileflag 1
                    osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                    !elif &xisequal #l0 &lget :regex 2
                    ; 300 ml-write "something is equal"
                    set-variable :fileflag &inc :fileflag 1
                    osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                    !elif &xisequal #l0 &lget :regex 3
                    set-variable :fileflag &inc :fileflag 1
                    osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                    !elif &xisequal #l0 &lget :regex 4
                    set-variable :fileflag &inc :fileflag 1
                    osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                    !elif &xisequal #l0 &lget :regex 5
                    set-variable :fileflag &inc :fileflag 1
                    osd .osd.files :fileflag "" #l0 f dg-buffer-osd-goto
                    !endif
                    !done
                    !if &equ :fileflag 0
                    osd .osd.files 1 "" "None found"
                    !endif
                    !emacro


                    define-macro process-starfiles
                    -1 osd .osd.dgroth-buffer-starfiles
                    osd .osd.dgroth-buffer-starfiles 0 "b"
                    set-variable :star-file 1
                    set-variable $buffer-names ".*"
                    !while ¬ &seq &set #l0 $buffer-names ""
                    !if &seq &lef #l0 1 "*"
                    set-variable :star-file &inc :star-file 1
                    osd .osd.dgroth-buffer-starfiles :star-file "" #l0 f dg-buffer-osd-goto
                    !endif
                    !done
                    !if &equ :star-file 1
                    osd .osd.dgroth-buffer-starfiles 1 "" "None found"
                    !endif
                    !emacro
                    0 define-macro dg-buffer-osd-goto
                    find-buffer $result
                    !emacro


                    ; end dgbuffer.emf
                    >
                    >this works well,
                    >so I should build the menus on the fly using two nested while's
                    >(OK one while, one goto -- nested while's are in ME impossible - a
                    >pitty ...) getting the infos from the registry. After studying osd.emf
                    >this seems to be possible, however I am still confused by these #l0,
                    >#l1, #l2, etc vars. It's difficult to manage so it takes a little bit
                    >time to understand the code ...
                    >But what is @# ??? It is used a lot but not described in the docs.
                    >
                    >Detlef
                    <snip>

                    --
                    Dr. Detlef Groth
                    Neue Scheune 5
                    14548 Ferch
                    Tel. 033209-80278
                    e-mail: dgroth@...
                  Your message has been successfully submitted and would be delivered to recipients shortly.