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: Obtain X / HPOS with move_it_to at eol when buffer-display-table line-feed Date: Thu, 31 Aug 2017 09:07:46 -0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1504195760 22464 195.159.176.226 (31 Aug 2017 16:09:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 31 Aug 2017 16:09:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 31 18:09:10 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 1dnS1f-00055C-B6 for ged-emacs-devel@m.gmane.org; Thu, 31 Aug 2017 18:09:04 +0200 Original-Received: from localhost ([::1]:56583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnS1m-0008Jg-9W for ged-emacs-devel@m.gmane.org; Thu, 31 Aug 2017 12:09:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnS0b-0008Dc-Vz for emacs-devel@gnu.org; Thu, 31 Aug 2017 12:08:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnS0X-0003np-V9 for emacs-devel@gnu.org; Thu, 31 Aug 2017 12:07:57 -0400 Original-Received: from gateway22.websitewelcome.com ([192.185.47.206]:17937) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnS0X-0003nW-OI for emacs-devel@gnu.org; Thu, 31 Aug 2017 12:07:53 -0400 Original-Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 987EB1DB57 for ; Thu, 31 Aug 2017 11:07:49 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id nS0GdsfKPRtUXnS0GdFt6k; Thu, 31 Aug 2017 11:07:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Cc :To:From:Message-ID:Date:Sender:Reply-To: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=BfKqUsKLzWTT09fmI8MKkDEbthstYOU98Q/p+OEQVG0=; b=ZqZXPuRuU+FAZGrtwXyy4FXzpb pP8alvSL7hjIBHKAOfjdXqixRTL105385ur5cjMj8pvy+XwNbJB65OzQqLpm+/EW8gpdwh8q+P1wQ kiaEa+zkDbhNMkc9HGkjufADUqdUS5QZiCoCY2Xm7w0df2ba2O6KxFuKn/5AksbPyQT/UqKIK5FIR Hiw4NDxYlFjAHDTpKLH18M0UCBGX8rGK81nVnxCG0slIV1i8ggb2iMt6EJX7BFjmbvKb1JYQTyroH uaEu+6j0jcFgOEaVmRHbJXXDzHvaQV2xPRFlQEI1ohFOfLnjhsk63lKXArvpfnyLzKAk4DrauFeS3 Q3y2gfeQ==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49506 helo=server.private) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.87) (envelope-from ) id 1dnS0Q-004M93-Pm; Thu, 31 Aug 2017 11:07:46 -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: 1dnS0Q-004M93-Pm X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.private) [45.48.239.195]:49506 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.47.206 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:217894 Archived-At: Thank you, Eli, for the suggestion to stop IT before it gets to the new l= ine (which is displayed using the display-table entry). The argument of it.last_visible_x is important for the very last line of = the visible window, or else IT will not continue looking for POS until it= reaches the window-end. I am assuming by your comments that we are looking for EOL_POSITION minus= 1 point, and from there I should examine the character at that location = to obtain its width and then add that width to it.current_x in order to g= et the X of the pilcrow beginning .... This is a work in progress and I'll keep plugging away as time permits. Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DATE: [08-30-2017 12:03:52] <30 Aug 2017 22:03:52 +0300> FROM: Eli Zaretskii >=20 > * * * >=20 > > With respect to eol pilcrows, move_it_to gives X and HPOS coordinates= for an invisible \n to the right of the pilcrow. We essentially have =C2= =B6\n, and IT cannot see the pilcrow. The X and HPOS returned by move_it= _to gives us =C2=B6|\n instead of |=C2=B6\n. Stated another way, X and H= POS are reported as being on the end of the pilcrow, instead of the begin= ning of the pilcrow. >=20 > But this is because you told move_it_to to move to the end of the > screen line, by specifying it.last_visible_x - 1 as the X coordinate. > What happens if you tell it to stop at the buffer position of the > newline instead? >=20 > > Perhaps there is some way to help move_it_to see the pilcrow, or at l= east pretend that it exists? >=20 > move_it_to always stops when it delivers characters from the buffer, > so if there are display or overlay strings, or glyphs come from a > display table, it will go on until those are exhausted, and it is back > at the next character from buffer text. So you should try stopping it > before it gets to the newline, which is displayed using the > display-table entry.