From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Bryan Gilbert Newsgroups: gmane.emacs.bugs Subject: bug#27281: Fix nlinum missing line numbers. Date: Sat, 10 Jun 2017 22:37:04 -0400 Message-ID: <0cc87a2c-d024-edda-bce1-671c130d46de@gmail.com> References: <87h8zovz62.fsf@users.sourceforge.net> <87h8znu491.fsf@gmail.com> <8737b7wkyx.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1497148696 13771 195.159.176.226 (11 Jun 2017 02:38:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Jun 2017 02:38:16 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 Cc: Alex , 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 Sun Jun 11 04:38:12 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 1dJslW-0003J0-F8 for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Jun 2017 04:38:10 +0200 Original-Received: from localhost ([::1]:60870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJslb-0001FT-K2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Jun 2017 22:38:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJslS-0001EP-7d for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 22:38:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJslP-0005JH-47 for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 22:38:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36919) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJslO-0005JD-Um for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 22:38:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dJslO-0005ce-P7 for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 22:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bryan Gilbert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Jun 2017 02:38:02 +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.149714863321543 (code B ref 27281); Sun, 11 Jun 2017 02:38:02 +0000 Original-Received: (at 27281) by debbugs.gnu.org; 11 Jun 2017 02:37:13 +0000 Original-Received: from localhost ([127.0.0.1]:39594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJska-0005bP-SK for submit@debbugs.gnu.org; Sat, 10 Jun 2017 22:37:13 -0400 Original-Received: from mail-yb0-f175.google.com ([209.85.213.175]:36533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJskZ-0005b1-5G for 27281@debbugs.gnu.org; Sat, 10 Jun 2017 22:37:11 -0400 Original-Received: by mail-yb0-f175.google.com with SMTP id o9so21634942yba.3 for <27281@debbugs.gnu.org>; Sat, 10 Jun 2017 19:37:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=GEy8Dav5rctgvv1hIQKP6oQ8VQscCCrXME0F2tUEWH8=; b=JNOe91jWxr/ae8ZKw7r7sQ9syUlCeLfs6Gb81ItXnoHiLu//RFC/B+Pi2JEbF25mMf w+DqCc5RSbOYba6R2IEHE9h55OOYMaIDyXcVY0zLooKp5oq/56VvHXuQaR3BCdID1DIK tXwrzmJ42U5OJhtU7QE5C/n9RmYRpovWIcCQHjBPiCKVIyVophKBdGPVcK0rhBQnWVZv j2yVd/AqcsvgFkoNXiX7hIaw9sn7gaPiJPWkQ/tjDlKayDBJcfxd4pK3xUBAL/MLK+Ha XzNGj8pVTgw9e40DP9C6nqMTWfvJQXAnJYbpJZaWUF1PhS3UG+bhGAdqWHxLaoXEQHzN hLsw== 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:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=GEy8Dav5rctgvv1hIQKP6oQ8VQscCCrXME0F2tUEWH8=; b=G2a25rG7XvdWPrd0dAYb1vDyOrjnXz0gtQd6RWok85j6rIRT4K+7/cr1bF5sAvoYsd qLFK0Ix7jnkVKEkFTZW8wGOXjdZntDULmJ/OnPGqmMppxA0lq6osve/kc5OZ/hyDb6Z4 vDIgUzxsdmXZDplMEXkz28B2B2tENrJ2ln3IvEvm2KGoEdk7+fwIXanOO7cxDfgd5bbm Nwz8uXhDCtjkDdjGSp61hv+doR/9NRb+t9j1KthfULa/THe5EVovGNfqwD3JgD7C3K36 g4qdsIK92vH8i27NbcDQM5P+Blvz3uJWUCI5wvHsEvdPpGdNjdruIcjFUBDC1fqxJDxb KVTA== X-Gm-Message-State: AODbwcDh7dyQgQrR5nURp2jrJnZCAkFsjpmM0gBUGTZ3ZYZQmy6m3rsQ AYwhST1xx84crg== X-Received: by 10.37.172.193 with SMTP id x1mr19221276ybd.1.1497148625576; Sat, 10 Jun 2017 19:37:05 -0700 (PDT) Original-Received: from [10.0.0.12] (23-116-242-116.lightspeed.chtnsc.sbcglobal.net. [23.116.242.116]) by smtp.gmail.com with ESMTPSA id 202sm2312693ywy.48.2017.06.10.19.37.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Jun 2017 19:37:04 -0700 (PDT) In-Reply-To: <8737b7wkyx.fsf@users.sourceforge.net> 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:133461 Archived-At: On 06/10/2017 06:12 PM, npostavs@users.sourceforge.net wrote: > I suspect the debugger is suppressed while jit-lock occurs. You would > need to log things silently and print it later. I think > 'jit-lock--run-functions' and 'jit-lock-fontify-now' would be > interesting targets. Something easy to check would be if there are > certain values of 'jit-lock-functions' needed to trigger this (apart > from nlinum--region of course). Here's my guess as to a fix (untested): Applying that fix seemed to solve the problem! I had to make a slight modification to put the 'jit-lock-bounds' function call inside the 'let', but other than that it seems to work well. I've yet to see the problem since applying the patch and my 'bad' perspective worked properly as well. Here's the slightly modified diff: diff --git a/packages/nlinum/nlinum.el b/packages/nlinum/nlinum.el index ca4f949fc..82872d571 100644 --- a/packages/nlinum/nlinum.el +++ b/packages/nlinum/nlinum.el @@ -297,7 +297,8 @@ it may cause the margin to be resized and line numbers to be recomputed.") (save-excursion ;; Text may contain those nasty intangible properties, but ;; that shouldn't prevent us from counting those lines. - (let ((inhibit-point-motion-hooks t)) + (let ((inhibit-point-motion-hooks t) + (end start)) (goto-char start) (unless (bolp) (forward-line 1)) (remove-overlays (point) limit 'nlinum t) @@ -321,9 +322,10 @@ it may cause the margin to be resized and line numbers to be recomputed.") ;; (run-with-idle-timer 0.5 nil #'nlinum--flush-overlays ;; (current-buffer))) (setq line (1+ line)) - (zerop (forward-line 1)))))))) + (setq end (line-end-position)) + (zerop (forward-line 1)))))) ;; (setq nlinum--desc (format "-%d" (nlinum--ol-count))) - nil) + `(jit-lock-bounds ,start . ,end))) ;;;###autoload (define-globalized-minor-mode global-nlinum-mode nlinum-mode