all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Efficiently using MOVE_IT_... to gather a plethora of information.
Date: Tue, 22 Aug 2017 13:17:38 -0700	[thread overview]
Message-ID: <m2r2w373x9.wl%esq@lawlist.com> (raw)

Thank you, Eli, for reading this thread and also for confirming that the connect-the-dots diagram 1 to 9 is the most efficient order for moving IT to gather data.

On my wish list of things to do is to extract your new built-in line numbers and incorporate them into an older version of the master branch that I am still using because certain unrelated bugs prevent me from using the current master branch in my preferred daily workflow.  For the past few years, I have been generating line numbers on just the visible window and that is why I need the beginning of the lines.

Your suggestion about being smarter in the data gathering is well taken, and I will give it some serious thought as I move forward in the development of the vertical line feature.  I have been gathering data for each screen line at all three (3) locations and storing that data in a list -- I'll call this "the whopper/everything".  Once all of the data is gathered, I iterate over each element of the list and see whether certain criteria is met -- e.g., this element is for the beginning of a line, so put line numbers; this element is for the end of a line, so put pilcrows and maybe part of a floating vertical line (tracking the cursor position); this element is aligned with the real cursor and we are in the middle of a line of text, so draw a portion of thin vertical line through the text (t
 racking the cursor position).  Until just a few days ago, I had no solution for the conflict between buffer-display-table pilcrows and the overlay after-string -- however, the invention of glyphless
  bar fake cursors should resolve that problem by eliminating the need for overlay after-strings.

Based upon your comments about there being no magical way of moving IT more efficiently, I will work on coming up with a set of criteria to move IT sparingly to just the essential locations instead of "the whopper/everything".

I have been using mono-spaced fonts since day one and have never thought about how these feature requests might be affected by variable fonts.  I'll give that some thought in the coming days/weeks/months/...  My initial impression would be that a vertical line indicating the fill-column would not be helpful to a user with variable fonts; however, the vertical line that tracks the cursor position might be a useful feature for certain situations depending upon a user's preference and what may be happening in the visible window.

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

DATE:  [08-22-2017 12:16:41] <22 Aug 2017 22:16:41 +0300>
FROM:  Eli Zaretskii <eliz@gnu.org>
> 
> * * *
> 
> 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 20:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 20:17 Keith David Bershatsky [this message]
2017-08-23  3:58 ` Efficiently using MOVE_IT_... to gather a plethora of information 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
  -- strict thread matches above, loose matches on Subject: below --
2017-08-22 18:26 Keith David Bershatsky
2017-08-22 19:16 ` 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=m2r2w373x9.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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 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.