From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Juri Linkov <juri@linkov.net>
Cc: Bastien <bzg@gnu.org>, 19829@debbugs.gnu.org
Subject: bug#19829: 25.0.50; Design of commands operating on rectangular regions
Date: Wed, 01 Jul 2015 23:02:51 -0400 [thread overview]
Message-ID: <jwvd20bz304.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87mvzfa5f2.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 02 Jul 2015 01:17:53 +0300")
> The goal is to design the interface as general as possible
> to be able to define potential future non-rectangular regions.
> For instance, a circular region could be defined in the future as:
>
> (region
> (shape . circle)
> (radius . 42)
> (center . ...)
> ...
>
> Then to distinguish a rectangular region we could add (shape . rectangle)
> to the current information:
>
> (region
> (shape . rectangle)
> (positions . ...)
> ...
Hmm... no I don't see it: this info doesn't need to be exposed anywhere,
it can stay internal to the implementation of a circular region.
IOW, either your REGION arg uses a standard format (e.g. a list of
(START . END) boundaries), or it should be just a constant saying "use
things like region-extract-function ".
> Stuffing the region information into one of its boundary args would be
> too ugly. I guess this is why you designed a cleaner interface by
> adding a REGION argument to several commands:
No, it's definitely not cleaner: I dislike this approach I used.
I think it's hideous when one (optional) arg says "ignore those two
(mandatory) args".
I agree that hijacking one of the two existing args is ugly, but that's
only because it's asymmetric. If the region had always been passed as
a single arg (e.g., a pair (START . END)), then it would be very natural
to extend it with more cases.
[ Tangentially related side-note: "r" is the only option in `interactive'
which provides 2 arguments. IMO this special case should never have
existed, but of course we now have to live with it. ]
Stefan
next prev parent reply other threads:[~2015-07-02 3:02 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 [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvd20bz304.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=19829@debbugs.gnu.org \
--cc=bzg@gnu.org \
--cc=juri@linkov.net \
/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.