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 19:18:46 -0600 Message-ID: <87o9tv2ufd.fsf@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 X-Trace: blaine.gmane.org 1497144015 18310 195.159.176.226 (11 Jun 2017 01:20:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Jun 2017 01:20:15 +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 Sun Jun 11 03:20: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 1dJrY3-0004XD-EH for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Jun 2017 03:20:11 +0200 Original-Received: from localhost ([::1]:60740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJrY8-0002fH-O6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Jun 2017 21:20:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJrXz-0002ds-LR for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 21:20:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJrXu-000470-M0 for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 21:20:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36886) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJrXu-00046w-Hv for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 21:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dJrXu-0003sE-8C for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2017 21:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Jun 2017 01:20: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.149714394114806 (code B ref 27281); Sun, 11 Jun 2017 01:20:02 +0000 Original-Received: (at 27281) by debbugs.gnu.org; 11 Jun 2017 01:19:01 +0000 Original-Received: from localhost ([127.0.0.1]:39563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJrWv-0003qf-0k for submit@debbugs.gnu.org; Sat, 10 Jun 2017 21:19:01 -0400 Original-Received: from mail-io0-f194.google.com ([209.85.223.194]:36840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJrWs-0003qS-Td for 27281@debbugs.gnu.org; Sat, 10 Jun 2017 21:18:59 -0400 Original-Received: by mail-io0-f194.google.com with SMTP id i93so7915840iod.3 for <27281@debbugs.gnu.org>; Sat, 10 Jun 2017 18:18:58 -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=uByxQ92T+d70Z1LBRxPfVpRxqNQhIUvARubiUM88DNw=; b=dFy1WDGWFS0m7Q4o1OxTPhy7gM+5cuQtd47VJydYW6kdcXBpADzIcatrMBMvLt92p5 jE1WzxVcU4FZaNeQHp4mvrxu2thlr1rNHgER4ch6lxh2TDWYgbL/6w7HbhndyiYtbc3N hIxNMiYdjJD5P1G2ZWzfcBjRZCgd4sOlvL2NMdhr7MweQpQKRi2paRrTKiwwt+eKzvwm 0GH2IlSqL22NUb/P+toJIBF6BwUEew0BPN7k5ZfC5UWdLX+rZvv0lqOhekOZJNOm22Yc Vej17S67IBkUoJiwUhIcWz7j4UtpZWYH9HryiOTBDsy/mKMbGFA5qALWMK6cp9kK/6Kv fWRg== 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=uByxQ92T+d70Z1LBRxPfVpRxqNQhIUvARubiUM88DNw=; b=oYCuOq+bOW7t9e16OSlWcJwF4AuxTtl43e92CWhcCZrLovARxPmplhni4hXPGdt+mV HoVC+9gNnquDRGBHBPSu9eV1tm7zTZNnuiXYsGvWBYp7WChnaNHJXVDZPKYHwhHC3Hr+ 6vLQube13JoRZ0uMO3M4Rxagf7/R15sQSAxATnvqsqmepNJ4/b20yoCV1547IVNQuimq Y5mwoSlhX1Z3dw0Vbis0RmmzIUwv9DWZuFPxmj+HvWfDYT/cZgPr+GNHQZzackTq27fm 8qGpRnquk71sknqM7ueOsGNoUeyyl3WKrOMbHo1OBj/2QfcCnbbuoavKblgGNUt/MWhk tNxg== X-Gm-Message-State: AKS2vOxUJyxX9fe0XT8RhyIl9sciGpV4cUGCakMyJ5KYmsSWgDkpHej/ yuE9zIJahqmaew== X-Received: by 10.107.41.12 with SMTP id p12mr1271797iop.126.1497143933380; Sat, 10 Jun 2017 18:18:53 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id 21sm2059337itz.6.2017.06.10.18.18.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Jun 2017 18:18:52 -0700 (PDT) In-Reply-To: <8737b7wkyx.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Sat, 10 Jun 2017 18:12:38 -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:133458 Archived-At: npostavs@users.sourceforge.net writes: > Alex writes: >>> >>> 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. > > 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. Well, in my case it seems that nlinum--region is being fed wrong start/limit values. > 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): That doesn't work in my case. However, for me the problem might be because of macrostep using with-silent-modifications. To test, calling (with-silent-modifications (delete-region (point) (scan-sexps (point) 1))) on an sexp and there will be missing line number(s). This only affects nlinum, and not linum. Is it possible to work around this in nlinum while still using with-silent-modifications?