all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: emacs-devel@gnu.org
Subject: Re: Efficiently using MOVE_IT_... to gather a plethora of information.
Date: Tue, 22 Aug 2017 22:16:41 +0300	[thread overview]
Message-ID: <83inhf9zvq.fsf@gnu.org> (raw)
In-Reply-To: <m2y3qba27i.wl%esq@lawlist.com> (message from Keith David Bershatsky on Tue, 22 Aug 2017 11:26:25 -0700)

> Date: Tue, 22 Aug 2017 11:26:25 -0700
> From: Keith David Bershatsky <esq@lawlist.com>
> 
> The method that I am presently using to calculate coordinates is inefficient and relies upon a unique set of circumstances that must exist for everything to work.  I am looking for the most efficient approach to calculate certain values at three locations of each visible screen line -- `point` and coordinates (x/y/hpos/vpos):
> 
> 1.  Beginning of each visible screen line.
> 
> 2.  Ending of each visible screen line.
> 
> 3.  The current X axis aligned with the cursor on each visible screen line.

You need to do this for _every_ screen line in the window?  If so,
this will be terribly slow, so slow as to be impractical in some
situations.

Why do you need all those coordinates of all the screen lines?

Btw, if variable fonts are used, the cursor positions on two adjacent
lines might not be aligned, so I'm not sure I understand how your
feature is supposed to work in that case.

> This project utilizes the MOVE_IT family within xdisp.c.  We would probably all agree that we start the IT at w->start, but where do we go from there is the question.  Is the following connect-the-dot the most efficient approach to move the IT to each location from window-start to window-end?
> 
> 1  2  3
> 
> 4  5  6
> 
> 7  8  9

The move_it_* functions all proceed in the buffer logical order, so
you are traversing all these places anyway.  IOW, yes, this is the
most efficient order.  But it will be very slow, if you need to do
this for all screen lines in a window.



  reply	other threads:[~2017-08-22 19:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 18:26 Efficiently using MOVE_IT_... to gather a plethora of information Keith David Bershatsky
2017-08-22 19:16 ` Eli Zaretskii [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-08-22 20:17 Keith David Bershatsky
2017-08-23  3:58 ` Stefan Monnier
2017-08-23  8:46   ` martin rudalics
2017-08-23  8:49     ` martin rudalics
2017-08-23 20:56     ` Stefan Monnier
2017-08-23 17:21   ` Eli Zaretskii
2017-08-23 18:08 ` Eli Zaretskii

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=83inhf9zvq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=esq@lawlist.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.