From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: Re: win32 emacs 22.1 crashes in longlines mode + outline minor mode Date: Wed, 14 Nov 2007 10:03:29 +0100 Message-ID: <473AB9E1.1080109@gmx.at> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010704080000090803050801" X-Trace: ger.gmane.org 1195031427 8781 80.91.229.12 (14 Nov 2007 09:10:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Nov 2007 09:10:27 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Dmitry Bolshakov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 14 10:10:32 2007 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.50) id 1IsEGP-0006EQ-W1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Nov 2007 10:10:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsEGD-00049x-5i for geb-bug-gnu-emacs@m.gmane.org; Wed, 14 Nov 2007 04:10:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IsEG7-00047x-3H for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2007 04:10:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IsEG2-000456-SK for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2007 04:10:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IsEG2-00044z-BN for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2007 04:10:02 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IsEG1-0002d8-Td for bug-gnu-emacs@gnu.org; Wed, 14 Nov 2007 04:10:02 -0500 Original-Received: (qmail invoked by alias); 14 Nov 2007 09:10:00 -0000 Original-Received: from N810P020.adsl.highway.telekom.at (EHLO [62.47.45.52]) [62.47.45.52] by mail.gmx.net (mp029) with SMTP; 14 Nov 2007 10:10:00 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/z/r04Zwjzpkj3dMOfpc+NHwlNYc4u3OmWvQbnqk fCdxLOceJFC0H5 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:16975 Archived-At: This is a multi-part message in MIME format. --------------010704080000090803050801 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > 1. Open text file > > 2. > > M-x longlines-mode > > M-x longlines-show-hard-newlines At the time I'm here the buffer is already modified since modification hooks are not inhibited in `longlines-show-hard-newlines', thus calling `longlines-after-change-function' which subsequently causes to run `longlines-post-command-function' which runs `longlines-show-region' a second time _without_ saving the buffer-modified state though, ... The attached patch should handle this. --------------010704080000090803050801 Content-Type: text/plain; name="longlines.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="longlines.patch" *** longlines.el.~1.40.~ Fri Nov 2 09:54:54 2007 --- longlines.el Wed Nov 14 09:42:18 2007 *************** *** 220,226 **** (let* ((pmin (min beg end)) (pmax (max beg end)) (pos (text-property-not-all pmin pmax 'hard nil)) ! (inhibit-read-only t)) (while pos (put-text-property pos (1+ pos) 'display (copy-sequence longlines-show-effect)) --- 220,227 ---- (let* ((pmin (min beg end)) (pmax (max beg end)) (pos (text-property-not-all pmin pmax 'hard nil)) ! (inhibit-read-only t) ! (inhibit-modification-hooks t)) (while pos (put-text-property pos (1+ pos) 'display (copy-sequence longlines-show-effect)) *************** *** 230,239 **** "Make hard newlines invisible again." (interactive) (setq longlines-showing nil) ! (let ((pos (text-property-not-all (point-min) (point-max) 'hard nil))) (while pos (remove-text-properties pos (1+ pos) '(display)) ! (setq pos (text-property-not-all (1+ pos) (point-max) 'hard nil))))) ;; Wrapping the paragraphs. --- 231,245 ---- "Make hard newlines invisible again." (interactive) (setq longlines-showing nil) ! (let ((pos (text-property-not-all (point-min) (point-max) 'hard nil)) ! (buffer-undo-list t) ! (mod (buffer-modified-p)) ! (inhibit-read-only t) ! (inhibit-modification-hooks t)) (while pos (remove-text-properties pos (1+ pos) '(display)) ! (setq pos (text-property-not-all (1+ pos) (point-max) 'hard nil))) ! (set-buffer-modified-p mod))) ;; Wrapping the paragraphs. --------------010704080000090803050801--