From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: YUE Daian Newsgroups: gmane.emacs.help Subject: Re: How do we copy rectangular selected region Date: Fri, 10 May 2019 17:08:21 +0800 Message-ID: <87tve265iy.fsf@work.i-did-not-set--mail-host-address--so-tickle-me> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="238054"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 10 11:10:17 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hP1Xi-000zlE-RX for geh-help-gnu-emacs@m.gmane.org; Fri, 10 May 2019 11:10:14 +0200 Original-Received: from localhost ([127.0.0.1]:39362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP1Xh-0001Ut-KM for geh-help-gnu-emacs@m.gmane.org; Fri, 10 May 2019 05:10:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP1XM-0001TW-7y for help-gnu-emacs@gnu.org; Fri, 10 May 2019 05:09:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP1XL-0004rC-2Z for help-gnu-emacs@gnu.org; Fri, 10 May 2019 05:09:52 -0400 Original-Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:42948) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP1XK-0004pO-S0 for help-gnu-emacs@gnu.org; Fri, 10 May 2019 05:09:51 -0400 Original-Received: by mail-pl1-x630.google.com with SMTP id x15so2528610pln.9 for ; Fri, 10 May 2019 02:09:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=PlmoNZrbihoWZM2MEoui4vCZX7s8mURhTEx04F2cqiw=; b=Zj+mwg238A+n8Yi29R7O/3PNvPm9n1a9L9w5RdeK/EfVqUGYprsdKmF6upZuspermt DxSry336++hhu/bqI7VTL0ZyzeAtxC428zTgtIh1SSsLvXTdxPUFeGJOCnyK4+0v/unR PQDF/2zYAKdDeoUMfZrH8ncIEPveBtsKzOiFyxuKpd3yYiVhcOo/s9tqVFma0U2cLcdY KfVKB34LxpcpdB4xnldboh4OZePFgoleofq7VD0CKGUkXOvcq7oMV6ApqpvmhaeaQwnY 1gT9vnuUTuZPygoD5LyeyZ41TYgkbK3Dl2iRhIE0MIWwX579TLPUGoelmhzZ6QxMwoMS VPzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=PlmoNZrbihoWZM2MEoui4vCZX7s8mURhTEx04F2cqiw=; b=ioasIFJ8+kF43lgVODd+t4At1Ssb+maSBPVRld9jIjQU6kXKV6H+1DT3yVm4cwXU29 6tH+KAgzvyKgic26fUU4Ib2MTngh1ARgN2lC95lq0oHgz88EVgEGg46SbZgpFxVlQzaZ jppr94VOq1HZkHdBMvcH7xLPkMqG2hYp1bXI9FCmNKBtyBXABaFnBGtxHW2xcsD15XBQ SEVfunhLQxqsJTPHPwGv7H/uMc5abjZ5RsfEJrbuz7k4CK/AycGRTUAhjIb6TQZlgMb5 obSHNbdHDWwqimJC1UzsfpHmWEfa5FDBwgkqKkIN75ZQRtw83FkVwXBrwd/mEkPfBd1r QJng== X-Gm-Message-State: APjAAAWE8rLxyM7zrCloE7Xa7JEuhSDAgVS5Y4EFR7Jddfq9XbX/IB5a E9x40zEVqOl07yeDpJKjriBB68ypIuU= X-Google-Smtp-Source: APXvYqwDPuyQ/Ty9eL6R81DqGdny0Y8sCh5TzRZe2qhwSUyrviY528pVtklLzcHqQhmAZ4momWlv7g== X-Received: by 2002:a17:902:364:: with SMTP id 91mr11402591pld.72.1557479387701; Fri, 10 May 2019 02:09:47 -0700 (PDT) Original-Received: from localhost ([118.201.58.126]) by smtp.gmail.com with ESMTPSA id e184sm7834282pfc.102.2019.05.10.02.09.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 May 2019 02:09:46 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::630 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120284 Archived-At: 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