all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [angeli@iwi.uni-sb.de: scroll-preserve-screen-position and tall lines]
@ 2006-02-13  4:39 Richard Stallman
  0 siblings, 0 replies; only message in thread
From: Richard Stallman @ 2006-02-13  4:39 UTC (permalink / raw)


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 <angeli@iwi.uni-sb.de>
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 <tab> <return> M-x 
M-p <return> M-x M-p <return> C-p C-p C-p C-p M-x M-p 
<return> M-x M-p <return> M-x r e p o r t - e m <tab> 
<return>

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 -------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-13  4:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-13  4:39 [angeli@iwi.uni-sb.de: scroll-preserve-screen-position and tall lines] Richard Stallman

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.