Xref: utzoo comp.windows.misc:994 comp.emacs:5058 comp.windows.news:1077 comp.cog-eng:878 Path: utzoo!attcan!uunet!lll-winken!ames!ncar!tank!mimsy!brillig.umd.edu!don From: don@brillig.umd.edu (Don Hopkins) Newsgroups: comp.windows.misc,comp.emacs,comp.windows.news,comp.cog-eng Subject: Menu description languages Message-ID: <15453@mimsy.UUCP> Date: 13 Jan 89 08:03:49 GMT References: <3234@sugar.uu.net> <12907@steinmetz.ge.com> <10867@s.ms.uky.edu> <550@island.uu.net> Sender: nobody@mimsy.UUCP Reply-To: don@brillig.umd.edu.UUCP (Don Hopkins) Organization: U of Maryland, Dept. of Computer Science, Human Computer Interaction Lab Lines: 41 In article <550@island.uu.net> daniel@island.uu.net (Dan "yes that is my real name" Smith) writes: [...] >As long as I'm writing: I'd like to see menuing systems more like the >Info reader in Gnu Emacs - there are some situations where it makes >sense to have a menu item in two or more places; also, the users should >be able to redefine their menus. I'm not talking about specific systems, >just a general direction that I know I'd find more convenient to use. > > dan I did something along those lines for the UniPress's Emacs NeWS interface (NeMACS). I wrote a menu compiler that lets you create popup menus for NeWS by describing them in Emacs INFO nodes. Each node describes one menu. Each selection is specified by one line of text. Submenus are represented as links to other INFO nodes. Menu selections are pseudo-links that describe the action of a menu item. Actions include things like calling a PostScript function, typing in a string, calling an Emacs functions, popping up a message, etc. The menu compiler translates the info nodes into PostScript code for NeWS, and MLisp code that interfaces them to Emacs. The PostScript is loaded into NeWS to define popup menus that run independantly in the window server. The menu description language has the same syntax as INFO menus, so a selection that invokes a submenu is also an INFO link to the node describing that submenu, and a selection that invokes an action is just a link to a fake node whose name is the action. The menu compiler traverses the tree of nodes, so the tree of popup menus it creates reflects the structure of the INFO nodes. Users can edit the info nodes, and recompile and reload them on the fly to customize their menus. They can make popup menus for NeWS and interface them to Emacs without ever having to touch or even look at the PostScript and MLisp code produced by the compiler. I wrote it while I was working for UniPress on the Emacs NeWS interface, last summer, and it comes with Emacs version 2.20. Yes, it's a supported commercial product, but no, this isn't a commercial for it. I'd certianly like to hear about other peoples' experiences with menu description languages. -Don