From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#27281: Fix nlinum missing line numbers. Date: Sat, 10 Jun 2017 07:51:17 -0400 Message-ID: <87h8zovz62.fsf@users.sourceforge.net> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1497095418 8952 195.159.176.226 (10 Jun 2017 11:50:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Jun 2017 11:50:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: 27281@debbugs.gnu.org To: William Gilbert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 10 13:50: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 1dJeu8-0001jv-Hz for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Jun 2017 13:50:08 +0200 Original-Received: from localhost ([::1]:58056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJeuD-0005to-H7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Jun 2017 07:50:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJeu7-0005s8-BR for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 07:50:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJeu2-0005CG-3h for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 07:50:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35168) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJeu2-0005CA-05 for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 07:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dJeu1-0008BM-PB for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 07:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Jun 2017 11:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27281 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27281-submit@debbugs.gnu.org id=B27281.149709538631424 (code B ref 27281); Sat, 10 Jun 2017 11:50:01 +0000 Original-Received: (at 27281) by debbugs.gnu.org; 10 Jun 2017 11:49:46 +0000 Original-Received: from localhost ([127.0.0.1]:37845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJetm-0008Am-0S for submit@debbugs.gnu.org; Sat, 10 Jun 2017 07:49:46 -0400 Original-Received: from mail-it0-f46.google.com ([209.85.214.46]:36520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJetk-0008Aa-Ks for 27281@debbugs.gnu.org; Sat, 10 Jun 2017 07:49:44 -0400 Original-Received: by mail-it0-f46.google.com with SMTP id m47so8432497iti.1 for <27281@debbugs.gnu.org>; Sat, 10 Jun 2017 04:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ME29fCb8/eCMiwUGN51u96AoN69ICXFSiuxyPsFXCa4=; b=rNzOq/9Xqj7Xf0BxZ2eWaobrnnnjz5jwcI9PSDZnnLrj9N1F6SphioniS6rNB9cucE DgaJdqMg5Wh6V1Td0aDuoWnr+5DNDoo4Y4hj/g//btL6Xubr3IEoh1DDqBjKaZtyzm/z zW5cZezp15snLp3rtDiTlO9ZBmu6mMd43Qd/jGRQkc7HeUZtVPcuEH7Tz1ta7xjr8ijk F/W8yO5p1tDYMBH+Em7fRgvZJePUHRUo4jYfgMs+tnGKR1caPFaZ8CiuroKVriJ4Pjwj A5iIe/30SINK3bLEehklYPQZ7d8Pd9Hccx7SYK1hJQ7p9Y4m89TQlugrhf1X9/Lhpc7C i92Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=ME29fCb8/eCMiwUGN51u96AoN69ICXFSiuxyPsFXCa4=; b=JUNyLp/VML/2EAeyjWaNG5YcyV4Ty/wNuGak4UaCvuzLOO9wRxvF3Mm11d5SFPtNOq VefV5Fe/fgB+qhgILbF3EjqFOpYD4cMRD5iJURnSy2FtkPoFsR4dy8Wo4eOVeHW4grDU z/nyESGZDFUZ6IXwuJVdI6d9uqa2y+NyWnHzMP70rX7Ks1napL6A1aGr+gjzoOjSeAK8 Pn/Ou2wqHcWYjTeuqSV5NJrtpWX9Fz4bbu+aPJrvTuuIMed+B4xzOQFa2wx2Vv9K6chA jvSNABcS/S4Nn2mvqae+WAbHMeGI1ti29Q+1mP5nXCl2KzQ4ZA4jfRtGdLJSmaTgpPyF AKPw== X-Gm-Message-State: AODbwcAZBwjhhi6BLAcYLVo3w5oJOd+8GD+C1Q2OHzI/rUlmcaUjRBkM iO7bHlTIYcRr0u05 X-Received: by 10.36.86.75 with SMTP id o72mr4131641itb.117.1497095378950; Sat, 10 Jun 2017 04:49:38 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id w16sm1765032iod.26.2017.06.10.04.49.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Jun 2017 04:49:38 -0700 (PDT) In-Reply-To: (William Gilbert's message of "Wed, 7 Jun 2017 17:46:29 -0400") 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:133439 Archived-At: William Gilbert writes: > I've been working to track to down a bug where line numbers are > occasionally missing when using nlinum mode. Currently there is a package > written to workaround the problem that has a picture and description of the > problem: https://github.com/hlissner/emacs-nlinum-hl. > > After extensive debugging I've tracked the problem down to the > 'nlinum--region' function. Specifically the while loop check that > determines if '(point)' is less than the limit. I've found that the problem > exists when '(point)' is exactly equal to 'limit'. In this scenario the > loop terminates and the last line in the region is not provided with a line > number. Do you know how to reproduce this scenario? > I was able to remedy the problem by changing the condition from > 'less than' to 'less than or equal to', which will allow the last line in > the region to be properly assigned a line number. This sounds like a workaround, possibly to a bug in jit-lock. Or perhaps we need to return a list of the form (jit-lock-bounds BEG END) from nlinum--region?