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#6201: 23.1; fill-region giving error Date: Sun, 16 May 2010 15:34:22 +0100 Message-ID: <19440.622.608000.387274@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="BOWtUJ1VWs" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274021826 12346 80.91.229.12 (16 May 2010 14:57:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 16 May 2010 14:57:06 +0000 (UTC) Cc: U.S.Reddy@cs.bham.ac.uk, emacs_user@hotmail.com To: 6201@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 16 16:57:04 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ODfH4-0001JQ-Pn for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 May 2010 16:57:04 +0200 Original-Received: from localhost ([127.0.0.1]:54445 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODfH2-0000El-3J for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 May 2010 10:57:00 -0400 Original-Received: from [140.186.70.92] (port=47199 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODfGu-0000Co-14 for bug-gnu-emacs@gnu.org; Sun, 16 May 2010 10:56:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODfGs-00057n-SU for bug-gnu-emacs@gnu.org; Sun, 16 May 2010 10:56:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33439) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODfGs-00057g-NJ for bug-gnu-emacs@gnu.org; Sun, 16 May 2010 10:56:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1ODevl-0001uD-UA; Sun, 16 May 2010 10:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Uday S Reddy Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 May 2010 14:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6201 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.12740204887316 (code B ref -1); Sun, 16 May 2010 14:35:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 May 2010 14:34:48 +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 1ODevY-0001tx-75 for submit@debbugs.gnu.org; Sun, 16 May 2010 10:34:48 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODevV-0001tr-Si for submit@debbugs.gnu.org; Sun, 16 May 2010 10:34:46 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:35473) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ODevQ-0002wd-Sw for submit@debbugs.gnu.org; Sun, 16 May 2010 10:34:40 -0400 Original-Received: from [140.186.70.92] (port=55684 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODevP-000256-4J for bug-gnu-emacs@gnu.org; Sun, 16 May 2010 10:34:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODevN-0002TV-1f for bug-gnu-emacs@gnu.org; Sun, 16 May 2010 10:34:39 -0400 Original-Received: from sun61.bham.ac.uk ([147.188.128.150]:48327) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODevK-0002SU-Kl for bug-gnu-emacs@gnu.org; Sun, 16 May 2010 10:34:36 -0400 Original-Received: from [147.188.128.127] (helo=bham.ac.uk) by sun61.bham.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1ODevH-0003S6-Op; Sun, 16 May 2010 15:34:31 +0100 Original-Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk with esmtp (Exim 4.43) id 1ODevH-0005oK-Ex; Sun, 16 May 2010 15:34:31 +0100 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 1ODevH-0004Nw-8w; Sun, 16 May 2010 15:34:31 +0100 X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 16 May 2010 10:35:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36967 Archived-At: --BOWtUJ1VWs Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit The fill-region function is going outside the region and giving an error. A sample input and backtrace are attached. Also attached is a patch to fill.el which fixes the problem. Cheers, Uday Reddy ---- 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'. If you would like to further debug the crash, please read the file d:/gnu/emacs-23.1/etc/DEBUG for instructions. In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)' 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: Editable Dired Minor modes in effect: savehist-mode: t tooltip-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 global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t line-number-mode: t transient-mark-mode: t Recent input: f i l l - r e g SPC C-x u C-x u C-x u C-p C-SPC C-n C-n C-n C-n M-x f i l l - r e g SPC C-x u C-x u C-x u C-x u C-x u C-x u C-x u C-x u q C-x b C-x b C-x C-f f i l l . e SPC C-s d e f u n SPC f i l l SPC - - r e g i o n C-s C-a C-x C-a C-SPC C-n C-n C-n C-n M-x f i l l - r e g SPC q C-x u M-x v m - s u b C-g C-x C-f g n M-x C-g s M-x w d i r e d - SPC C-p C-p C-a C-x q v m - b u g - E l i - f i l l i n g e m a c s - b u g - f i l l i n g C-g M-x w d i r e d C-g C-x q v m - b u g - E l i - f i l l i n g - r e p l i e s - 2 e m a c s - b u g - f i l l i n g SPC C-a C-x q C-n SPC SPC SPC SPC SPC SPC M-x s u b m i t - b u SPC SPC r e p o r t SPC e m SPC SPC Recent messages: Entering debugger... Back to top level. Undo in region! Quit [2 times] Press C-c C-c when finished or C-c ESC to abort changes Quit [2 times] Mark set Replaced 1 occurrence Mark set Replaced 6 occurrences --BOWtUJ1VWs Content-Type: text/plain; name="emacs-bug-filling.txt" Content-Description: sample buffer that gives an error Content-Disposition: inline; filename="emacs-bug-filling.txt" Content-Transfer-Encoding: 7bit -*- mail -*- > talks will be either Monday & Tuesday Sept. 13 & 14 or Sept 20 & 21? > There will be ~10 talks so it would likely be over two days. > > > > NB: > > Wed. Sept 1 - classes start > --BOWtUJ1VWs Content-Type: text/plain; name="emacs-bug-filling-backtrace.txt" Content-Description: error backtrace Content-Disposition: inline; filename="emacs-bug-filling-backtrace.txt" Content-Transfer-Encoding: 7bit Debugger entered--Lisp error: (error "Invalid search bound (wrong side of point)") re-search-forward("\\([.?!][]\"'\x201d\x201d)}]*\\($\\|[ \x00a0]$\\| \\|[ \x00a0][ \x00a0]\\)\\|[\x3002\xff0e\xff1f\xff01\x3002\xff0e\xff1f\xff01\x3002\xff0e\xff1f\xff01\x3002\xff0e\xff1f\xff01]+\\)[ \x00a0 \n]*$" # t) fill-delete-newlines(161 # left nil nil) fill-region-as-paragraph(159 156 nil nil) fill-region(15 156 nil) call-interactively(fill-region t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil) --BOWtUJ1VWs Content-Type: text/plain; name="fill.el.patch" Content-Description: patch for fill.el Content-Disposition: inline; filename="fill.el.patch" Content-Transfer-Encoding: 7bit *** fill.el Sun Jun 21 12:38:06 2009 --- fill-modified.el Sun May 16 15:11:00 2010 *************** *** 1036,1042 **** (fill-forward-paragraph -1)) (if (< (point) beg) (goto-char beg)) ! (if (>= (point) initial) (setq fill-pfx (fill-region-as-paragraph (point) end justify nosqueeze)) (goto-char end)))) --- 1036,1042 ---- (fill-forward-paragraph -1)) (if (< (point) beg) (goto-char beg)) ! (if (and (>= (point) initial) (< (point) end)) (setq fill-pfx (fill-region-as-paragraph (point) end justify nosqueeze)) (goto-char end)))) --BOWtUJ1VWs--