all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Daniel Colascione <dancol@dancol.org>
Cc: Bastien <bzg@gnu.org>, Eli Zaretskii <eliz@gnu.org>,
	sdl.web@gmail.com, jay.finger@pobox.com, emacs-devel@gnu.org
Subject: Re: Rectangular regions
Date: Thu, 31 Oct 2013 21:50:25 -0400	[thread overview]
Message-ID: <jwvzjpoq4nw.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <5272B1C9.4000003@dancol.org> (Daniel Colascione's message of "Thu, 31 Oct 2013 12:38:49 -0700")

> Or better yet --- just take an interval list.

Or provide a `region-iterator-function', so that count-words could do
something like:

   (let ((total 0))
     (funcall region-iterator-function
              (lambda (beg end)
                (cl-incf total (count-words-internal beg end))))
     total)

I'm not sure yet what this really should look like.  We'll need to take
a closer look at the various uses of the region and see what primitives
would be useful.

Some of the issues have to do with modifying the buffer while we go
through the various chunks of the region, as well as dealing with things
like "the region starts in the middle of a TAB character" or "the region
starts/ends after the end of the line".

> An interval list would allow us to select a "rectangle" in bidi
> buffers, the underlying character-range chunks of which would actually
> be arbitrary and non-contiguous.

I'm in no hurry to go down that path.  Lots of potholes on the way, and
from where I stand, there doesn't seem to be much gold at the end of
that road.


        Stefan



  parent reply	other threads:[~2013-11-01  1:50 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30  1:59 Rectangular regions Stefan Monnier
2013-10-30  2:15 ` Dmitry Gutov
2013-10-30  2:59   ` Stefan Monnier
2013-10-30  3:22 ` Leo Liu
2013-10-30  3:29   ` Daniel Colascione
2013-10-30 18:09     ` Stefan Monnier
2013-10-30 18:24       ` Bastien
2013-10-30 19:20       ` Eli Zaretskii
2013-10-30 23:35         ` Bastien
2013-10-31 12:05           ` Jose E. Marchesi
2013-11-05 18:57             ` Stefan Monnier
2013-11-05 19:31               ` Drew Adams
2013-10-31 17:17           ` Stefan Monnier
2013-10-31 18:11             ` Jambunathan K
2013-10-31 18:36             ` Jay Finger
2013-10-31 18:54               ` Eli Zaretskii
2013-10-31 19:28                 ` Daniel Colascione
2013-10-31 19:38               ` Daniel Colascione
2013-10-31 19:44                 ` Eli Zaretskii
2013-11-01  1:50                 ` Stefan Monnier [this message]
2013-11-01  8:01                   ` Eli Zaretskii
2013-10-31 22:50               ` Xue Fuqiao
2013-11-01 17:12                 ` Jay Finger
2013-11-01 18:25                   ` Stefan Monnier
2013-11-01 19:05                     ` Drew Adams
2013-11-01 19:25                       ` John Yates
2013-11-05 22:44                     ` Davis Herring
2013-11-01  1:40               ` Stefan Monnier
2013-11-01  2:13                 ` Leo Liu
2013-11-01  3:06                   ` Josh
2013-11-01  4:42                     ` Leo Liu
2013-11-01  5:55                       ` Josh
2013-11-01  8:33                         ` Jambunathan K
2013-11-02 10:25                           ` Xue Fuqiao
2013-11-01 15:04                       ` Drew Adams
2013-11-02  6:31                         ` Stephen J. Turnbull
2013-11-02  8:14                           ` Jambunathan K
2013-11-02  9:56                             ` Stephen J. Turnbull
2013-11-02 10:05                               ` [SPAM] " Jarek Czekalski
2013-11-02 11:00                                 ` Stephen J. Turnbull
2013-11-02 14:56                                   ` Jambunathan K
2013-11-02 16:59                                     ` Stephen J. Turnbull
2013-11-02 17:19                                       ` Jambunathan K
2013-11-03  8:41                                         ` Stephen J. Turnbull
2013-11-02 15:30                             ` Drew Adams
2013-11-02 17:03                               ` Jambunathan K
2013-11-03  0:59                           ` Stefan Monnier
2013-11-03  0:36                             ` Jambunathan K
2013-11-01 15:04                     ` Drew Adams
2013-11-01  8:04                   ` Eli Zaretskii
2013-11-01 15:04                   ` Drew Adams
2013-11-01  7:57                 ` Eli Zaretskii
2013-11-01 12:35                   ` Stefan Monnier
2013-11-01 19:26                     ` Eli Zaretskii
2013-11-01 19:55                       ` Stefan Monnier
2013-11-01 19:59                         ` Eli Zaretskii
2013-11-01 20:02                           ` Daniel Colascione
2013-11-01 20:20                             ` Eli Zaretskii
2013-11-01 23:35                               ` Josh
2013-11-02  7:00                                 ` Eli Zaretskii
2013-11-02 18:20                                   ` Josh
2013-11-02 19:35                                     ` Eli Zaretskii
2013-11-01 16:57                 ` Jay Finger
2013-10-31 21:03             ` Josh
2013-11-01  2:01               ` Stefan Monnier
2013-11-05 19:47             ` Mathias Dahl
2013-10-30 20:31       ` John Yates
2013-10-31 20:23     ` Richard Stallman
2013-11-01  7:40       ` Eli Zaretskii
2013-10-30  4:55   ` Stephen J. Turnbull
2013-10-31 13:39   ` Xue Fuqiao
2013-10-30  3:52 ` Eli Zaretskii
2013-10-30  4:22   ` Stefan Monnier
2013-10-31 20:23   ` Richard Stallman
2013-11-01  1:59     ` Stefan Monnier
2013-10-30  3:55 ` Eli Zaretskii
2013-10-30 10:36 ` Bastien
2013-10-30 10:39   ` Bastien
2013-10-30 10:49   ` Andreas Schwab
2013-10-31 20:22     ` Richard Stallman
2013-11-01  0:54       ` Leo Liu
2013-10-30 13:19 ` Jambunathan K
2013-10-30 14:53   ` Josh
2013-10-30 16:56   ` Jambunathan K
2013-10-30 18:07 ` Jambunathan K
2013-10-31 20:22 ` Richard Stallman
2013-11-01  9:25 ` Yuri Khan
2013-11-01 11:20   ` Eli Zaretskii
2013-11-01 12:57     ` Stefan Monnier
2013-11-01 14:31       ` Eli Zaretskii
2013-11-01 15:08       ` Yuri Khan
2013-11-02 17:36 ` Jambunathan K

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=jwvzjpoq4nw.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=bzg@gnu.org \
    --cc=dancol@dancol.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jay.finger@pobox.com \
    --cc=sdl.web@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.