From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.devel Subject: Re: Efficiently using MOVE_IT_... to gather a plethora of information. Date: Tue, 22 Aug 2017 13:17:38 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1503433143 32560 195.159.176.226 (22 Aug 2017 20:19:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 22 Aug 2017 20:19:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 22 22:18:56 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkFdS-0007fy-3q for ged-emacs-devel@m.gmane.org; Tue, 22 Aug 2017 22:18:50 +0200 Original-Received: from localhost ([::1]:52589 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkFdU-0003HL-BC for ged-emacs-devel@m.gmane.org; Tue, 22 Aug 2017 16:18:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkFcQ-0003FF-PY for emacs-devel@gnu.org; Tue, 22 Aug 2017 16:17:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkFcM-0000kx-TP for emacs-devel@gnu.org; Tue, 22 Aug 2017 16:17:46 -0400 Original-Received: from gateway23.websitewelcome.com ([192.185.49.177]:26355) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dkFcM-0000kd-MC for emacs-devel@gnu.org; Tue, 22 Aug 2017 16:17:42 -0400 Original-Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 1D7C02B39E for ; Tue, 22 Aug 2017 15:17:40 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id kFbQdQpBqdHTnkFbQdo3oz; Tue, 22 Aug 2017 15:16:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ElENNLZwVGv1FOwWWv9KT3gI7D4Madn/5+9tIVMwJQI=; b=QfFs2X8XCt0twoZnAr76b0+byG +GuN23RaS7rbYI5XkggNHK2s6INsE1Ygd83VgiFU5+J3ZbaUTObgmxWWCc6a+xfzXvtu2k/TUUIXw OsaUfavq/8Hxn+85K0KKJwUiubbAJpSI+nNotvrTwA+LG3iuIqY+FQOrJJRAbK3BlN18cUi2zCCnx /RGV4XoFzKAc18Mbp/U6WI6i+F2H6D4V3he6wN+bdVWlMy3PMh2WsFyolEBjsyU1kejFp08CBTRty I1nYU7zTsXozQySWo4QyroxQiusBtt+4oC5y5wfYDw0FUjkQpI5dHMFe0IqrrkwXKe7pz4w4ytgl5 z15b4TiA==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:52041 helo=server.local) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.87) (envelope-from ) id 1dkFcJ-002L4A-B1; Tue, 22 Aug 2017 15:17:39 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Exim-ID: 1dkFcJ-002L4A-B1 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.local) [45.48.239.195]:52041 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.49.177 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217700 Archived-At: 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 > > * * * > > 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.