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: Problems with move_it_in_display_line_to X when tabs exist. Date: Wed, 06 Dec 2017 08:24:17 -0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1512577562 23674 195.159.176.226 (6 Dec 2017 16:26:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 6 Dec 2017 16:26:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 06 17:25:54 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 1eMcW6-0005kh-69 for ged-emacs-devel@m.gmane.org; Wed, 06 Dec 2017 17:25:51 +0100 Original-Received: from localhost ([::1]:56442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMcW7-000834-0y for ged-emacs-devel@m.gmane.org; Wed, 06 Dec 2017 11:25:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMcUv-0007hO-1a for emacs-devel@gnu.org; Wed, 06 Dec 2017 11:24:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMcUs-0002rc-Cf for emacs-devel@gnu.org; Wed, 06 Dec 2017 11:24:37 -0500 Original-Received: from gateway33.websitewelcome.com ([192.185.146.21]:27554) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eMcUs-0002jI-6H for emacs-devel@gnu.org; Wed, 06 Dec 2017 11:24:34 -0500 Original-Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway33.websitewelcome.com (Postfix) with ESMTP id CF133183410C for ; Wed, 6 Dec 2017 10:24:18 -0600 (CST) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id McUcev9LHuMnyMcUcemPGn; Wed, 06 Dec 2017 10:24:18 -0600 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=rtOz9Wg6amE6Hs3Bod33EE80YfA6AVycRI36fgCkeiE=; b=irK7wC8DAn6+JkMYLGaZWOo0Is fxknPF8qnyAaiSbPUFM/iE1KgiO/AXqHf/7JMGvlRBpNpIhSU7XlxIQtBuazioby6jkpiDgCpl3Ds F8uCZ8Cy6olmbjut8YB673WOKm4ajMl+9RCLAI97cl354P4CVmBLgOC2nEQuMirN4Bn626aUKXyVW emR3+3PkLLx/6WbTlYIV8RFYJ8LikZ3DeywyBFl+xhU4/WXb+GZ5Q4TtdbHEjB3d101IMFE/gVtqi Lw/t5E6ZyRntSSSRRBEAN2l2PgZjP9wEWypTszz8HLQMs4NHd+b0+pmcpUp/kt5SgZDYYRTyIT5d9 OXceRuEw==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:50288 helo=server.private) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.89) (envelope-from ) id 1eMcUb-0015q5-Pb; Wed, 06 Dec 2017 10:24:17 -0600 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-Source-L: No X-Exim-ID: 1eMcUb-0015q5-Pb 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]:50288 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.146.21 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:220765 Archived-At: I wanted to give you an update on my efforts. I was unable to isolate different results due to the platform upon which Emacs was built/run. I did, however, track down a few areas in Emacs 26 where it->pixel_width is being set incorrectly when I am running my custom code. When the continuation_lines_width is incorrect, the code in the vicinity of line 28212 sets an erroneous it.pixel_width. Inasmuch as I am moving along the length of the current line by it.pixel_width, the X and/or HPOS coordinates get skewed. I tried manually setting continuation_lines_width to 0 at both locations mentioned below, and it.pixel_width gets reported correctly. However, this solution is not ideal because the STRETCH does not shrink and expand as it would normally do as things change in the buffer; e.g., adding/removing the right vertical scroll-bar affects whether the STRETCH would normally be either 1 or 2 columns wide. I feel as though I am zeroing-in on the underlying issue, but more work is ne eded in the coming days/weeks as time permits: xdisp.c:9563 it->continuation_lines_width += it->current_x; xdisp.c:21671 it->continuation_lines_width += x; xdisp.c:28212 it->pixel_width = next_tab_x - x0; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DATE: [12-04-2017 08:26:04] <04 Dec 2017 18:26:04 +0200> FROM: Eli Zaretskii > > > Date: Sun, 03 Dec 2017 19:01:47 -0800 > > From: Keith David Bershatsky > > Cc: emacs-devel@gnu.org > > > > I built Emacs 26 for Windows (using my modification patch) and ran the same series of tests along with taking a screen-shot at the link below. it.pixel_width is correct on Emacs 26 for Windows, whereas it.pixel_width is wrong on Emacs 26 for OSX 10.6.8. > > I'm surprised you see a difference. This code is supposed to be > platform independent. So I guess you need to examine all the places > in xdisp.c which are "#ifded NS" or "#ifndef NS". > > * * *