* 23.0.50; Display bug with vline.el and viper
@ 2008-01-21 10:30 Lennart Borgman (gmail)
2008-01-22 22:30 ` Richard Stallman
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-21 10:30 UTC (permalink / raw)
To: emacs-pretest-bug
[-- Attachment #1: Type: text/plain, Size: 2684 bytes --]
Scrolling down with down arrow get stuck in a loop in some positions.
Cursor goes down to the bottom of the screem, but then the cursor jumps
up some lines. The page is not scrolled down as it should be. The cursor
is stuck in this loop.
To reproduce this start with
emacs -Q
then open the attached file (vline.el) and do
M-x eval-buffer
M-x vline-mode
M-x viper
<down-arrow>
Just hold <down-arrow> down and the bug will eventually show up. To make
it easier to see what happens you can reduce frame height first.
In GNU Emacs 23.0.50.1 (i386-mingw-nt5.1.2600)
of 2008-01-13 on my-pc
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/g/include'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ENU
locale-coding-system: cp1252
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
vline-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
C-x C-f v l <tab> <return> M-x e v a l - b u f f e
r <return> M-x v i p e r - m o d e <return> M-x v l
i n e - m o d e <return> <help-echo> <help-echo> <help-echo>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <help-echo> <help-echo> M-h <f10> <menu-bar>
<help-menu> <send-emacs-bug-report>
Recent messages:
Warning: no fonts matching
`-*-opensymbol-normal-r-normal-*-12-*-*-*-c-*-iso8859-1' available [2 times]
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading subst-ksc...done
Loading subst-gb2312...done
Loading subst-big5...done
Loading subst-jis...done
Loading viper...
Loading c:/Documents and Settings/Lennart Borgman/Application
Data/.viper...done
Loading viper...done
Vline mode enabled
[-- Attachment #2: vline.el --]
[-- Type: text/plain, Size: 6823 bytes --]
;;; vline.el --- show vertical line mode.
;; Copyright (C) 2002, 2008 by Taiki SUGAWARA <buzz.taiki@gmail.com>
;; Author: Taiki SUGAWARA <buzz.taiki@gmail.com>
;; Keywords: faces, editing, emulating
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Usage
;; put followings your .emacs
;; (require 'vline)
;;
;; if you display a vertical line, type M-x vline-mode. `vline-mode' doesn't
;; effect other buffers, because it is a buffer local minor mode. if you hide
;; a vertical line, type M-x vline-mode again.
;;
;; if you display a vertical line in all buffers, type M-x vline-global-mode.
;;
;; `vline-style' provides a display style of vertical line. see `vline-style' docstring.
;;; Changes
;;
;; 2008-01-20, Lennart Borgman
;; - Added vline-face
;; - Added :group 'vline
;;; Code:
(defvar vline-overlay-table-size 200)
(defvar vline-overlay-table (make-vector vline-overlay-table-size nil))
(defvar vline-line-char ?|)
(defvar vline-style 'face
"*This variable holds vertical line display style.
Available values are followings:
`face' : use face.
`compose' : use composit char.
`mixed' : use face and composit char.")
(defface vline
'((t (:background "gray90")))
"Default face of vertical line.")
(defcustom vline-face 'vline
"Face to use for vertical line."
:type 'face
:group 'vline)
(define-minor-mode vline-mode
"Display vertical line mode."
:global nil
:lighter " VL"
:group 'vline
(if vline-mode
(progn
(add-hook 'post-command-hook 'vline-show nil t)
(add-hook 'pre-command-hook 'vline-clear nil t))
(vline-clear)
(remove-hook 'post-command-hook 'vline-show t)
(remove-hook 'pre-command-hook 'vline-clear t)))
(define-minor-mode vline-global-mode
"Display vertical line mode as globally."
:global t
:lighter " VL"
:group 'vline
(if vline-global-mode
(progn
(add-hook 'post-command-hook 'vline-global-post-command-hook)
(add-hook 'pre-command-hook 'vline-global-pre-command-hook))
(vline-clear)
(remove-hook 'post-command-hook 'vline-global-post-command-hook)
(remove-hook 'pre-command-hook 'vline-global-pre-command-hook)))
(defun vline-post-command-hook ()
(when (and vline-mode (not (minibufferp)))
(vline-show)))
(defun vline-pre-command-hook ()
(when (and vline-mode (not (minibufferp)))
(vline-clear)))
(defun vline-global-post-command-hook ()
(when (and vline-global-mode (not (minibufferp)))
(vline-show)))
(defun vline-global-pre-command-hook ()
(when (and vline-global-mode (not (minibufferp)))
(vline-clear)))
(defun vline-clear ()
(mapcar (lambda (ovr)
(and ovr (delete-overlay ovr)))
vline-overlay-table))
(defun vline-show (&optional point)
(save-excursion
(if point
(goto-char point)
(setq point (point)))
(let* ((column (current-column))
(i 0)
(compose-p (memq vline-style '(compose mixed)))
(face-p (memq vline-style '(face mixed)))
(line-char (if compose-p vline-line-char ? ))
(line-str (make-string 1 line-char)))
(when face-p
(setq line-str (propertize line-str 'face vline-face)))
(goto-char (window-start))
(while (and (< i (1- (window-height)))
(< i (length vline-overlay-table))
(not (eobp)))
(move-to-column column)
;; non-cursor line only.
(unless (= (point) point)
;; if column over the cursor's column (when tab or multi char is appered.
(when (> (current-column) column)
(backward-char))
(let ((ovr (aref vline-overlay-table i))
;; consider a newline, tab and multi char.
(str (concat (make-string (- column (current-column)) ? )
line-str))
(char (char-after)))
;; create overlay if not found.
(unless ovr
(setq ovr (make-overlay 0 0))
(overlay-put ovr 'rear-nonsticky t)
(aset vline-overlay-table i ovr))
;; initialize overlay.
(move-overlay ovr (point) (1+ (point)))
(overlay-put ovr 'face nil)
(overlay-put ovr 'before-string nil)
(overlay-put ovr 'after-string nil)
(overlay-put ovr 'invisible nil)
(overlay-put ovr 'window (selected-window))
(cond
;; space
((eq char ? )
(overlay-put ovr 'invisible t)
(overlay-put ovr 'after-string str))
;; tab, wide-space.
((memq char '(?\t ?ã))
(setq str
(concat str
(make-string (- (save-excursion (forward-char)
(current-column))
(current-column)
(string-width str))
? )))
(overlay-put ovr 'invisible t)
(overlay-put ovr 'after-string str))
;; eol
((eolp)
(overlay-put ovr 'before-string str))
(t
(cond
(compose-p
(let (str)
(when char
(setq str (compose-chars
char
(cond ((= (char-width char) 1)
'(tc . tc))
((= (current-column) column)
'(tc . tr))
(t
'(tc . tl)))
line-char))
(when face-p
(setq str (propertize str 'face vline-face)))
(overlay-put ovr 'invisible t)
(overlay-put ovr 'after-string str))))
(face-p
(overlay-put ovr 'face vline-face)))))))
(setq i (1+ i))
(forward-line)))))
(provide 'vline)
;;; vline.el ends here
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-21 10:30 23.0.50; Display bug with vline.el and viper Lennart Borgman (gmail)
@ 2008-01-22 22:30 ` Richard Stallman
2008-01-22 23:02 ` Drew Adams
2008-01-22 23:24 ` Lennart Borgman (gmail)
2008-02-01 15:31 ` Lennart Borgman (gmail)
2008-02-27 23:18 ` Lennart Borgman (gmail)
2 siblings, 2 replies; 16+ messages in thread
From: Richard Stallman @ 2008-01-22 22:30 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: emacs-pretest-bug
Could it be a bug in vline mode? What does vline mode do, anyway?
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: 23.0.50; Display bug with vline.el and viper
2008-01-22 22:30 ` Richard Stallman
@ 2008-01-22 23:02 ` Drew Adams
2008-01-22 23:24 ` Lennart Borgman (gmail)
1 sibling, 0 replies; 16+ messages in thread
From: Drew Adams @ 2008-01-22 23:02 UTC (permalink / raw)
To: rms; +Cc: buzz.taiki, emacs-pretest-bug, Lennart Borgman (gmail)
> What does vline mode do, anyway?
It is like hl-line.el, but it highlights the current column instead of the
current line. Very nice.
Both Lennart and I have written libraries that use it in various ways.
The code is here: http://www.emacswiki.org/cgi-bin/wiki/vline.el. It is
GPL'd. The author is Taiki Sugawara (cc'd).
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-22 22:30 ` Richard Stallman
2008-01-22 23:02 ` Drew Adams
@ 2008-01-22 23:24 ` Lennart Borgman (gmail)
2008-01-23 0:45 ` Vinicius Jose Latorre
1 sibling, 1 reply; 16+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-22 23:24 UTC (permalink / raw)
To: rms; +Cc: emacs-pretest-bug
Richard Stallman wrote:
> Could it be a bug in vline mode? What does vline mode do, anyway?
Drew answered what it does.
I do not think it is a bug in vline. The code that updates the display
in vline-show is in a save-excursion form so point should be restored.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-23 0:45 ` Vinicius Jose Latorre
@ 2008-01-23 0:13 ` Lennart Borgman (gmail)
2008-01-23 0:17 ` Lennart Borgman (gmail)
2008-01-23 16:20 ` Richard Stallman
1 sibling, 1 reply; 16+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-23 0:13 UTC (permalink / raw)
To: Vinicius Jose Latorre; +Cc: emacs-pretest-bug, rms, Michael Kifer
Vinicius Jose Latorre wrote:
>
>>> Could it be a bug in vline mode? What does vline mode do, anyway?
>>
>> Drew answered what it does.
>>
>> I do not think it is a bug in vline. The code that updates the display
>> in vline-show is in a save-excursion form so point should be restored.
>
> I had a similar problem in highline package.
>
> Try to insert:
>
> (redisplay t)
>
> At the end of vline-show function.
It did not cure the problem, but changed the behaviour a bit (when I
added it at the beginning of the function, after vline-clear has been
run). I think this might be a redisplay problem.
I tried to narrow it down a bit more. It happens when there is something
like this
a line that wraps
empty line
non-empty line
Try this with
- screen height 3
- viper-mode on
- vline-mode on
- point in column 1
Just press the up and down keys repeatedly. (Turn on viper-mode with
viper-mode and turn it off with viper-go-away.)
It looks very weird that viper-mode is involved. There are viper
functions in pre/post-command-hook, but AFAICS they does nothing here.
(Am I missing something, Michael?)
Is there no one else that can reproduce this? Is it perhaps a w32 only
problem?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-23 0:13 ` Lennart Borgman (gmail)
@ 2008-01-23 0:17 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 16+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-23 0:17 UTC (permalink / raw)
To: Vinicius Jose Latorre; +Cc: emacs-pretest-bug, rms, Michael Kifer
Lennart Borgman (gmail) wrote:
> Vinicius Jose Latorre wrote:
>>
>>>> Could it be a bug in vline mode? What does vline mode do, anyway?
>>>
>>> Drew answered what it does.
>>>
>>> I do not think it is a bug in vline. The code that updates the
>>> display in vline-show is in a save-excursion form so point should be
>>> restored.
>>
>> I had a similar problem in highline package.
>>
>> Try to insert:
>>
>> (redisplay t)
>>
>> At the end of vline-show function.
>
> It did not cure the problem, but changed the behaviour a bit (when I
> added it at the beginning of the function, after vline-clear has been
> run). I think this might be a redisplay problem.
>
> I tried to narrow it down a bit more. It happens when there is something
> like this
>
> a line that wraps
> empty line
> non-empty line
>
> Try this with
>
> - screen height 3
> - viper-mode on
> - vline-mode on
> - point in column 1
Eh, forgot to say that cursor should be on the non-empty line and that
this line should be at the bottom of the screen. The strange cursor move
happens when down arrow is pressed. Then suddenly point jumps to the
empty line and no scrolling occurs.
There is no error signaled (on the lisp level).
>
> Just press the up and down keys repeatedly. (Turn on viper-mode with
> viper-mode and turn it off with viper-go-away.)
>
> It looks very weird that viper-mode is involved. There are viper
> functions in pre/post-command-hook, but AFAICS they does nothing here.
> (Am I missing something, Michael?)
>
> Is there no one else that can reproduce this? Is it perhaps a w32 only
> problem?
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-22 23:24 ` Lennart Borgman (gmail)
@ 2008-01-23 0:45 ` Vinicius Jose Latorre
2008-01-23 0:13 ` Lennart Borgman (gmail)
2008-01-23 16:20 ` Richard Stallman
0 siblings, 2 replies; 16+ messages in thread
From: Vinicius Jose Latorre @ 2008-01-23 0:45 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: emacs-pretest-bug, rms
>> Could it be a bug in vline mode? What does vline mode do, anyway?
>
> Drew answered what it does.
>
> I do not think it is a bug in vline. The code that updates the display
> in vline-show is in a save-excursion form so point should be restored.
I had a similar problem in highline package.
Try to insert:
(redisplay t)
At the end of vline-show function.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-23 0:45 ` Vinicius Jose Latorre
2008-01-23 0:13 ` Lennart Borgman (gmail)
@ 2008-01-23 16:20 ` Richard Stallman
2008-01-23 16:31 ` Lennart Borgman (gmail)
1 sibling, 1 reply; 16+ messages in thread
From: Richard Stallman @ 2008-01-23 16:20 UTC (permalink / raw)
To: Vinicius Jose Latorre; +Cc: emacs-pretest-bug, lennart.borgman
Try to insert:
(redisplay t)
At the end of vline-show function.
If this is something magic, perhaps we need to document in the Lisp
manual the need for this. Can someone propose a patch to the manual?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-23 16:20 ` Richard Stallman
@ 2008-01-23 16:31 ` Lennart Borgman (gmail)
2008-01-23 19:49 ` Vinicius Jose Latorre
0 siblings, 1 reply; 16+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-23 16:31 UTC (permalink / raw)
To: rms; +Cc: emacs-pretest-bug
Richard Stallman wrote:
> Try to insert:
>
> (redisplay t)
>
> At the end of vline-show function.
>
> If this is something magic, perhaps we need to document in the Lisp
> manual the need for this. Can someone propose a patch to the manual?
Maybe it is magic, but then the magic is not strong enough for this
display bug. But maybe something like that function should be called
internally for certain cases? Here it seems like wrapped lines are involved.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-23 19:49 ` Vinicius Jose Latorre
@ 2008-01-23 19:06 ` Lennart Borgman (gmail)
2008-01-23 23:07 ` Vinicius Jose Latorre
0 siblings, 1 reply; 16+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-23 19:06 UTC (permalink / raw)
To: Vinicius Jose Latorre; +Cc: emacs-pretest-bug, rms
Vinicius Jose Latorre wrote:
>
>>> Try to insert:
>>>
>>> (redisplay t)
>>>
>>> At the end of vline-show function.
>>>
>>> If this is something magic, perhaps we need to document in the Lisp
>>> manual the need for this. Can someone propose a patch to the manual?
>>
>> Maybe it is magic, but then the magic is not strong enough for this
>> display bug. But maybe something like that function should be called
>> internally for certain cases? Here it seems like wrapped lines are
>> involved.
>
> I've just tested vline.el with the fix above, and it works.
>
> Probably Lennart inserted (redisplay t) inside the last while.
Strange. I just tested again with the latest vline.el from EmacsWiki and
inserted (redisplay t) as the last thing in vline-show. Same bug.
When I tested I had (window-height) => 4, ie 3 lines are shown, and
(window-height) => 46. I had vline.el in the buffer. Cursor at left side
(is it column 0 or 1?;-). Just hold down arrow-down.
It does not get past the row starting with
;; Author: Taiki SUGAWARA <buzz.taiki@gmail.com>
> The problem is the following:
>
> 1. there are long lines (lines which go beyond window width) and one
> long line is at end of window (one part of the line is in the current
> window and the rest of line is in the next window);
>
> 2. when a scroll occurs (via next-line, for example), the vline-show is
> called during window scroll process;
>
> 3. vline-show changes the display while the display is being changed by
> window scroll, this gives some kind of conflict that (redisplay t) seems
> to fix.
>
> Maybe the explanation is not so precise, but I hope it helps.
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-23 16:31 ` Lennart Borgman (gmail)
@ 2008-01-23 19:49 ` Vinicius Jose Latorre
2008-01-23 19:06 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 16+ messages in thread
From: Vinicius Jose Latorre @ 2008-01-23 19:49 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: emacs-pretest-bug, rms
>> Try to insert:
>>
>> (redisplay t)
>>
>> At the end of vline-show function.
>>
>> If this is something magic, perhaps we need to document in the Lisp
>> manual the need for this. Can someone propose a patch to the manual?
>
> Maybe it is magic, but then the magic is not strong enough for this
> display bug. But maybe something like that function should be called
> internally for certain cases? Here it seems like wrapped lines are
> involved.
I've just tested vline.el with the fix above, and it works.
Probably Lennart inserted (redisplay t) inside the last while.
The problem is the following:
1. there are long lines (lines which go beyond window width) and one
long line is at end of window (one part of the line is in the current
window and the rest of line is in the next window);
2. when a scroll occurs (via next-line, for example), the vline-show is
called during window scroll process;
3. vline-show changes the display while the display is being changed by
window scroll, this gives some kind of conflict that (redisplay t) seems
to fix.
Maybe the explanation is not so precise, but I hope it helps.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-23 23:07 ` Vinicius Jose Latorre
@ 2008-01-23 22:37 ` Lennart Borgman (gmail)
2008-01-24 0:48 ` Vinicius Jose Latorre
0 siblings, 1 reply; 16+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-23 22:37 UTC (permalink / raw)
To: Vinicius Jose Latorre; +Cc: emacs-pretest-bug, rms
Vinicius Jose Latorre wrote:
>
>> Strange. I just tested again with the latest vline.el from EmacsWiki
>> and inserted (redisplay t) as the last thing in vline-show. Same bug.
>>
>> When I tested I had (window-height) => 4, ie 3 lines are shown, and
>> (window-height) => 46. I had vline.el in the buffer. Cursor at left
>> side (is it column 0 or 1?;-). Just hold down arrow-down.
>>
>> It does not get past the row starting with
>>
>> ;; Author: Taiki SUGAWARA <buzz.taiki@gmail.com>
>
> The vline.el that I'm using is attached to this email.
>
> Please, check if we are using the same file and patch.
>
> I'm using:
>
> GNU Emacs 23.0.50.2 (i686-pc-linux-gnu, GTK+ Version 2.12.1)
> of 2008-01-12 on debian-hillux
>
> These are the steps I've done:
>
>
> 1. emacs -Q vline.el
>
> 2. shrink Emacs until display 27 columns;
> (So you have a lot of long lines)
>
> 3. M-x eval-buffer RET
>
> 4. M-x vline-mode RET
>
> 5. C-n (several, well, you can hold the key pressed)
> It's all right until here.
>
> 6. shrink Emacs until display 3 lines;
>
> 7. C-n (several, again, you can hold the key pressed)
> Continue all right.
>
>
> Without the patch, it has some problems.
Hm, you placed (redisplay t) inside the (save-excursion ...) form. That
cures the bug I reported, but it gives other very strange bugs. Maximize
the window and then press up and down arrows. Instead of just moving the
point at least up arrow much of the time scrolls the window.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-23 19:06 ` Lennart Borgman (gmail)
@ 2008-01-23 23:07 ` Vinicius Jose Latorre
2008-01-23 22:37 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 16+ messages in thread
From: Vinicius Jose Latorre @ 2008-01-23 23:07 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: emacs-pretest-bug, rms
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
> Strange. I just tested again with the latest vline.el from EmacsWiki
> and inserted (redisplay t) as the last thing in vline-show. Same bug.
>
> When I tested I had (window-height) => 4, ie 3 lines are shown, and
> (window-height) => 46. I had vline.el in the buffer. Cursor at left
> side (is it column 0 or 1?;-). Just hold down arrow-down.
>
> It does not get past the row starting with
>
> ;; Author: Taiki SUGAWARA <buzz.taiki@gmail.com>
The vline.el that I'm using is attached to this email.
Please, check if we are using the same file and patch.
I'm using:
GNU Emacs 23.0.50.2 (i686-pc-linux-gnu, GTK+ Version 2.12.1)
of 2008-01-12 on debian-hillux
These are the steps I've done:
1. emacs -Q vline.el
2. shrink Emacs until display 27 columns;
(So you have a lot of long lines)
3. M-x eval-buffer RET
4. M-x vline-mode RET
5. C-n (several, well, you can hold the key pressed)
It's all right until here.
6. shrink Emacs until display 3 lines;
7. C-n (several, again, you can hold the key pressed)
Continue all right.
Without the patch, it has some problems.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vline.el --]
[-- Type: text/x-emacs-lisp; name="vline.el", Size: 6144 bytes --]
;;; vline.el --- show vertical line mode.
;; Copyright (C) 2002, 2008 by Taiki SUGAWARA <buzz.taiki@gmail.com>
;; Author: Taiki SUGAWARA <buzz.taiki@gmail.com>
;; Keywords: faces, editing, emulating
;; Version: 1.03
;; Time-stamp: <2008/01/23 16:31:56 vinicius>
;; URL: http://www.emacswiki.org/cgi-bin/wiki/vline.el
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Usage
;; put followings your .emacs
;; (require 'vline)
;;
;; if you display a vertical line, type M-x vline-mode. `vline-mode' doesn't
;; effect other buffers, because it is a buffer local minor mode. if you hide
;; a vertical line, type M-x vline-mode again.
;;
;; if you display a vertical line in all buffers, type M-x vline-global-mode.
;;
;; `vline-style' provides a display style of vertical line. see `vline-style' docstring.
;;; Changes
;;
;; 2008-01-22 taiki
;; applied patch from Lennart Borgman
;; - Added :group 'vline
;; - Added defcustom vline-current-window-only
;; - Added header items to simplify for users
;;; Code:
(defvar vline-overlay-table-size 200)
(defvar vline-overlay-table (make-vector vline-overlay-table-size nil))
(defvar vline-line-char ?|)
(defcustom vline-style 'face
"*This variable holds vertical line display style.
Available values are followings:
`face' : use face.
`compose' : use composit char.
`mixed' : use face and composit char."
:type '(radio
(const face)
(const compose)
(const mixed))
:group 'vline)
(defface vline
'((t (:background "gray90")))
"*A default face for vertical line highlighting."
:group 'vline)
(defcustom vline-face 'vline
"*A face for vertical line highlighting."
:type 'face
:group 'vline)
(defcustom vline-current-window-only nil
"*If non-nil then show column in current window only.
If the buffer is shown in several windows then show column only
in the currently selected window."
:type 'boolean
:group 'vline)
(define-minor-mode vline-mode
"Display vertical line mode."
:global nil
:lighter " VL"
:group 'vline
(if vline-mode
(add-hook 'post-command-hook 'vline-post-command-hook nil t)
(vline-clear)
(remove-hook 'post-command-hook 'vline-post-command-hook t)))
(define-minor-mode vline-global-mode
"Display vertical line mode as globally."
:global t
:lighter " VL"
:group 'vline
(if vline-global-mode
(add-hook 'post-command-hook 'vline-global-post-command-hook)
(vline-clear)
(remove-hook 'post-command-hook 'vline-global-post-command-hook)))
(defun vline-post-command-hook ()
(when (and vline-mode (not (minibufferp)))
(vline-show)))
(defun vline-global-post-command-hook ()
(when (and vline-global-mode (not (minibufferp)))
(vline-show)))
(defun vline-clear ()
(mapcar (lambda (ovr)
(and ovr (delete-overlay ovr)))
vline-overlay-table))
(defun vline-show (&optional point)
(vline-clear)
(save-excursion
(if point
(goto-char point)
(setq point (point)))
(let* ((column (current-column))
(i 0)
(compose-p (memq vline-style '(compose mixed)))
(face-p (memq vline-style '(face mixed)))
(line-char (if compose-p vline-line-char ? ))
(line-str (make-string 1 line-char)))
(when face-p
(setq line-str (propertize line-str 'face vline-face)))
(goto-char (window-start))
(while (and (< i (1- (window-height)))
(< i (length vline-overlay-table))
(not (eobp)))
(move-to-column column)
;; non-cursor line only (workaround of eol probrem.
(unless (= (point) point)
;; if column over the cursor's column (when tab or wide char is appered.
(when (> (current-column) column)
(backward-char))
(let ((ovr (aref vline-overlay-table i))
;; consider a newline, tab and wide char.
(str (concat (make-string (- column (current-column)) ? )
line-str))
(char (char-after)))
;; create overlay if not found.
(unless ovr
(setq ovr (make-overlay 0 0))
(overlay-put ovr 'rear-nonsticky t)
(aset vline-overlay-table i ovr))
;; initialize overlay.
(overlay-put ovr 'face nil)
(overlay-put ovr 'before-string nil)
(overlay-put ovr 'after-string nil)
(overlay-put ovr 'invisible nil)
(overlay-put ovr 'window
(if vline-current-window-only
(selected-window)
nil))
(cond
;; tab, wide-space.
((memq char '(?\t ? ))
(setq str
(concat str
(make-string (- (save-excursion (forward-char)
(current-column))
(current-column)
(string-width str))
? )))
(move-overlay ovr (point) (1+ (point)))
(overlay-put ovr 'invisible t)
(overlay-put ovr 'after-string str))
;; eol
((eolp)
(move-overlay ovr (point) (point))
(overlay-put ovr 'after-string str))
(t
(cond
(compose-p
(let (str)
(when char
(setq str (compose-chars
char
(cond ((= (char-width char) 1)
'(tc . tc))
((= (current-column) column)
'(tc . tr))
(t
'(tc . tl)))
line-char))
(when face-p
(setq str (propertize str 'face vline-face)))
(move-overlay ovr (point) (1+ (point)))
(overlay-put ovr 'invisible t)
(overlay-put ovr 'after-string str))))
(face-p
(move-overlay ovr (point) (1+ (point)))
(overlay-put ovr 'face vline-face)))))))
(setq i (1+ i))
(forward-line))
(redisplay t))))
(provide 'vline)
;;; vline.el ends here
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-23 22:37 ` Lennart Borgman (gmail)
@ 2008-01-24 0:48 ` Vinicius Jose Latorre
0 siblings, 0 replies; 16+ messages in thread
From: Vinicius Jose Latorre @ 2008-01-24 0:48 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: emacs-pretest-bug, rms
> Hm, you placed (redisplay t) inside the (save-excursion ...) form.
> That cures the bug I reported, but it gives other very strange bugs.
> Maximize the window and then press up and down arrows. Instead of just
> moving the point at least up arrow much of the time scrolls the window.
Indeed, just typing C-n, after half window height, next C-n causes a
scroll up, next C-n causes a scroll down, next C-n scroll up, and so on.
Despite this weird behavior, the point advances one line at time as it
should.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-21 10:30 23.0.50; Display bug with vline.el and viper Lennart Borgman (gmail)
2008-01-22 22:30 ` Richard Stallman
@ 2008-02-01 15:31 ` Lennart Borgman (gmail)
2008-02-27 23:18 ` Lennart Borgman (gmail)
2 siblings, 0 replies; 16+ messages in thread
From: Lennart Borgman (gmail) @ 2008-02-01 15:31 UTC (permalink / raw)
To: emacs-pretest-bug
There was some messages about this bug, but no solution. The bug is
still there. AFAICS it is somewhere in the display engine.
Lennart Borgman (gmail) wrote:
> Scrolling down with down arrow get stuck in a loop in some positions.
> Cursor goes down to the bottom of the screem, but then the cursor jumps
> up some lines. The page is not scrolled down as it should be. The cursor
> is stuck in this loop.
>
> To reproduce this start with
>
> emacs -Q
>
> then open the attached file (vline.el) and do
>
> M-x eval-buffer
> M-x vline-mode
> M-x viper
> <down-arrow>
>
> Just hold <down-arrow> down and the bug will eventually show up. To make
> it easier to see what happens you can reduce frame height first.
>
>
>
>
> In GNU Emacs 23.0.50.1 (i386-mingw-nt5.1.2600)
> of 2008-01-13 on my-pc
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --cflags -Ic:/g/include'
>
> Important settings:
> value of $LC_ALL: nil
> value of $LC_COLLATE: nil
> value of $LC_CTYPE: nil
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: ENU
> locale-coding-system: cp1252
> default-enable-multibyte-characters: t
>
> Major mode: Emacs-Lisp
>
> Minor modes in effect:
> vline-mode: t
> tooltip-mode: t
> tool-bar-mode: t
> mouse-wheel-mode: t
> menu-bar-mode: t
> file-name-shadow-mode: t
> global-font-lock-mode: t
> font-lock-mode: t
> blink-cursor-mode: t
> unify-8859-on-encoding-mode: t
> utf-translate-cjk-mode: t
> auto-compression-mode: t
> line-number-mode: t
>
> Recent input:
> C-x C-f v l <tab> <return> M-x e v a l - b u f f e
> r <return> M-x v i p e r - m o d e <return> M-x v l
> i n e - m o d e <return> <help-echo> <help-echo> <help-echo>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <help-echo> <help-echo> M-h <f10> <menu-bar>
> <help-menu> <send-emacs-bug-report>
>
> Recent messages:
> Warning: no fonts matching
> `-*-opensymbol-normal-r-normal-*-12-*-*-*-c-*-iso8859-1' available [2
> times]
> For information about GNU Emacs and the GNU system, type C-h C-a.
> Loading subst-ksc...done
> Loading subst-gb2312...done
> Loading subst-big5...done
> Loading subst-jis...done
> Loading viper...
> Loading c:/Documents and Settings/Lennart Borgman/Application
> Data/.viper...done
> Loading viper...done
> Vline mode enabled
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 23.0.50; Display bug with vline.el and viper
2008-01-21 10:30 23.0.50; Display bug with vline.el and viper Lennart Borgman (gmail)
2008-01-22 22:30 ` Richard Stallman
2008-02-01 15:31 ` Lennart Borgman (gmail)
@ 2008-02-27 23:18 ` Lennart Borgman (gmail)
2 siblings, 0 replies; 16+ messages in thread
From: Lennart Borgman (gmail) @ 2008-02-27 23:18 UTC (permalink / raw)
To: Emacs Devel, Kim F. Storm
I think the bug below is still there. I have no idea what to do. Kim, I
CC:ed you because I thought you might have some idea.
Lennart Borgman (gmail) wrote:
> Scrolling down with down arrow get stuck in a loop in some positions.
> Cursor goes down to the bottom of the screem, but then the cursor jumps
> up some lines. The page is not scrolled down as it should be. The cursor
> is stuck in this loop.
>
> To reproduce this start with
>
> emacs -Q
>
> then open the attached file (vline.el) and do
>
> M-x eval-buffer
> M-x vline-mode
> M-x viper
> <down-arrow>
>
> Just hold <down-arrow> down and the bug will eventually show up. To make
> it easier to see what happens you can reduce frame height first.
>
>
>
>
> In GNU Emacs 23.0.50.1 (i386-mingw-nt5.1.2600)
> of 2008-01-13 on my-pc
> Windowing system distributor `Microsoft Corp.', version 5.1.2600
> configured using `configure --with-gcc (3.4) --cflags -Ic:/g/include'
>
> Important settings:
> value of $LC_ALL: nil
> value of $LC_COLLATE: nil
> value of $LC_CTYPE: nil
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: ENU
> locale-coding-system: cp1252
> default-enable-multibyte-characters: t
>
> Major mode: Emacs-Lisp
>
> Minor modes in effect:
> vline-mode: t
> tooltip-mode: t
> tool-bar-mode: t
> mouse-wheel-mode: t
> menu-bar-mode: t
> file-name-shadow-mode: t
> global-font-lock-mode: t
> font-lock-mode: t
> blink-cursor-mode: t
> unify-8859-on-encoding-mode: t
> utf-translate-cjk-mode: t
> auto-compression-mode: t
> line-number-mode: t
>
> Recent input:
> C-x C-f v l <tab> <return> M-x e v a l - b u f f e
> r <return> M-x v i p e r - m o d e <return> M-x v l
> i n e - m o d e <return> <help-echo> <help-echo> <help-echo>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <help-echo> <help-echo> M-h <f10> <menu-bar>
> <help-menu> <send-emacs-bug-report>
>
> Recent messages:
> Warning: no fonts matching
> `-*-opensymbol-normal-r-normal-*-12-*-*-*-c-*-iso8859-1' available [2
> times]
> For information about GNU Emacs and the GNU system, type C-h C-a.
> Loading subst-ksc...done
> Loading subst-gb2312...done
> Loading subst-big5...done
> Loading subst-jis...done
> Loading viper...
> Loading c:/Documents and Settings/Lennart Borgman/Application
> Data/.viper...done
> Loading viper...done
> Vline mode enabled
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-02-27 23:18 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-21 10:30 23.0.50; Display bug with vline.el and viper Lennart Borgman (gmail)
2008-01-22 22:30 ` Richard Stallman
2008-01-22 23:02 ` Drew Adams
2008-01-22 23:24 ` Lennart Borgman (gmail)
2008-01-23 0:45 ` Vinicius Jose Latorre
2008-01-23 0:13 ` Lennart Borgman (gmail)
2008-01-23 0:17 ` Lennart Borgman (gmail)
2008-01-23 16:20 ` Richard Stallman
2008-01-23 16:31 ` Lennart Borgman (gmail)
2008-01-23 19:49 ` Vinicius Jose Latorre
2008-01-23 19:06 ` Lennart Borgman (gmail)
2008-01-23 23:07 ` Vinicius Jose Latorre
2008-01-23 22:37 ` Lennart Borgman (gmail)
2008-01-24 0:48 ` Vinicius Jose Latorre
2008-02-01 15:31 ` Lennart Borgman (gmail)
2008-02-27 23:18 ` Lennart Borgman (gmail)
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.