unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: YUE Daian <sheepduke@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How do we copy rectangular selected region
Date: Fri, 10 May 2019 17:08:21 +0800	[thread overview]
Message-ID: <87tve265iy.fsf@work.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <e9adedb13c6f06c8d6d7c514d3610b97@posteo.net>

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	other threads:[~2019-05-10  9:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-05  7:21 How do we copy rectangular selected region Budi
2019-05-05 13:22 ` Óscar Fuentes
2019-05-06 10:50 ` Michael Heerdegen
2019-05-07  6:27   ` Budi
2019-05-10  8:40 ` mickbert
2019-05-10  9:08   ` YUE Daian [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tve265iy.fsf@work.i-did-not-set--mail-host-address--so-tickle-me \
    --to=sheepduke@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).