From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.bugs Subject: bug#27281: Fix nlinum missing line numbers. Date: Sat, 10 Jun 2017 11:44:26 -0600 Message-ID: <87h8znu491.fsf@gmail.com> References: <87h8zovz62.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1497116716 12087 195.159.176.226 (10 Jun 2017 17:45:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Jun 2017 17:45:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: William Gilbert , 27281@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 10 19:45:10 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 1dJkRi-0002gK-BC for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Jun 2017 19:45:10 +0200 Original-Received: from localhost ([::1]:59273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJkRl-0001hU-SU for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Jun 2017 13:45:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJkRf-0001fj-4h for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 13:45:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJkRa-0005tO-8p for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 13:45:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36493) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJkRa-0005tK-5E for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 13:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dJkRZ-0006sK-Uq for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 13:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Jun 2017 17:45: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.149711668126390 (code B ref 27281); Sat, 10 Jun 2017 17:45:01 +0000 Original-Received: (at 27281) by debbugs.gnu.org; 10 Jun 2017 17:44:41 +0000 Original-Received: from localhost ([127.0.0.1]:39170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJkRE-0006ra-VJ for submit@debbugs.gnu.org; Sat, 10 Jun 2017 13:44:41 -0400 Original-Received: from mail-it0-f67.google.com ([209.85.214.67]:33197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJkRC-0006rN-SW for 27281@debbugs.gnu.org; Sat, 10 Jun 2017 13:44:39 -0400 Original-Received: by mail-it0-f67.google.com with SMTP id l6so8512369iti.0 for <27281@debbugs.gnu.org>; Sat, 10 Jun 2017 10:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=onIOe5qFlMxBSeNAb2hwCBjFq7fnEIid/7djCjViZIo=; b=pHjV0H/55MMfPgUJZ8oxzotqv2SLTjWXvvoFi7O9YQClWISlhYCQ9anJUh0RmVM7xb qrIB3Xtn71uu2M2xYeca7oQKREHvnRhh8SNE4jP9JDaInhohIlEtxGy1mUX8WhQmbuVk RBLzaMGBeXg8jSoja3kvSlrmheLZ8uQ+wDwodVF/9rMWrk+GsS138Cxkoj9Q0ifkrHL/ r4bHAEzcS76CYkrxCNzUrsf3noEPRcAQSutAiFjxnJYQBg7BMsPJLEATFTjQwWS1MJwY 1BFbKBWCKtmqancLlVD4lha3DB6x6T+1wijuBwMO/V+DoDPElcUZSvEyY8dYCHLo++YJ W94Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=onIOe5qFlMxBSeNAb2hwCBjFq7fnEIid/7djCjViZIo=; b=IBmpt0oGL0SYURbA5FV4z6Ojun/h+8IL5ktPRcGB9Oz2v0nrfN+/Q4ABcy7C4OGwrL thGDVp8gLL3a0enqlAGAbo7NYBBo0zINtysP3a1Ubt7F4wto54zDUa5uPYHW2g1fRc9S Uqtf4kFU6TWiyYpbfdQA+TOQXdrUK8Vu2QsWyWERttTN+TkVgnlxa9oPXugI+2mHwbfb ylDArOAcDB/+/U+UXn36CgFU1DHyp5kUIpVhEm877QydXJnIgvwRrCA7lA7ysEkRArPQ 8rxnWlGbzQk49W7njAc/2HJi7sjBLQzWia6ONPtq63gRwp6rGnsEDdjNGW2uAitUqMHP FoiA== X-Gm-Message-State: AODbwcDksBCFv3XwYSqh0B3rCIzPKQ6nI9uKFa0ZrMbxL7mpVnmI2c4W qVDya6HP/LriWmIR X-Received: by 10.36.222.69 with SMTP id d66mr5304884itg.14.1497116672963; Sat, 10 Jun 2017 10:44:32 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id b39sm1539152itd.31.2017.06.10.10.44.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Jun 2017 10:44:31 -0700 (PDT) In-Reply-To: <87h8zovz62.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Sat, 10 Jun 2017 07:51:17 -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:133451 Archived-At: npostavs@users.sourceforge.net writes: > 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? FWIW I've encountered this issue before and this diff does not solve the problem for me. I mostly see it when using the 3rd-party package macroexpand with nlinum. Expanding and closing a macro will leave several lines with no line number (from the 2nd line of the macro until the last line of the macro). I've tried to use edebug on nlinum--region to figure out what's going on, but it doesn't seem to be triggering for some reason.