GNU bug report logs -
#14381
24.3; smie-auto-fill infinite loop
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Fri, 10 May 2013 13:07:01 UTC
Severity: normal
Found in version 24.3
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14381 in the body.
You can then email your comments to 14381 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14381
; Package
emacs
.
(Fri, 10 May 2013 13:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leo Liu <sdl.web <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 10 May 2013 13:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
1. emacs -q
2. open the attached bug.m file
3. move to the end of second line
4. M-: (smie-auto-fill)
Should enter an infinite loop.
Debugger entered--Lisp error: (quit)
syntax-ppss()
smie-indent-comment-inside()
run-hook-with-args-until-success(smie-indent-comment-inside)
smie-indent-calculate()
(let* ((newcol (smie-indent-calculate)) (newgain (- curcol newcol))) (when (> newgain gain) (setq gain newgain) (setq bsf (point))))
(while (<= (setq curcol (current-column)) fc) (let* ((newcol (smie-indent-calculate)) (newgain (- curcol newcol))) (when (> newgain gain) (setq gain newgain) (setq bsf (point)))) (smie-indent-forward-token))
(let ((bsf (point)) (gain 0) curcol) (while (<= (setq curcol (current-column)) fc) (let* ((newcol (smie-indent-calculate)) (newgain (- curcol newcol))) (when (> newgain gain) (setq gain newgain) (setq bsf (point)))) (smie-indent-forward-token)) (when (> gain 0) (goto-char bsf) (newline-and-indent)))
(save-excursion (beginning-of-line) (smie-indent-forward-token) (let ((bsf (point)) (gain 0) curcol) (while (<= (setq curcol (current-column)) fc) (let* ((newcol (smie-indent-calculate)) (newgain (- curcol newcol))) (when (> newgain gain) (setq gain newgain) (setq bsf (point)))) (smie-indent-forward-token)) (when (> gain 0) (goto-char bsf) (newline-and-indent))))
(cond ((not (or (nth 8 (save-excursion (syntax-ppss (line-beginning-position)))) (nth 8 (syntax-ppss)))) (save-excursion (beginning-of-line) (smie-indent-forward-token) (let ((bsf (point)) (gain 0) curcol) (while (<= (setq curcol (current-column)) fc) (let* ((newcol ...) (newgain ...)) (when (> newgain gain) (setq gain newgain) (setq bsf ...))) (smie-indent-forward-token)) (when (> gain 0) (goto-char bsf) (newline-and-indent))))) (t (do-auto-fill)))
(while (and fc (> (current-column) fc)) (cond ((not (or (nth 8 (save-excursion (syntax-ppss ...))) (nth 8 (syntax-ppss)))) (save-excursion (beginning-of-line) (smie-indent-forward-token) (let ((bsf (point)) (gain 0) curcol) (while (<= (setq curcol ...) fc) (let* (... ...) (when ... ... ...)) (smie-indent-forward-token)) (when (> gain 0) (goto-char bsf) (newline-and-indent))))) (t (do-auto-fill))))
(let ((fc (current-fill-column))) (while (and fc (> (current-column) fc)) (cond ((not (or (nth 8 (save-excursion ...)) (nth 8 (syntax-ppss)))) (save-excursion (beginning-of-line) (smie-indent-forward-token) (let ((bsf ...) (gain 0) curcol) (while (<= ... fc) (let* ... ...) (smie-indent-forward-token)) (when (> gain 0) (goto-char bsf) (newline-and-indent))))) (t (do-auto-fill)))))
smie-auto-fill()
eval((smie-auto-fill) nil)
eval-expression((smie-auto-fill) nil)
call-interactively(eval-expression nil nil)
[bug.m (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14381
; Package
emacs
.
(Sun, 12 May 2013 03:30:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 14381 <at> debbugs.gnu.org (full text, mbox):
Hi Stefan,
On 2013-05-10 21:06 +0800, Leo Liu wrote:
> Should enter an infinite loop.
I would like to simplify and fix octave's fill-paragraph and auto-fill
feature. Could you help fix or direct me how to fix this bug and
bug#14303?
Thanks,
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14381
; Package
emacs
.
(Mon, 13 May 2013 15:45:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 14381 <at> debbugs.gnu.org (full text, mbox):
>> Should enter an infinite loop.
> I would like to simplify and fix octave's fill-paragraph and auto-fill
> feature.
Very good idea (when I moved octave to SMIE, I wanted to do that as
well, but ended up leaving it for later).
> Could you help fix or direct me how to fix this bug and bug#14303?
I think to fix/simplify them well, you'll need to touch some of the
generic code. For bug#14303, the first ting to do is to read the code
of comment-search-backward.
If I were you, I'd start with octave-auto-fill, trying to replace it
with something that hooks elsewhere, such as in fill-nobreak-predicate
and in comment-line-break-function.
For octave-fill-paragraph, I'm not sure what should be done there, but
the functionality looks like it could be useful in many
programming modes. So maybe it should be moved to prog-mode.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14381
; Package
emacs
.
(Fri, 17 May 2013 23:17:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 14381 <at> debbugs.gnu.org (full text, mbox):
On 2013-05-13 23:43 +0800, Stefan Monnier wrote:
> If I were you, I'd start with octave-auto-fill, trying to replace it
> with something that hooks elsewhere, such as in fill-nobreak-predicate
> and in comment-line-break-function.
Yes, this was exactly what I tried i.e. set comment-line-break-function
to a octave-specific function but found this hangs due to this bug. smie
sets normal-auto-fill-function to smie-auto-fill.
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14381
; Package
emacs
.
(Thu, 23 May 2013 17:47:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 14381 <at> debbugs.gnu.org (full text, mbox):
> 4. M-: (smie-auto-fill)
> Should enter an infinite loop.
I believe it's fixed now.
Stefan "who has the impression you're not familiar with Edebug"
bug marked as fixed in version 24.4, send any further explanations to
14381 <at> debbugs.gnu.org and Leo Liu <sdl.web <at> gmail.com>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 19 Jun 2013 17:28:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 18 Jul 2013 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 337 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.