peter@hadrian.uwo.ca (Peter Marshall) (08/12/89)
A while ago I asked in the comp.emacs group about an emacstool mouse menu function that allowed text to be copied from a cmdtool or scolling SUNVIEW window. The distributed version only allows selection of text from the older STUFF buffer. This makes it very difficult to grab a line or two of text from a mailtool window for example. As I got no response I set about to see how easy it would be to code up. My solution is not efficient, but it is very easy: In the file sun-mouse-fns.el (or in some later releases sun-fns.el) find the routine named "emacs-menu" and add a new entry to the main menu with the following line after the line with "Stuff Selection" in it: ("Insert Selection" shell-command "get_selection" 1) Basically this uses the "get_selection" program supplied with the OS and fires up the shell and to execute it and leave the result after the current pos. It takes a while for the text to appear, but I don't do it enough to worry about speed. To use it, position your cursor to the destination in emacs, mark the text you want to grab and then select the "Insert Selection" entry from the main menu. Peter Marshall, Data Comm. Manager CCS, U. of Western Ontario, London, Canada N6A 5B7 (519)661-2151x6032 peter.marshall@uwo.ca pm@uwovax (BITNET); peter@julian.uucp