From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Joe Wells Newsgroups: gmane.emacs.bugs Subject: Emacs 21.2 display bugs: variables: cursor-type; properties: display, before-string, after-string, invisible, intangible Date: 18 May 2002 19:53:34 +0100 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021748404 30915 127.0.0.1 (18 May 2002 19:00:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 18 May 2002 19:00:04 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 1799Qx-00082W-00 for ; Sat, 18 May 2002 21:00:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 1799RM-0000UV-00; Sat, 18 May 2002 15:00:28 -0400 Original-Received: from izanami.cee.hw.ac.uk ([137.195.52.9]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 1799QW-0000Pk-00 for ; Sat, 18 May 2002 14:59:36 -0400 Original-Received: from lxjbw ([137.195.52.90] helo=localhost.localdomain ident=root) by izanami.cee.hw.ac.uk with esmtp (Exim 3.33 #1) id 1799QT-000527-00 for bug-gnu-emacs@gnu.org; Sat, 18 May 2002 19:59:34 +0100 Original-Received: (from jbw@localhost) by localhost.localdomain (8.11.6/8.9.3) id g4IIrZw06200; Sat, 18 May 2002 19:53:35 +0100 X-Authentication-Warning: localhost.localdomain: jbw set sender to jbw@izanami.cee.hw.ac.uk using -f Original-To: bug-gnu-emacs@gnu.org Original-Lines: 177 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:1441 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:1441 ;; Emacs 21.2 display bugs ;; affected variables: cursor-type ;; affected overlay properties: display, before-string, after-string, invisible, intangible ;; bugs reported by: Joe Wells () ;; In GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars) ;; of 2002-05-07 on stripples.devel.redhat.com ;; configured using `configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --with-gcc --with-pop --with-sound' ;; 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: C ;; locale-coding-system: nil ;; default-enable-multibyte-characters: t ;; Test cases to reproduce the buggy behavior are supplied for all ;; bugs reported in this message. ;; * The buffer's value of cursor-type is ignored when the buffer's ;; window is not the selected window. Instead, the usual hollow box ;; cursor is displayed. (progn (delete-other-windows) (kill-buffer (get-buffer-create "test")) (set-buffer (get-buffer-create "test")) (setq cursor-type 'bar) (display-buffer (current-buffer))) ;; * A display property of "" (the empty string) on any character in ;; the buffer causes a truly wacky event. The buffer is effectively ;; partitioned into two portions, that before the first such ;; character, and that after. Only one portion will be displayed at a ;; given time, generally the portion that point is in. Furthermore, ;; subsequent display property values appear to be ignored. There are ;; 3 test cases for this bug, displaying various aspects of it. The ;; buggy behavior is affected by the value of scroll-step; if ;; scroll-step has its default value of 0 then the behavior is even ;; worse than I have described. (progn (kill-buffer (get-buffer-create "test")) (set-buffer (get-buffer-create "test")) (insert "ABCDEFGH") (let ((o (make-overlay 3 4))) ;; covering the "C" (overlay-put o 'display "")) (let ((o (make-overlay 7 8))) ;; covering the "F" (overlay-put o 'display "")) (display-buffer (current-buffer))) (progn (kill-buffer (get-buffer-create "test")) (set-buffer (get-buffer-create "test")) (insert "ABCDEFGH") (let ((o (make-overlay 3 4))) ;; covering the "C" (overlay-put o 'display "")) (let ((o (make-overlay 7 8))) ;; covering the "F" (overlay-put o 'display "")) (goto-char (point-min)) (display-buffer (current-buffer))) (progn (kill-buffer (get-buffer-create "test")) (set-buffer (get-buffer-create "test")) (insert "ABCDEFGH") (let ((o (make-overlay 3 4))) ;; covering the "C" (overlay-put o 'display "")) (let ((o (make-overlay 7 8))) ;; covering the "F" (overlay-put o 'display "Z")) (display-buffer (current-buffer))) ;; * The "specified spaces" form of display specification causes wacky ;; cursor problems when the space is very small. When point is just ;; before the first character of a range having such a specification, ;; the cursor is not displayed when the buffer's window is selected. ;; It does not matter whether the cursor is the default box cursor or ;; the bar cursor. When the buffer's window is not selected, the ;; cursor is displayed as a hollow box that extends all the way to the ;; right edge of the window. There are various other display things ;; that go wrong in this situation, too many to list. (progn (kill-buffer (get-buffer-create "test")) (set-buffer (get-buffer-create "test")) (insert "ABCD") (goto-char 2) ;; between A and B (let ((o (make-overlay 2 4))) ;; covering the "BC" (overlay-put o 'display '(space :width 0.01))) (display-buffer (current-buffer))) ;; * A string-valued display property on a range of characters causes ;; cursor problems. If point is just before all of the characters ;; with the string-valued display property, the cursor is displayed ;; _after_ the string which is displayed instead of the characters. (progn (kill-buffer (get-buffer-create "test")) (set-buffer (get-buffer-create "test")) (insert "ABC") (let ((o (make-overlay 2 3))) ;; covering the B (overlay-put o 'display "Y")) (goto-char 2) ;; between A and B (display-buffer (current-buffer)) (what-cursor-position) ;; shows point is _before_ the B ) ;; * A before-string property on a range of characters causes cursor ;; problems. If point is just before all of the characters with the ;; before-string property, the cursor is displayed _after_ the string ;; which is the value of the before-string property. (progn (kill-buffer (get-buffer-create "test")) (set-buffer (get-buffer-create "test")) (insert "AB") (let ((o (make-overlay 2 3))) ;; covering the B (overlay-put o 'before-string "Y")) (goto-char 2) ;; between A and B (display-buffer (current-buffer)) (what-cursor-position) ;; shows point is _before_ the B ) ;; * An after-string and invisible property on a range of characters ;; causes cursor problems. If point is just before all of the ;; characters with the after-string and non-nil invisible property, ;; the cursor is displayed _after_ the string which is the value of ;; the after-string property. (progn (kill-buffer (get-buffer-create "test")) (set-buffer (get-buffer-create "test")) (insert "AB") (let ((o (make-overlay 2 3))) ;; covering the B (overlay-put o 'after-string "Y") (overlay-put o 'invisible t)) (goto-char 2) ;; between A and B (display-buffer (current-buffer)) (what-cursor-position) ;; shows point is _before_ the B ) ;; * previous-line fails if there is no legal spot on the previous ;; line to move to. However, backward-char works fine. Furthermore, ;; next-line has no trouble moving down over illegal spots, so the ;; behavior is inconsistent. (progn (kill-buffer (get-buffer-create "test")) ;; The following subexpression is necessary to exhibit the bug ;; reliably. Otherwise, the test case listed just above tends to ;; prevent the bug from appearing. (progn (delete-other-windows) (sit-for 0)) (set-buffer (get-buffer-create "test")) (insert "A\nB\nC\nD\nE") (let ((o (make-overlay 3 8))) ;; covering the "B\nC\nD" (overlay-put o 'intangible t)) (goto-char 8) (previous-line 1) (display-buffer (current-buffer)) (what-cursor-position) ;; shows point has not moved from 8 ) ;; * Column numbers as used by previous-line and next-line have ;; surprising (to the naive user) effects when overlay or text ;; properties are used which cause additional characters to be ;; displayed or prevent characters in the buffer from being displayed. ;; Strictly speaking, this may not be a bug, but it is highly ;; undesirable behavior. There should be a way to have motion to a ;; particular column based on what is displayed rather than on what is ;; in the buffer.