all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark Lillibridge <mark.lillibridge@hp.com>
To: 4996@emacsbugs.donarmstrong.com
Subject: bug#4996: problem found
Date: Fri, 20 Nov 2009 22:06:46 -0800	[thread overview]
Message-ID: <200911210606.nAL66k3Z017990@mailhub-pa1.hpl.hp.com> (raw)


    Ah!  I have figured out the problem.  report-emacs-bug adds the
intangible property to the instructions.  Normally, forward-line skips
past text with the intangible property and this is what happens when
linum-update is called normally, hence those lines do not receive line
numbers normally.  [UPDATE: this is a different bug in linum as it
normally reports incorrect line numbers in the presence of intangible
text; ironically, the case I was reporting is one of the few when it
reports the *correct* line numbers.  Consider this a bug report for the
behavior of the window-scroll-functions callers.]

    However, for some reason inhibit-point-motion-hooks is set to t when
the window-scroll-functions hooks are called.  This causes linum-update,
which uses forward-line, to number the intangible lines only when called
from the scrolling hook.

    The following code change, which fixes the bug, demonstrates this:
[UPDATE: this actually breaks linum further]

(defun linum-after-scroll (win start)
  (let ((old inhibit-point-motion-hooks))
    (setq inhibit-point-motion-hooks nil)
    (linum-update (window-buffer win))
    (setq inhibit-point-motion-hooks old)))


    I am not sure if the actual bug here is with the callers of
window-scroll-functions incorrectly setting inhibit-point-motion-hooks
or with linum-after-scroll (in which case, the documentation for
window-scroll-functions should mention this behavior).  If the later, a
better patch should be used that uses unwind-protect or the like.

- Mark






             reply	other threads:[~2009-11-21  6:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-21  6:06 Mark Lillibridge [this message]
2009-11-21  6:24 ` bug#4996: problem found Mark Lillibridge
     [not found] ` <mailman.11219.1258786051.2239.bug-gnu-emacs@gnu.org>
2009-11-21  8:25   ` Markus Triska

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

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

  git send-email \
    --in-reply-to=200911210606.nAL66k3Z017990@mailhub-pa1.hpl.hp.com \
    --to=mark.lillibridge@hp.com \
    --cc=4996@emacsbugs.donarmstrong.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.