From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uday S Reddy Newsgroups: gmane.emacs.bugs Subject: bug#10024: 24.0.91; save-restriction fails to restore the screen Date: Sat, 12 Nov 2011 11:59:19 +0000 Message-ID: <20158.24471.405000.559265@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1321099253 7519 80.91.229.12 (12 Nov 2011 12:00:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 12 Nov 2011 12:00:53 +0000 (UTC) Cc: U.S.Reddy@cs.bham.ac.uk To: 10024@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 12 13:00:48 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RPCGN-0001Z3-Iy for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Nov 2011 13:00:47 +0100 Original-Received: from localhost ([::1]:53427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPCGN-0003YX-2O for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Nov 2011 07:00:47 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPCGJ-0003YH-6t for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2011 07:00:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPCGH-00037R-OO for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2011 07:00:43 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPCGH-00037J-LY for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2011 07:00:41 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RPCGc-0002Ct-6Q for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2011 07:01:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Uday S Reddy Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Nov 2011 12:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10024 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13210992158423 (code B ref -1); Sat, 12 Nov 2011 12:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Nov 2011 12:00:15 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RPCFq-0002Bn-Fz for submit@debbugs.gnu.org; Sat, 12 Nov 2011 07:00:14 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RPCFk-0002BD-CA for submit@debbugs.gnu.org; Sat, 12 Nov 2011 07:00:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPCFH-0002wV-Uy for submit@debbugs.gnu.org; Sat, 12 Nov 2011 06:59:41 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:35999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPCFH-0002wR-TV for submit@debbugs.gnu.org; Sat, 12 Nov 2011 06:59:39 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPCFG-0003TG-Jk for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2011 06:59:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPCFE-0002w1-CL for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2011 06:59:38 -0500 Original-Received: from sun61.bham.ac.uk ([147.188.128.150]:59192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPCFE-0002vq-3D for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2011 06:59:36 -0500 Original-Received: from [147.188.128.127] (helo=bham.ac.uk) by sun61.bham.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1RPCFB-0000P0-P9 for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2011 11:59:33 +0000 Original-Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk (envelope-from ) with esmtp (Exim 4.72) id 1RPCFB-0004bb-FP for bug-gnu-emacs@gnu.org using interface smart1.bham.ac.uk; Sat, 12 Nov 2011 11:59:33 +0000 Original-Received: from gromit.cs.bham.ac.uk ([147.188.193.16] helo=MARUTI.cs.bham.ac.uk) by mx1.cs.bham.ac.uk with esmtp (Exim 4.51) id 1RPCFB-0004V0-Ay; Sat, 12 Nov 2011 11:59:33 +0000 X-Mailer: VM 8.1.93a under 24.0.91.1 (i386-mingw-nt5.1.2600) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 12 Nov 2011 07:01:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53827 Archived-At: In using VM, we noticed that the Emacs 24 pretest is repositioning the cursor in the message composition window, hiding the message headers. I have tracked the problem down to the use of `save-restriction' and came up with the following code. (defun test-restriction () (interactive) (save-restriction (goto-line 5) (narrow-to-region (point) (point-max)) (insert "hello\n"))) To reproduce the problem, place debug-on-entry on the `test-restriction' function. Position the cursor on line 5 in some buffer, run `test-restriction' and single-step through it. You would see that "hello" is at the top of the window and the lines 1-4 are off the screen. I haven't found a way to reproduce the problem without the debugger, but it happens inside VM even when no debugger is used. So, some event is destroying the window positioning. Cheers, Uday If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file d:/gnu/emacs-24.0.91/etc/DEBUG. In GNU Emacs 24.0.91.1 (i386-mingw-nt5.1.2600) of 2011-10-31 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.6) --no-opt --cflags -I"D:/devel/emacs/libs/libXpm-3.5.8/include" -I"D:/devel/emacs/libs/libXpm-3.5.8/src" -I"D:/devel/emacs/libs/libpng-dev_1.4.3-1/include" -I"D:/devel/emacs/libs/zlib-dev_1.2.5-2/include" -I"D:/devel/emacs/libs/giflib-4.1.4-1/include" -I"D:/devel/emacs/libs/jpeg-6b-4/include" -I"D:/devel/emacs/libs/tiff-3.8.2-1/include" -I"D:/devel/emacs/libs/gnutls-2.10.1/include" --ldflags -L"D:/devel/emacs/libs/gnutls-2.10.1/lib"' 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: ENU value of $XMODIFIERS: nil locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Mail Minor modes in effect: savehist-mode: t show-paren-mode: t which-function-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent input: C-s s a v e - r e s C-a C-l C-x o C-n C-n C-n C-a C-n TAB ( i n s e r t SPC " h e l l o " ) C-x M-x t e s t - r e s SPC M-x t C-g C-x , M-x t e s t - r e s SPC C-x d t e s t - r e s SPC C-x , M-x t e s t - r e s SPC d d c d c d c d c c C-x , C-h f t e q C-x k C-g C-n C-n C-n C-n h e l l o C-x C-g C-x u M-x t e s t - r e s SPC d d c d c d d c d c c c C-x , M-x t e s t - r e s SPC d d c d c d c d d d c c C-x c C-x u C-x , M-x t e s t - r e s SPC C-x u C-n C-n C-n C-n C-n C-e C-b C-b C-b C-b \ n C-x M-x t e s t - r e s SPC C-x u C-x d t e s t - r e s SPC M-x t e s t - r e s SPC c c C-x u M-x t e s t - r e s t SPC d d c d c d c d c c M-x r e p o r t - e x m a SPC SPC b SPC Recent messages: Proceeding, will debug on next eval or call. Entering debugger... Continuing. Entering debugger... Proceeding, will debug on next eval or call. Entering debugger... Continuing. Entering debugger... Continuing. Making completion list... Load-path shadows: d:/Home/udr/share/emacs/sml-mode hides d:/gnu/emacs-24.0.91/../site-lisp/sml-mode d:/Home/udr/share/emacs/savehist-20+ hides d:/gnu/emacs-24.0.91/../site-lisp/savehist-20+ d:/gnu/emacs-24.0.91/../site-lisp/longlines hides d:/gnu/emacs-24.0.91/lisp/longlines d:/gnu/vm/trunk/lisp/cus-load hides d:/gnu/emacs-24.0.91/lisp/cus-load Features: (shadow emacsbug multi-isearch cl-specs edebug help-mode view debug mailalias vm-reply bbdb-hooks mail-parse rfc2231 w3m-form w3m browse-url doc-view jka-compr dired-x mydired dired image-mode w3m-hist w3m-fb bookmark-w3m w3m-ems wid-edit w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util vm-w3m tapestry vm-sort vm-thread easymenu u-vm-color my-vm vc-bzr etags ps-print ps-def lpr vm-save vm-ps-print vm-rfaddons vm-menu vm-window vm-toolbar vm-folder vm-mime vm-undo vm-virtual vm-summary-faces vm-mouse vm-page vm-minibuf vm-message vm-misc vm-macro bbdb-vm vm-summary vm-motion vm-autoload bbdb-snarf mail-extr rfc822 bbdb-com mailabbrev vm warnings server w3m-load bbdb-autoloads bbdb timezone vm-autoloads vm-version vm-vars autopair easy-mmode cl myautopair savehist tex-site auto-loads telnet movement natural-space NatSpeak sendmail rfc2047 rfc2045 ietf-drums mail-utils auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util mm-util mail-prsvr password-cache epa-file epa epg epg-config ange-ftp comint regexp-opt ring paren echistory chistory ehelp electric derived which-func imenu advice help-fns advice-preload edmacro kmacro time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process multi-tty emacs)