all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: "Jambunathan K." <kjambunathan@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: FR: Yank rectangle, not as a rectangle but as a string.
Date: Thu, 06 Mar 2014 09:26:15 +0200	[thread overview]
Message-ID: <87siqvkctk.fsf@mithlond.arda> (raw)
In-Reply-To: <87iorssjig.fsf@gmail.com> (Jambunathan K.'s message of "Wed, 05 Mar 2014 21:52:15 +0530")

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

Jambunathan K. [2014-03-05 21:52:15 +05:30] wrote:

> FR: Yank rectangle, not as a rectangle but as a string.

I didn't read all your examples so I might not understand this
correctly. Anyway, I've written a command which sounds like what you
need. With prefix argument the command requests a separator string to be
inserted between rectangle rows. The default is space (" ").


(defun tl-yank-rectangle-sequentially (beg end char)
  ;; Variable "select-active-regions" must not be t.
  (interactive (list (region-beginning) (region-end)
                     (if current-prefix-arg
                         (read-string "Separator string: ")
                       " ")))
  (save-match-data
    (kill-new (mapconcat 'identity (extract-rectangle beg end) char))
    (setq deactivate-mark t)))

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

  parent reply	other threads:[~2014-03-06  7:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 16:22 FR: Yank rectangle, not as a rectangle but as a string Jambunathan K
2014-03-06  1:59 ` Eric Abrahamsen
2014-03-06  7:26 ` Teemu Likonen [this message]
2014-03-06 10:22   ` Teemu Likonen

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

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

  git send-email \
    --in-reply-to=87siqvkctk.fsf@mithlond.arda \
    --to=tlikonen@iki.fi \
    --cc=help-gnu-emacs@gnu.org \
    --cc=kjambunathan@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.