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: bug#3033: 23.0.92; Try to auto fix whitespace loss? (y/n) Date: Mon, 20 Apr 2009 09:58:19 +0200 Message-ID: <49EC2B1B.1070507@gmx.at> References: <874owmwwsj.fsf@cyd.mit.edu> Reply-To: martin rudalics , 3033@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030000040104020805000104" X-Trace: ger.gmane.org 1240215863 13535 80.91.229.12 (20 Apr 2009 08:24:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Apr 2009 08:24:23 +0000 (UTC) To: Leo , 3033@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 20 10:25:42 2009 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 1Lvool-0003YL-Q4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Apr 2009 10:25:32 +0200 Original-Received: from localhost ([127.0.0.1]:51423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LvonM-0004e8-SC for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Apr 2009 04:24:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LvonI-0004dc-VU for bug-gnu-emacs@gnu.org; Mon, 20 Apr 2009 04:24:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LvonF-0004cq-2q for bug-gnu-emacs@gnu.org; Mon, 20 Apr 2009 04:24:00 -0400 Original-Received: from [199.232.76.173] (port=57594 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LvonE-0004cT-8L for bug-gnu-emacs@gnu.org; Mon, 20 Apr 2009 04:23:56 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:48148) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LvonD-00023U-IP for bug-gnu-emacs@gnu.org; Mon, 20 Apr 2009 04:23:55 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3K8NqaH012472; Mon, 20 Apr 2009 01:23:53 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n3K8A5tw008615; Mon, 20 Apr 2009 01:10:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: martin rudalics Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 20 Apr 2009 08:10:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3033 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3033-submit@emacsbugs.donarmstrong.com id=B3033.12402144856334 (code B ref 3033); Mon, 20 Apr 2009 08:10:05 +0000 Original-Received: (at 3033) by emacsbugs.donarmstrong.com; 20 Apr 2009 08:01:25 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id n3K81Me9006321 for <3033@emacsbugs.donarmstrong.com>; Mon, 20 Apr 2009 01:01:23 -0700 Original-Received: (qmail invoked by alias); 20 Apr 2009 08:01:16 -0000 Original-Received: from 62-47-55-47.adsl.highway.telekom.at (EHLO [62.47.55.47]) [62.47.55.47] by mail.gmx.net (mp023) with SMTP; 20 Apr 2009 10:01:16 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/EqewqG+/EvWH7raMsfyFPJCqR7uViokwG4lEr6f gyycISPIjlYtV4 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: X-Y-GMX-Trusted: 0 X-FuHaFi: 0.71,0.71 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 20 Apr 2009 04:24:00 -0400 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:27361 Archived-At: This is a multi-part message in MIME format. --------------030000040104020805000104 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > I have used edebug and error-on-quit to trace the culprit and find a > reproducible recipe. It turns out it has nothing to do with whitespace. > > 1. emacs -q > 2. M-x which-func-mode > 3. C-x C-f emacs-gnus-ticked-doc.patch > [...] > In my experience, I have found which-func-mode to be intrusive and > unreliable. So I guess I will have to disable it to avoid further > trouble. Looks to me like a bug in `diff-sanity-check-hunk' which fails to make the hunk well-formed. However, I think `diff-find-source-location' shouldn't do any sanity checks in the first place when called with a non-nil NOPROMPT argument. So could you try whether the attached patch solves your problem? Thanks, martin. --------------030000040104020805000104 Content-Type: text/plain; name="diff-mode.el.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diff-mode.el.diff" *** diff-mode.el.~1.157.~ 2009-01-13 15:55:57.000000000 +0100 --- diff-mode.el 2009-04-20 09:39:22.515625000 +0200 *************** *** 1575,1581 **** ;; the user may disagree on what constitutes the hunk ;; (e.g. because an empty line truncates the hunk mid-course), ;; leading to potentially nasty surprises for the user. ! (_ (diff-sanity-check-hunk)) (hunk (buffer-substring (point) (save-excursion (diff-end-of-hunk) (point)))) (old (diff-hunk-text hunk reverse char-offset)) --- 1575,1581 ---- ;; the user may disagree on what constitutes the hunk ;; (e.g. because an empty line truncates the hunk mid-course), ;; leading to potentially nasty surprises for the user. ! (_ (unless noprompt (diff-sanity-check-hunk))) (hunk (buffer-substring (point) (save-excursion (diff-end-of-hunk) (point)))) (old (diff-hunk-text hunk reverse char-offset)) --------------030000040104020805000104--