From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [angeli@iwi.uni-sb.de: scroll-preserve-screen-position and tall lines] Date: Sun, 12 Feb 2006 23:39:10 -0500 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1139805612 21416 80.91.229.2 (13 Feb 2006 04:40:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Feb 2006 04:40:12 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 13 05:40:10 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F8VVP-0008R0-1t for ged-emacs-devel@m.gmane.org; Mon, 13 Feb 2006 05:40:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8VVO-00076a-7i for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2006 23:40:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F8VUV-0006pQ-TZ for emacs-devel@gnu.org; Sun, 12 Feb 2006 23:39:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F8VUV-0006pE-6f for emacs-devel@gnu.org; Sun, 12 Feb 2006 23:39:11 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8VUU-0006pB-UV for emacs-devel@gnu.org; Sun, 12 Feb 2006 23:39:11 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F8VYs-0002M5-06 for emacs-devel@gnu.org; Sun, 12 Feb 2006 23:43:42 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1F8VUU-0007FV-7g; Sun, 12 Feb 2006 23:39:10 -0500 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50440 Archived-At: I was going through old mail and discovered this bug report. The bug still happens. Would someone please investigate this? ------- Start of forwarded message ------- From: Ralf Angeli To: emacs-pretest-bug@gnu.org Date: Mon, 04 Jul 2005 18:32:59 +0200 X-IWi-MailScanner-Information: Please contact the ISP for more information X-IWi-MailScanner: Found to be clean X-IWi-MailScanner-SpamCheck: not spam, SpamAssassin (score=0.077, required 5, autolearn=disabled, TW_KB 0.08) X-MailScanner-From: angeli@iwi.uni-sb.de X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.1 (triton.rz.uni-saarland.de [134.96.7.25]); Mon, 04 Jul 2005 18:33:08 +0200 (CEST) X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.31.0.7; VDF 6.31.0.146 Subject: scroll-preserve-screen-position and tall lines Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 When `scroll-preserve-screen-position' is set to `always' Emacs doesn't manage to keep the vertical position of point relative to window boundaries if tall lines are involved. Here is a testcase: (progn (setq scroll-preserve-screen-position 'always) (pop-to-buffer (get-buffer-create "*test*")) (dotimes (i 50) (insert (concat (number-to-string i) "\n"))) (insert "TALL\n") (put-text-property (line-beginning-position 0) (line-end-position 0) 'face '(:height 2.0 :inherit variable-pitch)) (dotimes (i 50) (insert (concat (number-to-string (+ i 50)) "\n"))) (search-backward "TALL")) After executing it, scroll the buffer by one line with `C-u 1 C-v'. Notice that point does not keep its vertical position but moves upwards together with the string "TALL". (`scroll-down' does not seem to be affected.) In the functionality of `scroll-preserve-screen-position' is implemented in Elisp, it is working as intended. You can try it by executing the following function while having point on the "TALL" string in the *test* buffer generated from the code above. (defun scroll-up-test () (interactive) (setq scroll-preserve-screen-position nil) (let ((orig-window-line (count-screen-lines (save-excursion (move-to-window-line 0) (point)) (point)))) (scroll-up 1) (move-to-window-line orig-window-line))) In GNU Emacs 22.0.50.2 (i686-pc-linux-gnu, GTK+ Version 2.6.8) of 2005-07-04 on neutrino X server distributor `The XFree86 Project, Inc', version 11.0.40300001 configured using `configure '--with-gtk'' 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: en_US locale-coding-system: iso-latin-1 default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: desktop-save-mode: t display-time-mode: t iswitchb-mode: t show-paren-mode: t encoded-kbd-mode: t mouse-wheel-mode: t auto-compression-mode: t menu-bar-mode: t global-font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t next-error-follow-minor-mode: Fol Recent input: C-n C-y C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-b C-x C-e C-u 1 C-v C-x o C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-b C-x C-e C-x o M-x s c r o l l - u p - t e M-x M-p M-x M-p C-p C-p C-p C-p M-x M-p M-x M-p M-x r e p o r t - e m Recent messages: Loading edmacro...done No desktop file. Loading jit-lock...done For information about the GNU Project and its goals, type C-h C-p. Loading cl-seq...done Mark set Loading cl-macs...done 141 scroll-up-test Loading emacsbug...done _______________________________________________ Emacs-pretest-bug mailing list Emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug ------- End of forwarded message -------