unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3033: 23.0.92; Try to auto fix whitespace loss? (y/n)
@ 2009-04-17 11:38 Leo
  0 siblings, 0 replies; 6+ messages in thread
From: Leo @ 2009-04-17 11:38 UTC (permalink / raw)
  To: emacs-pretest-bug

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]


When I try to open by drag and drop the attached file, Emacs keep asking
me 'Try to auto fix whitespace loss? (y/n)'. No matter y or n, the
dialogue will appear again and again until I kill the buffer.

I enable whitespace mode using (add-hook 'diff-mode-hook
'whitespace-mode).

GNU Emacs 23.0.92.1 (i386-apple-darwin9.6.0, NS apple-appkit-949.43) of
2009-04-15 on 64-71-7-214.static.wiline.com


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: emacs-gnus-ticked-doc.patch --]
[-- Type: text/x-patch, Size: 525 bytes --]

Index: gnus.texi
diff -u gnus/texi/gnus.texi:7.204 gnus/texi/gnus.texi:7.205
--- gnus.texi:7.204	Sat Dec 30 16:36:31 2006
+++ gnus.texi	Sat Dec 30 22:01:07 2006
@@ -10569,6 +10569,12 @@
 Pull all dormant articles (for the current group) into the summary buffer
 (@code{gnus-summary-insert-dormant-articles}).
 
+@item Y t
+@kindex Y t (Summary)
+@findex gnus-summary-insert-ticked-articles
+Pull all ticked articles (for the current group) into the summary buffer
+(@code{gnus-summary-insert-ticked-articles}).
+
 @end table

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3033: 23.0.92; Try to auto fix whitespace loss? (y/n)
@ 2009-04-18  1:55 Chong Yidong
  2009-04-18 13:24 ` Leo
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2009-04-18  1:55 UTC (permalink / raw)
  To: Leo; +Cc: 3033

> When I try to open by drag and drop the attached file, Emacs keep asking
> me 'Try to auto fix whitespace loss? (y/n)'. No matter y or n, the
> dialogue will appear again and again until I kill the buffer.
>
> I enable whitespace mode using (add-hook 'diff-mode-hook
> 'whitespace-mode).

I can't reproduce this.  Do you see the bug with a .emacs containing
only `(add-hook 'diff-mode-hook 'whitespace-mode)' and nothing else?






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3033: 23.0.92; Try to auto fix whitespace loss? (y/n)
  2009-04-18  1:55 bug#3033: 23.0.92; Try to auto fix whitespace loss? (y/n) Chong Yidong
@ 2009-04-18 13:24 ` Leo
  2009-04-20  7:58   ` martin rudalics
  0 siblings, 1 reply; 6+ messages in thread
From: Leo @ 2009-04-18 13:24 UTC (permalink / raw)
  To: bug-gnu-emacs

On 2009-04-18 02:55 +0100, Chong Yidong wrote:
>> When I try to open by drag and drop the attached file, Emacs keep asking
>> me 'Try to auto fix whitespace loss? (y/n)'. No matter y or n, the
>> dialogue will appear again and again until I kill the buffer.
>>
>> I enable whitespace mode using (add-hook 'diff-mode-hook
>> 'whitespace-mode).
>
> I can't reproduce this.  Do you see the bug with a .emacs containing
> only `(add-hook 'diff-mode-hook 'whitespace-mode)' and nothing else?

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

You should be able to see a dialogue pop up as in this screenshot
http://imagebin.org/46002.

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.

Best wishes,
-- 
.:  Leo  :.  [ sdl.web AT gmail.com ]  .: I use Emacs :.

               www.git-scm.com
    git - the one true version control system








^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3033: 23.0.92; Try to auto fix whitespace loss? (y/n)
  2009-04-18 13:24 ` Leo
@ 2009-04-20  7:58   ` martin rudalics
  2009-04-20 15:53     ` Stefan Monnier
  2009-04-20 16:30     ` Leo
  0 siblings, 2 replies; 6+ messages in thread
From: martin rudalics @ 2009-04-20  7:58 UTC (permalink / raw)
  To: Leo, 3033

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]

 > 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.

[-- Attachment #2: diff-mode.el.diff --]
[-- Type: text/plain, Size: 1011 bytes --]

*** 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))

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3033: 23.0.92; Try to auto fix whitespace loss? (y/n)
  2009-04-20  7:58   ` martin rudalics
@ 2009-04-20 15:53     ` Stefan Monnier
  2009-04-20 16:30     ` Leo
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2009-04-20 15:53 UTC (permalink / raw)
  To: martin rudalics; +Cc: Leo, 3033

> 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.

Indeed, thank you,


        Stefan






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#3033: 23.0.92; Try to auto fix whitespace loss? (y/n)
  2009-04-20  7:58   ` martin rudalics
  2009-04-20 15:53     ` Stefan Monnier
@ 2009-04-20 16:30     ` Leo
  1 sibling, 0 replies; 6+ messages in thread
From: Leo @ 2009-04-20 16:30 UTC (permalink / raw)
  To: martin rudalics; +Cc: 3033

2009/4/20 martin rudalics <rudalics@gmx.at>:
>> 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.

I tried the patch and it seems to work.

Thank you.

Leo






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-04-20 16:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-18  1:55 bug#3033: 23.0.92; Try to auto fix whitespace loss? (y/n) Chong Yidong
2009-04-18 13:24 ` Leo
2009-04-20  7:58   ` martin rudalics
2009-04-20 15:53     ` Stefan Monnier
2009-04-20 16:30     ` Leo
  -- strict thread matches above, loose matches on Subject: below --
2009-04-17 11:38 Leo

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).