help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do we copy rectangular selected region


From: YUE Daian
Subject: Re: How do we copy rectangular selected region
Date: Fri, 10 May 2019 17:08:21 +0800

On 2019-05-10 10:40, mickbert@posteo.net wrote:
> On 05.05.2019 09:21, Budi wrote:
>> How can we copy  rectangular selected region on latest emacs
>> we paste it as line region instead
>> how do such by script elisp.. thanks in advance
>
> I use a temporary buffer, (like "*scratch*", but anything else is the 
> same):
> - select rectangle and copy it: M-x copy-rectangle-as-kill
> - yank rectangle in in temporary buffer: C-x r y
> - select what has just been yanked: C-x C-x
> - move it in the kill-ring: C-w
> - go to destination buffer and yank: C-y
>
> I didn't know the command copy-rectangle-as-kill before; I used to kill 
> the rectangle then re-yank, or undo, every time!
> --
> Mick

Emacs also provides a mode to select rectangle in a more user-friendly
way, named `rectangle-mark-mode`.
It is bound to `C-x SPC` by default.

It *only* selects a rectangle so you may copy/yank using trivial `M-w`.

Hope it helps.

Danny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]