unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex <agrambot@gmail.com>
To: npostavs@users.sourceforge.net
Cc: William Gilbert <gilbertw1@gmail.com>, 27281@debbugs.gnu.org
Subject: bug#27281: Fix nlinum missing line numbers.
Date: Sat, 10 Jun 2017 19:18:46 -0600	[thread overview]
Message-ID: <87o9tv2ufd.fsf@gmail.com> (raw)
In-Reply-To: <8737b7wkyx.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Sat, 10 Jun 2017 18:12:38 -0400")

npostavs@users.sourceforge.net writes:

> Alex <agrambot@gmail.com> 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?





  reply	other threads:[~2017-06-11  1:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 21:46 bug#27281: Fix nlinum missing line numbers William Gilbert
2017-06-10 11:51 ` npostavs
2017-06-10 14:35   ` Bryan Gilbert
2017-06-10 17:44   ` Alex
2017-06-10 22:12     ` npostavs
2017-06-11  1:18       ` Alex [this message]
2017-06-11  1:37         ` npostavs
2017-06-11  2:37       ` Bryan Gilbert
2017-06-11  2:50         ` Bryan Gilbert
2019-09-29 15:04           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9tv2ufd.fsf@gmail.com \
    --to=agrambot@gmail.com \
    --cc=27281@debbugs.gnu.org \
    --cc=gilbertw1@gmail.com \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).