GNU bug report logs -
#3033
23.0.92; Try to auto fix whitespace loss? (y/n)
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Fri, 17 Apr 2009 21:40:03 UTC
Severity: normal
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 3033 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
> 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.
[diff-mode.el.diff (text/plain, inline)]
*** 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))
This bug report was last modified 16 years and 114 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.