[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2 ways to paste
From: |
Xah |
Subject: |
Re: 2 ways to paste |
Date: |
Thu, 6 Nov 2008 08:18:59 -0800 (PST) |
User-agent: |
G2/1.0 |
On Nov 6, 7:38 am, tomer <tomer1le...@walla.co.il> wrote:
> here his the scenario ( timed order):
> 1) i mark region A
> 2) i copy (alt+w) region B
>
> now i want the have the possiblity to yank region A and region B each
> with different command.
>
> is it possible?
>
> in other words , Is it possible to have 2 different indepenable
> mechanism for
> 1) copy yank marking block (with mark and set).
> 2) copy yank block that was copied to clipboard by alt+w.
>
> hope my question is cleared
(^_^) but am quite confused.
You want 2 independent clipboards, so that you can have different
texts in each, is that it?
If so, you can use emacs's so-called register.
See this tips page:
http://xahlee.org/emacs/emacs_esoteric.html
excerpt:
Q: I have a set of different texts i want to paste frequently. Is
there a way to use like multiple clipboards?
Yes. Select the region, then type “Ctrl+x r s” (or “Alt+x copy-to-
register”), give it a name such as 1. To paste it, type “Ctrl+x r
i” (or “Alt+x insert-register”).
If your text is frequently needed long term, such as a XML template or
signature, you can define a function and bind it to a key, so that it
inserts the string when you press a button. Here's a example:
(defun insert-p ()
"insert <p></p> at cursor point."
(interactive)
(insert "<p></p>")
(backward-char 4))
(global-set-key (kbd "<f8>") 'insert-p)
Put the above in your “.emacs”.
-----------------------
btw, your use of jargons is fairly confused.
Either use modern terms or stick with emacs's, throughout. Here's
simple table:
Modern Emacs
-----------------------------------
copy kill-ring-save
cut kill
paste yank
clipboard kill-ring
text selection region
window frame (sometimes “window” as in split-window-
vertically)
frame/pane window
left button mouse-1
mid button mouse-2
right button mouse-3
when you “mark”, you set a boundary to region. You don't “mark a
region”.
Xah
∑ http://xahlee.org/
☄