emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Window display at point


From: Nick Roberts
Subject: Window display at point
Date: Mon, 19 May 2003 01:46:16 +0100

This e-mail follows an earlier posting on emacs-devel. I could not get a
window to display at point and I have now inferred that it is a bug with 
emacs 21.3.50 as my code works perfectly well with emacs 21.2.1 (as packaged
in Mandrake 9.0).

I don't know how to reproduce it simply but the following code does it
(with a suitable filename in place of gdb-ui.el for a file in a visible window):

(save-selected-window
  (select-window (get-buffer-window (get-buffer "gdb-ui.el")))
                 (goto-char 6000)
                 (setq string "gdb-arrow")
                 (let ((buffer (current-buffer))
                       (pos (point)))
                   (setq string (copy-sequence string))
                   (let ((overlay (make-overlay pos pos buffer))
                         (prop (list (list 'margin 'left-margin) "=>")))
                     (put-text-property 0 (length string) 'display prop string)
                     (overlay-put overlay 'put-arrow t)
                     (overlay-put overlay 'before-string string))))

As stated before, in emacs 21.3.50 the mode-line displays the correct line for
point but the window doe not move there and the cursor displays at a
different location. When I select the window by clicking on the mode-line,
and type `C-p', say, it then redisplays and the cursor starts to move from 
point.

This bug is caused by the placing the arrow in the margin. If 

(prop (list (list 'margin 'left-margin) "=>"))) 

is replaced with 

(prop "=>"))

so that the arrow displays in the text area, then there is no problem.


Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]