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.bugs Subject: bug#28854: line-number-display-width erroneously returns 0 when ... Date: Sun, 15 Oct 2017 16:31:03 -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 1508110341 28987 195.159.176.226 (15 Oct 2017 23:32:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 15 Oct 2017 23:32:21 +0000 (UTC) To: 28854@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 16 01:32:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1e3sO4-00060Z-IH for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Oct 2017 01:32:05 +0200 Original-Received: from localhost ([::1]:58728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3sOB-0000aY-Uo for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Oct 2017 19:32:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3sO6-0000aI-7q for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 19:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3sO3-00056X-25 for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 19:32:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33401) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e3sO2-00056G-U2 for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 19:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e3sO2-00072G-LC for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 19:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Oct 2017 23:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28854 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Emacs Bug Reports Original-Received: via spool by submit@debbugs.gnu.org id=B.150811029427003 (code B ref -1); Sun, 15 Oct 2017 23:32:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Oct 2017 23:31:34 +0000 Original-Received: from localhost ([127.0.0.1]:42082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3sNZ-00071R-4w for submit@debbugs.gnu.org; Sun, 15 Oct 2017 19:31:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3sNX-00071E-Oi for submit@debbugs.gnu.org; Sun, 15 Oct 2017 19:31:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3sNR-0004bM-JM for submit@debbugs.gnu.org; Sun, 15 Oct 2017 19:31:26 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:46055) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e3sNR-0004b6-FW for submit@debbugs.gnu.org; Sun, 15 Oct 2017 19:31:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3sNQ-0000TQ-Dq for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 19:31:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3sNN-0004XJ-9r for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 19:31:24 -0400 Original-Received: from gateway20.websitewelcome.com ([192.185.45.27]:15830) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e3sNN-0004Gq-1o for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 19:31:21 -0400 Original-Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway20.websitewelcome.com (Postfix) with ESMTP id A7C7C400C3945 for ; Sun, 15 Oct 2017 18:31:04 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id 3sN6eIAC7c72g3sN6eykwZ; Sun, 15 Oct 2017 18:31:04 -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:To:From:Message-ID:Date: Sender:Reply-To:Cc: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=Lu7Vay7Frus6phvbsy/bcheik1R51/JNRDd1nFQHC1M=; b=DAaUb06abhREz2zW63ZKCj60rI fNSxKd9uqvajIh183XnXEIaG22pVAiVcT5dQPdcQIPxvldS0jdeXlYQ4KH0dOPgCyO8vf5VciKAgM OUzxfzgsXQrj9GikWdTIYpmq3rGmefV8D/4We9igHStYZdvDhQHEP+TVPD3CtY1LEOz1xrbtTkJe3 yh7PNu/UHhpSJDE4e+DEgftL46D0gk2VVjH7EOuljlKm8AsTvv7CuahKAcj1FSBcdxV/a256OzHaF SGCrjKiAeZyDJRtg9MzpYbeDzpp9UH9Nw/cEg62BpOR7yFavm3YstajwYSoeKWi85ijvK7gnjgRUt nXp0ouag==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:53189 helo=server.private) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.87) (envelope-from ) id 1e3sN5-002erg-RT for bug-gnu-emacs@gnu.org; Sun, 15 Oct 2017 18:31:03 -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: 1e3sN5-002erg-RT 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]:53189 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-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138484 Archived-At: line-number-display-width erroneously returns 0 when at the end of a very long line and `truncate-lines` is non-nil. STEP #1: Launch a current version of the master branch without any user configuration; i.e., emacs -q. STEP #2: (setq truncate-lines t) STEP #3: (display-line-numbers-mode 1) STEP #4: Create a long line that is about 3 times the width of the window. With point at the end of that line, evaluate: (line-number-display-width 'pixelwise) The result returned is 0, which is incorrect. BACKGROUND: I am working on developing crosshairs as part of feature requests #17684 and #22873, and I need the line number display width (pixelwise) to accurately calculate when the horizontal ruler should begin to draw -- i.e., it.current_x + lnum_pixel_width = start drawing ... I am also enabling compatibility with the fnctions scroll-right and scroll-left, and when horizontal scrolling the current line. Thanks, Keith