* [konrad.podczeck@univie.ac.at: flyspell bug]
@ 2006-10-21 12:05 Richard Stallman
2006-10-21 13:47 ` martin rudalics
0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2006-10-21 12:05 UTC (permalink / raw)
Would someone please fix these, and then ack?
------- Start of forwarded message -------
Mime-Version: 1.0 (Apple Message framework v624)
Content-Type: text/plain; charset=US-ASCII; format=flowed
To: emacs-pretest-bug@gnu.org
From: Konrad Podczeck <konrad.podczeck@univie.ac.at>
Date: Fri, 20 Oct 2006 11:21:20 +0200
Subject: flyspell bug
X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO
autolearn=failed version=3.0.4
The recent incorporation into flyspell-large-region of checking for
duplicated words has led to the following bug:
If a large region contains text of the form:
x$ $y
or of the form
x# #y
(where x and y may be any words and there may be multiple white spaces
between the $'s or #'s),
then flyspell-large-region makes Emacs hanging (i.e. I have to press
Ctrl-g to make Emacs running again).
I regard the following as a flyspell bug, too: If duplicated words are
separated by more than one white space, then they are not detected.
Konrad Podczeck (Emacs-implementation used: Aquamacs Emacs for OSX)
_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [konrad.podczeck@univie.ac.at: flyspell bug]
2006-10-21 12:05 [konrad.podczeck@univie.ac.at: flyspell bug] Richard Stallman
@ 2006-10-21 13:47 ` martin rudalics
2006-10-22 21:30 ` Chong Yidong
2006-10-23 5:11 ` Richard Stallman
0 siblings, 2 replies; 6+ messages in thread
From: martin rudalics @ 2006-10-21 13:47 UTC (permalink / raw)
Cc: konrad.podczeck, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 685 bytes --]
> The recent incorporation into flyspell-large-region of checking for
> duplicated words has led to the following bug:
>
> If a large region contains text of the form:
>
> x$ $y
>
> or of the form
>
> x# #y
>
> (where x and y may be any words and there may be multiple white spaces
> between the $'s or #'s),
> then flyspell-large-region makes Emacs hanging (i.e. I have to press
> Ctrl-g to make Emacs running again).
>
>
> I regard the following as a flyspell bug, too: If duplicated words are
> separated by more than one white space, then they are not detected.
The attached patch tries to address these issues. Please make sure that it
doesn't break anything else.
[-- Attachment #2: flyspell.patch --]
[-- Type: text/plain, Size: 2268 bytes --]
*** flyspell.el Sat Oct 21 11:36:32 2006
--- flyspell.el Sat Oct 21 15:44:44 2006
***************
*** 1011,1021 ****
(not (memq (char-after (1- start)) '(?\} ?\\)))))
flyspell-mark-duplications-flag
(save-excursion
! (goto-char (1- start))
! (let ((p (flyspell-word-search-backward
! word
! (- start (1+ (- end start))))))
! (and p (/= p (1- start))))))
;; yes, this is a doublon
(flyspell-highlight-incorrect-region start end 'doublon)
nil)
--- 1011,1022 ----
(not (memq (char-after (1- start)) '(?\} ?\\)))))
flyspell-mark-duplications-flag
(save-excursion
! (goto-char start)
! (let* ((bound
! (- start (- end start) (- (skip-chars-backward " \t\n\f"))))
! (p (when (>= bound (point-min))
! (flyspell-word-search-backward word bound))))
! (and p (/= p start)))))
;; yes, this is a doublon
(flyspell-highlight-incorrect-region start end 'doublon)
nil)
***************
*** 1472,1478 ****
(flyspell-word) ; Make sure current word is checked
(backward-word 1)
(while (and (< (point) end)
! (re-search-forward "\\b\\([^ \n\t]+\\)[ \n\t]+\\1\\b"
end 'move))
(flyspell-word)
(backward-word 1))
--- 1473,1479 ----
(flyspell-word) ; Make sure current word is checked
(backward-word 1)
(while (and (< (point) end)
! (re-search-forward "\\(\\w+\\)\\s-+\\1\\>"
end 'move))
(flyspell-word)
(backward-word 1))
***************
*** 1708,1714 ****
;; now we can use a new overlay
(setq flyspell-overlay
(make-flyspell-overlay
! beg end 'flyspell-incorrect 'highlight)))))))
;;*---------------------------------------------------------------------*/
;;* flyspell-highlight-duplicate-region ... */
--- 1709,1717 ----
;; now we can use a new overlay
(setq flyspell-overlay
(make-flyspell-overlay
! beg end
! (if (eq poss 'doublon) 'flyspell-duplicate 'flyspell-incorrect)
! 'highlight)))))))
;;*---------------------------------------------------------------------*/
;;* flyspell-highlight-duplicate-region ... */
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [konrad.podczeck@univie.ac.at: flyspell bug]
2006-10-21 13:47 ` martin rudalics
@ 2006-10-22 21:30 ` Chong Yidong
2006-10-23 6:17 ` martin rudalics
2006-10-23 5:11 ` Richard Stallman
1 sibling, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2006-10-22 21:30 UTC (permalink / raw)
Cc: emacs-devel, rms, konrad.podczeck
martin rudalics <rudalics@gmx.at> writes:
>> The recent incorporation into flyspell-large-region of checking for
>> duplicated words has led to the following bug:
>>
>> If a large region contains text of the form:
>>
>> x$ $y
>>
>> or of the form
>>
>> x# #y
>>
>> (where x and y may be any words and there may be multiple white
>> spaces between the $'s or #'s),
>> then flyspell-large-region makes Emacs hanging (i.e. I have to press
>> Ctrl-g to make Emacs running again).
>>
>> I regard the following as a flyspell bug, too: If duplicated words
>> are separated by more than one white space, then they are not
>> detected.
>
> The attached patch tries to address these issues. Please make sure that it
> doesn't break anything else.
The patch looks right; I've checked it in. Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [konrad.podczeck@univie.ac.at: flyspell bug]
2006-10-21 13:47 ` martin rudalics
2006-10-22 21:30 ` Chong Yidong
@ 2006-10-23 5:11 ` Richard Stallman
1 sibling, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2006-10-23 5:11 UTC (permalink / raw)
Cc: konrad.podczeck, emacs-devel
It looks good to me. Please install it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [konrad.podczeck@univie.ac.at: flyspell bug]
2006-10-22 21:30 ` Chong Yidong
@ 2006-10-23 6:17 ` martin rudalics
2006-10-23 14:00 ` Chong Yidong
0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2006-10-23 6:17 UTC (permalink / raw)
Cc: emacs-devel, rms, konrad.podczeck
[-- Attachment #1: Type: text/plain, Size: 385 bytes --]
> The patch looks right; I've checked it in.
Konrad has detected a bug in it:
>> However there is a new bug now: Duplicated words that are separated by
>> a newline-character (e.g. "bug" at the end of some line and "bug" at
>> the beginning of the following line) are no longer detected.
Attached find a version that hopefully resolves this. I apologize for
the inconvenience.
[-- Attachment #2: flyspell.patch --]
[-- Type: text/plain, Size: 2279 bytes --]
*** flyspell.el Sat Oct 21 11:36:32 2006
--- flyspell.el Sun Oct 22 22:10:54 2006
***************
*** 1011,1021 ****
(not (memq (char-after (1- start)) '(?\} ?\\)))))
flyspell-mark-duplications-flag
(save-excursion
! (goto-char (1- start))
! (let ((p (flyspell-word-search-backward
! word
! (- start (1+ (- end start))))))
! (and p (/= p (1- start))))))
;; yes, this is a doublon
(flyspell-highlight-incorrect-region start end 'doublon)
nil)
--- 1011,1022 ----
(not (memq (char-after (1- start)) '(?\} ?\\)))))
flyspell-mark-duplications-flag
(save-excursion
! (goto-char start)
! (let* ((bound
! (- start (- end start) (- (skip-chars-backward " \t\n\f"))))
! (p (when (>= bound (point-min))
! (flyspell-word-search-backward word bound))))
! (and p (/= p start)))))
;; yes, this is a doublon
(flyspell-highlight-incorrect-region start end 'doublon)
nil)
***************
*** 1472,1478 ****
(flyspell-word) ; Make sure current word is checked
(backward-word 1)
(while (and (< (point) end)
! (re-search-forward "\\b\\([^ \n\t]+\\)[ \n\t]+\\1\\b"
end 'move))
(flyspell-word)
(backward-word 1))
--- 1473,1479 ----
(flyspell-word) ; Make sure current word is checked
(backward-word 1)
(while (and (< (point) end)
! (re-search-forward "\\<\\(\\w+\\)\\>[ \n\t\f]+\\1\\>"
end 'move))
(flyspell-word)
(backward-word 1))
***************
*** 1708,1714 ****
;; now we can use a new overlay
(setq flyspell-overlay
(make-flyspell-overlay
! beg end 'flyspell-incorrect 'highlight)))))))
;;*---------------------------------------------------------------------*/
;;* flyspell-highlight-duplicate-region ... */
--- 1709,1717 ----
;; now we can use a new overlay
(setq flyspell-overlay
(make-flyspell-overlay
! beg end
! (if (eq poss 'doublon) 'flyspell-duplicate 'flyspell-incorrect)
! 'highlight)))))))
;;*---------------------------------------------------------------------*/
;;* flyspell-highlight-duplicate-region ... */
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [konrad.podczeck@univie.ac.at: flyspell bug]
2006-10-23 6:17 ` martin rudalics
@ 2006-10-23 14:00 ` Chong Yidong
0 siblings, 0 replies; 6+ messages in thread
From: Chong Yidong @ 2006-10-23 14:00 UTC (permalink / raw)
Cc: emacs-devel, rms, konrad.podczeck
martin rudalics <rudalics@gmx.at> writes:
>> The patch looks right; I've checked it in.
>
> Konrad has detected a bug in it:
>
>>> However there is a new bug now: Duplicated words that are separated by
>>> a newline-character (e.g. "bug" at the end of some line and "bug" at
>>> the beginning of the following line) are no longer detected.
>
> Attached find a version that hopefully resolves this. I apologize for
> the inconvenience.
No problem; I installed it.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-10-23 14:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-21 12:05 [konrad.podczeck@univie.ac.at: flyspell bug] Richard Stallman
2006-10-21 13:47 ` martin rudalics
2006-10-22 21:30 ` Chong Yidong
2006-10-23 6:17 ` martin rudalics
2006-10-23 14:00 ` Chong Yidong
2006-10-23 5:11 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.