Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cut and paste as easy as in Notepad? (OUPS!!!)

0 views
Skip to first unread message

Joel Horowitz

unread,
Dec 17, 1997, 3:00:00 AM12/17/97
to

Hye, I just discovered emacs, and it's really great. What makes it really
great is that if you don't love it, you can change it. So I binded my
whole keyboard to the commands I use a lot... There's just one thing that
I'd like to change, but it seems to need more knowledge than just that of
the global-set-key function:

How can I do to replace the usual set-mark-command to something like in
Windows' notepad, that is, using shift-arrows (or shift-control-arrows to
move a whole word...)???

If you have a precise idea of solving this problem, let me know,
but please, don't answer me that I just need to read lisp-emacs
documentation. I learned emacs, because I wanted to learn programming in
Perl, and if I have to learn lisp, there will be an overflow in my level
of recursivity... I have no doubt about the beauty of lisp, but I have
some about my capacity to learn yet one more language...

Thanks,

Joel Horowitz

-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet

Jake Colman

unread,
Dec 17, 1997, 3:00:00 AM12/17/97
to

>>>>> "JH" == Joel Horowitz <horo...@ulb.ac.be> writes:


JH> How can I do to replace the usual set-mark-command to something like in
JH> Windows' notepad, that is, using shift-arrows (or shift-control-arrows
JH> to move a whole word...)???

Try M-x pc-selection-mode

The following is copied from C-h f pc-selection-mode.


pc-selection-mode is an interactive compiled Lisp function in `pc-select'.
(pc-selection-mode)

Change mark behaviour to emulate Motif, MAC or MS-Windows cut and paste style.

This mode enables Delete Selection mode and Transient Mark mode.

The arrow keys (and others) are bound to new functions
which modify the status of the mark.

The ordinary arrow keys disable the mark.
The shift-arrow keys move, leaving the mark behind.

C-LEFT and C-RIGHT move back or forward one word, disabling the mark.
S-C-LEFT and S-C-RIGHT move back or forward one word, leaving the mark behind.

M-LEFT and M-RIGHT move back or forward one word or sexp, disabling the mark.
S-M-LEFT and S-M-RIGHT move back or forward one word or sexp, leaving the mark
behind. To control wether these keys move word-wise or sexp-wise set the
variable pc-select-meta-moves-sexps after loading pc-select.el but before
turning pc-selection-mode on.

C-DOWN and C-UP move back or forward a paragraph, disabling the mark.
S-C-DOWN and S-C-UP move back or forward a paragraph, leaving the mark behind.

HOME moves to beginning of line, disabling the mark.
S-HOME moves to beginning of line, leaving the mark behind.
With Ctrl or Meta, these keys move to beginning of buffer instead.

END moves to end of line, disabling the mark.
S-END moves to end of line, leaving the mark behind.
With Ctrl or Meta, these keys move to end of buffer instead.

PRIOR or PAGE-UP scrolls and disables the mark.
S-PRIOR or S-PAGE-UP scrolls and leaves the mark behind.

S-DELETE kills the region (`kill-region').
S-INSERT yanks text from the kill ring (`yank').
C-INSERT copies the region into the kill ring (`copy-region-as-kill').

In addition, certain other PC bindings are imitated (to avoid this, set
the variable pc-select-selection-keys-only to t after loading pc-select.el
but before calling pc-selection-mode):

F6 other-window
DELETE delete-char
C-DELETE kill-line
M-DELETE kill-word
C-M-DELETE kill-sexp
C-BACKSPACE backward-kill-word
M-BACKSPACE undo

--
Jake Colman

Principia Partners LLC | Phone: (201) 946-0300
Harborside Financial Center | Fax: (201) 946-0320
Plaza II - 9th Floor | Beeper: (800) 505-2795
Jersey City, NJ 07311 | e-mail: col...@ppllc.com


Philip Lijnzaad

unread,
Dec 18, 1997, 3:00:00 AM12/18/97
to

col...@ppllc.com (Jake Colman) writes:

>
> >>>>> "JH" == Joel Horowitz <horo...@ulb.ac.be> writes:
>
>
> JH> How can I do to replace the usual set-mark-command to something

> JH> like in Windows' notepad, that is, using shift-arrows (or
> JH> shift-control-arrows to move a whole word...)???
>
> Try M-x pc-selection-mode

this looks quite useful, but I doesn't seem to offer you the possibility to
go back to unix-mode. The usual definition of a minor mode would be
(something-mode ARG) [ (something-mode &optional ARG) ], where
(something-mode) would toggle modes, and (something-mode 1) would switch it
on, and (something-mode nil) would switch it off. Would be usefull if it were
there. Or am I missing something ?

Philip

--
"It's just that I get up 20 hours earlier than everybody else"
Philip Lijnzaad, lijn...@ebi.ac.uk | European Bioinformatics Institute
+44 (0)1223 49 4639 | Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax) | Cambridge CB10 1SD, GREAT BRITAIN
PGP fingerprint: E1 03 BF 80 94 61 B6 FC 50 3D 1F 64 40 75 FB 53

Jake Colman

unread,
Dec 18, 1997, 3:00:00 AM12/18/97
to

>>>>> "PL" == Philip Lijnzaad <lijn...@ebi.ac.uk> writes:

PL> this looks quite useful, but I doesn't seem to offer you the
PL> possibility to go back to unix-mode. The usual definition of a minor
PL> mode would be (something-mode ARG) [ (something-mode &optional ARG) ],
PL> where (something-mode) would toggle modes, and (something-mode 1) would
PL> switch it on, and (something-mode nil) would switch it off. Would be
PL> usefull if it were there. Or am I missing something ?

You appear to be correct. It is less a mode than it is a reconfiguration
package. You did notice BTW that it does _not_ update the modeline. No known
cure is available!

0 new messages