From: "M. Schulter" Newsgroups: comp.os.msdos.djgpp Subject: Re: Emacs M-! and graphics mode Date: 10 Apr 1998 22:45:30 GMT Organization: Value Net Internetwork Services Inc. Lines: 51 Message-ID: <6gm7ea$r6t$1@vnetnews.value.net> References: NNTP-Posting-Host: value.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Eli Zaretskii wrote: : But as far as I understand your situation, you are running graphics : programs via `M-!'. If so, this is incorrect usage: M-! is meant to : run programs that don't grab the screen; it is meant for programs : which input and output text via the normal stdio functions. Hello, there. Curiously, with version 19.31, I discovered what appears to be a very useful exception to this rule in 1996. Before reporting my unusual experience, I should start with an _important warning_ for anyone who might try something similar with a graphics application using an Emacs Shell Command (M-!). ------------------------------------------------------------------------- CAUTION: This is a report of an _exceptional_ success for something I wouldn't expect to succeed. Readers of this newsgroup should _not_ assume that it would necessarily work for your favorite graphics application or utility. At the least, I would urge that anyone trying a similar experiment should be prepared for the system to lock up or crash, requiring a reboot. ------------------------------------------------------------------------- For some reason -- although I didn't expect it to work, for the reason you give -- I found that I can run a free DOS command-line graphics viewer called PICEM as a Shell Command (M-!) without any problem. Why this works, I have no idea; but the screen (Hercules Graphics Card Plus, 720x348x2) changes to graphics mode when PICEM loads, and after viewing a PCX or GIF file, pressing in PICEM returns smoothly to Emacs and text mode. This "unexpected feature" is _very_ helpful in designing PostScript artwork within Emacs, which is how I discovered it. This is a constant process of shifting between editing in Emacs and previewing the PostScript drawing with Image Alchemy PS (a commercial PostScript interpreter which translates the code into PCX or GIF) and PICEM (which displays the PCX or GIF on screen). In fact, using a batch file to run Image Alchemy PS and then PICEM, and a Shell Command macro to start the patch file, I can edit a PostScript file in Emacs and then just press F7, say, whenever I want a preview. It takes just one keystroke to go into preview mode in PICEM, and another (after scrolling around the preview in graphics mode with the arrow keys) to return to editing in Emacs. Simply running an automated Shell Command, rather than suspending Emacs, is obviously must faster and also more fun -- but I'm not sure why it should work in this special case to shift from text to graphics mode and back again.