开发者

Problems with next-line autoscrolling

I am getting problem with autoscrolling with next-line in emacs. When i get to the edge of the screen http://i.stack.imgur.com/lfqEL.png and making next-line sometimes I am not scrolled, and pointer aims to the center of the CURRENT screen, not the NEXT screen. http://i.stack.imgur.com/FPbuC.png (so if i hold C-n pointer will run endlessly through this screen)

I am getting same things with forward-line, sometimes with forward-page. I am not getting the same with previous-line autoscrolling, it works fine.

I don't know why. I only noticed, that when I have more long lines, and screen is splited vertically, this thing happens very fast(C-x 3 C-x 3, scrolling from the beginning of my 1000-lines .emasc file is a fast way to reproduce this bug).

Emacs -Q, (setq truncate-lines nil) doesn't h开发者_如何学Pythonave it. Emacs, (setq truncate-lines t) doesn't have it too.

If you know anything about what can cause this troubles, please reply.


One potential source for this issue seems to be setting the scroll-conservatively variable.

http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/0a7a9c730c037d57

I noticed that when moving down through big files, sometimes the cursor will jump from bottom of screen to middle.

Any idea why this would happen only some of the time?

Because Emacs' redisplay is unable to keep with the scrolling. Before 23.1, with scroll-conservatively set to a large value, Emacs never jumped; now it tries no to do it, but sometimes it fails. I think the relevant ChangeLog entry is this one:

2008-10-27 Chong Yidong

    * xdisp.c (try_scrolling): When computing the distance from the
    scroll margin to PT, try moving some distance past the window
    bottom before giving up.

Juanma 


After 2-hour using eval-region (this problem wasn't easy to reproduce, macro/elisp with (next-line) (sit-for 0.01) didn't give any effect, so I tested it each time by holding C-n, using binary search method for eval-region)

So the answer is:

http://www.emacswiki.org/emacs/HighlightParentheses

Evaluating this in a *scratch*, starting emacs with emacs -Q

(setq-default truncate-lines nil)
(setq truncate-partial-width-windows nil)
(add-to-list 'load-path "~/my_path_to_highlight-parentheses_script/")
(require 'highlight-parentheses)

Make some buffer with long lines and narrow it with C-x 3 C-u 5 0 C-x } then C-x o M-x highlight-parentheses-mode and hold C-n is a way to reproduce the bug.

I commented out all thing relative with highlight-parentheses, and bug gone away. I think, I should find a way to tell developers about this bug.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜