From: Juri Linkov <juri@linkov.net>
To: Richard Stallman <rms@gnu.org>
Cc: bzg@gnu.org, 19829@debbugs.gnu.org
Subject: bug#19829: 25.0.50; Design of commands operating on rectangular regions
Date: Wed, 08 Jul 2015 01:15:45 +0300 [thread overview]
Message-ID: <87pp43397y.fsf@mail.linkov.net> (raw)
In-Reply-To: <E1ZCaP8-0003Vq-Bw@fencepost.gnu.org> (Richard Stallman's message of "Tue, 07 Jul 2015 17:27:50 -0400")
> > +(defvar region-insert-function
> > + (lambda (lines)
> > + (let ((first t))
> > + (while lines
> > + (or first
> > + (insert ?\n))
> > + (insert-for-yank (car lines))
> > + (setq lines (cdr lines)
> > + first nil))))
> > + "Function to insert the region's content.
> > +Called with one argument LINES.
> > +Insert the region as a list of lines.")
>
> What is the meaning of a list of lines as the region
> if it is NOT a rectangle? What would that kind of region mean,
> and when would it be used?
Actually this function is not intended for a rectangle. It's a generic
implementation that works like `insert-for-yank' currently does.
But it uses a list of lines as its argument for compatibility with
the existing `cua--insert-rectangle' and the new proposed
`rectangle--insert-region' (that uses the existing `insert-rectangle')
and that both of them accept a list of lines as their argument.
> (I ask because there's a different function for rectangles,
> so this function won't be used with a list of lines for rectangles.)
The generic `region-insert-function' needs to have the same argument
(i.e. a list of lines) for the case when it's overridden by one of the
rectangle-handling functions. But its generic implementation inserts
a list of lines the same way as `insert-for-yank' inserts a single
string where lines are separated by newlines.
next prev parent reply other threads:[~2015-07-07 22:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 14:58 bug#19829: 25.0.50; query-replace in rectangle regions do not honor boundaries Bastien
2015-02-10 23:40 ` Juri Linkov
2015-02-12 0:57 ` Juri Linkov
2015-02-12 14:33 ` Stefan Monnier
2015-02-13 0:54 ` Juri Linkov
2015-02-14 3:59 ` Stefan Monnier
2015-02-18 18:30 ` Juri Linkov
2015-02-18 22:56 ` Stefan Monnier
2015-02-19 19:12 ` Juri Linkov
2015-02-19 21:29 ` Stefan Monnier
2015-02-23 19:19 ` Juri Linkov
2015-03-11 20:31 ` Stefan Monnier
2015-03-12 19:19 ` Juri Linkov
2015-03-13 1:04 ` Stefan Monnier
2015-06-30 20:42 ` bug#19829: 25.0.50; Design of commands operating on rectangular regions Juri Linkov
2015-07-01 2:29 ` Stefan Monnier
2015-07-01 22:17 ` Juri Linkov
2015-07-02 3:02 ` Stefan Monnier
2015-07-02 22:40 ` Juri Linkov
2015-07-07 12:20 ` Stefan Monnier
2015-07-07 22:12 ` Juri Linkov
2015-07-07 21:27 ` Richard Stallman
2015-07-07 22:15 ` Juri Linkov [this message]
2015-02-19 14:27 ` bug#19829: 25.0.50; query-replace in rectangle regions do not honor boundaries Bastien
2015-11-13 23:32 ` Juri Linkov
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=87pp43397y.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=19829@debbugs.gnu.org \
--cc=bzg@gnu.org \
--cc=rms@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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).