From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Hill Newsgroups: gmane.emacs.bugs Subject: Emacs 21 bug scrolling image horizontally to right in other window Date: Mon, 3 Feb 2003 17:14:37 -0800 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Trace: main.gmane.org 1044321356 26517 80.91.224.249 (4 Feb 2003 01:15:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 4 Feb 2003 01:15:56 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18frgn-0006tX-00 for ; Tue, 04 Feb 2003 02:15:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18fric-0001fd-01 for gnu-bug-gnu-emacs@m.gmane.org; Mon, 03 Feb 2003 20:17:46 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18frfs-0008FU-00 for bug-gnu-emacs@gnu.org; Mon, 03 Feb 2003 20:14:56 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18frfc-0007Y5-00 for bug-gnu-emacs@gnu.org; Mon, 03 Feb 2003 20:14:44 -0500 Original-Received: from renfield.synergymicro.com ([153.105.4.30] helo=synergymicro.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18frfb-0007QC-00 for bug-gnu-emacs@gnu.org; Mon, 03 Feb 2003 20:14:39 -0500 Original-Received: from synergy.synergy.encinitas.ca.us ([153.105.4.29]) by synergymicro.com (8.9.3/8.9.3) with ESMTP id RAA26073 for ; Mon, 3 Feb 2003 17:15:05 -0800 Original-Received: from [198.17.100.22] (G-Hill-Mac [198.17.100.22])RAA32083 for ; Mon, 3 Feb 2003 17:20:36 -0800 Original-To: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4382 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4382 When scrolling a window to the right in an "other-window", if the window being scrolled contains an image, under certain circumstances the rightmost character-width's worth of the image gets duplicated. To see this happen, use the showImage routine below (referencing some image file you have) to display an image. Use the scroll-image-left routine to scroll it to the left. Then, with some window selected other than the one displaying the showImage buffer, use the scroll-image-right routine to scroll the image to the right, and notice what happens to its right-hand edge. Then choose the window displaying the image as the selected window, and use the same scrolling routines. Notice that the problem goes away. Next, uncomment out the first (insert "\n") in showImage, and repeat the original experiment. Notice that the problem goes away. Finally, leave the initial (insert "\n") not commented out, change the 1 in the call to goto-char to a 2, and notice that the problem comes back. (defun showImage () (interactive) (save-selected-window (switch-to-buffer-other-window "showImage") (erase-buffer) ;;; (insert "\n") (insert-image (create-image "rms.jpeg") (point)) (insert "\n") (goto-char 1) )) (defun scroll-image-left () (interactive) (save-selected-window (select-window (get-buffer-window "showImage")) (scroll-left 1))) (defun scroll-image-right () (interactive) (save-selected-window (select-window (get-buffer-window "showImage")) (scroll-right 1))) (global-set-key [M-left] 'scroll-image-left) (global-set-key [M-right] 'scroll-image-right) --Greg