Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!RELAY.NSWC.NAVY.MIL!dsill From: dsill@RELAY.NSWC.NAVY.MIL Newsgroups: comp.windows.x Subject: Re: R3 Selection Mechanism Message-ID: <8905251838.AA18303@expo.lcs.mit.edu> Date: 25 May 89 17:29:01 GMT References: Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 45 >From: Fred Hansen >Dave Sill wrote: >> A typical counterexample to the single-selection-interface approach is >> emacs. It has its own ideas of what constitutes a selection and how >> selections are manipulated, and it's nothing like the interface Hansen >> described. > >This confuses me because I have believed the ATK cut/paste scheme is >close to that of emacs, at least Gosling-emac. The mapping from my >description to emacs seems fairly direct: control-@ and the various >cursor movement commands to establish the selection (S) and the target >(T). Keystrokes (K) instead of menu picks (M) to select the various >operations. As I mentioned in my note, the menu ATK picks (M) can also >be done with ATK keystrokes (K): > > ^W cut > meta-W copy > ^Y paste > meta-Y replace > >So how does emacs differ from ATK? Emacs uses the concept of a "region", defined as the area between "point" (where the cursor is) and "mark" (a previously marked location). To remove the region, one uses the kill-region command, typically C-w (^W). To copy the region there's copy-region-as-kill, M-w (Esc W). Pasting is accomplished with the yank command, C-y. Killed sections of text are stored in a "kill ring". The yank-pop command can be used to replace the just-yanked text with the previous section in the kill ring. It's also possible to select a rectangle of text whose corners are at point and mark using kill-rectangle. Kill-line, C-k, kills from point to the end of the current line. There's also kill-paragraph, kill-sentence, kill-sexp, kill-word, backward-kill-paragraph/sentence/ sexp/word, kill-comment, mark-defun, mark-page, and mark-whole-buffer. And, since emacs is extensible, the user can create his own custom marking/killing/yanking functions. So, yes, at a low level it looks as though the mouse-based drag-to- select-then-pick-function-from-menu selection interface can be implemented on top of emacs, but that's not nearly sufficient to replace all of emacs' selection interface. -Dave (dsill@relay.nswc.navy.mil)