GNU bug report logs -
#12742
24.2; [PATCH] flymake cannot goto errors correctly in narrowed buffers
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Sat, 27 Oct 2012 09:29:02 UTC
Severity: wishlist
Tags: patch
Found in version 24.2
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 12742 in the body.
You can then email your comments to 12742 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#12742
; Package
emacs
.
(Sat, 27 Oct 2012 09:29:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leo <sdl.web <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 27 Oct 2012 09:29: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)]
In a narrowed buffer, both flymake-goto-next-error and
flymake-goto-prev-error stop working correctly. Any objection to install
the attached fix in the emacs-24 branch?
(ChangeLog change omitted for now).
Leo
[0001-Fix-flymake-error-navigation-in-narrowed-buffers.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12742
; Package
emacs
.
(Sat, 27 Oct 2012 10:12:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 12742 <at> debbugs.gnu.org (full text, mbox):
Flymake.el wasn't written with narrowed buffers in mind so the patch
only fix the problem partially. I'll work out a thorough patch later.
Leo
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Thu, 13 Feb 2014 23:55:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Leo <sdl.web <at> gmail.com>
:
bug acknowledged by developer.
(Thu, 13 Feb 2014 23:55:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 12742-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.4
Daniel Colascione wrote:
> ------------------------------------------------------------
> revno: 116436
> revision-id: dancol <at> dancol.org-20140213223729-66wcs7wdtxjgbuu3
> parent: eliz <at> gnu.org-20140213205407-wn5kv46oq3hw5sv8
> committer: Daniel Colascione <dancol <at> dancol.org>
> branch nick: trunk
> timestamp: Thu 2014-02-13 14:37:29 -0800
> message:
> Fix flymake in narrowed buffers
> modified:
> lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
> lisp/progmodes/flymake.el flymake.el-20091113204419-o5vbwnq5f7feedwu-3065
>
> === modified file 'lisp/ChangeLog'
> --- a/lisp/ChangeLog 2014-02-13 18:23:36 +0000
> +++ b/lisp/ChangeLog 2014-02-13 22:37:29 +0000
> @@ -1,3 +1,9 @@
> +2014-02-13 Daniel Colascione <dancol <at> dancol.org>
> +
> + * progmodes/flymake.el (flymake-post-syntax-check): Widen buffer
> + when adding overlays so that line numbers from compiler match line
> + numbers we use.
> +
> 2014-02-13 Glenn Morris <rgm <at> gnu.org>
>
> * mail/rmail.el (rmail-probe): Be less strict. (Bug#16743)
>
> === modified file 'lisp/progmodes/flymake.el'
> --- a/lisp/progmodes/flymake.el 2014-01-25 19:15:42 +0000
> +++ b/lisp/progmodes/flymake.el 2014-02-13 22:37:29 +0000
> @@ -555,29 +555,31 @@
> (setq flymake-is-running nil))))))))
>
> (defun flymake-post-syntax-check (exit-status command)
> - (setq flymake-err-info flymake-new-err-info)
> - (setq flymake-new-err-info nil)
> - (setq flymake-err-info
> - (flymake-fix-line-numbers
> - flymake-err-info 1 (count-lines (point-min) (point-max))))
> - (flymake-delete-own-overlays)
> - (flymake-highlight-err-lines flymake-err-info)
> - (let (err-count warn-count)
> - (setq err-count (flymake-get-err-count flymake-err-info "e"))
> - (setq warn-count (flymake-get-err-count flymake-err-info "w"))
> - (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)"
> - (buffer-name) err-count warn-count
> - (- (float-time) flymake-check-start-time))
> - (setq flymake-check-start-time nil)
> + (save-restriction
> + (widen)
> + (setq flymake-err-info flymake-new-err-info)
> + (setq flymake-new-err-info nil)
> + (setq flymake-err-info
> + (flymake-fix-line-numbers
> + flymake-err-info 1 (count-lines (point-min) (point-max))))
> + (flymake-delete-own-overlays)
> + (flymake-highlight-err-lines flymake-err-info)
> + (let (err-count warn-count)
> + (setq err-count (flymake-get-err-count flymake-err-info "e"))
> + (setq warn-count (flymake-get-err-count flymake-err-info "w"))
> + (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)"
> + (buffer-name) err-count warn-count
> + (- (float-time) flymake-check-start-time))
> + (setq flymake-check-start-time nil)
>
> - (if (and (equal 0 err-count) (equal 0 warn-count))
> - (if (equal 0 exit-status)
> - (flymake-report-status "" "") ; PASSED
> - (if (not flymake-check-was-interrupted)
> - (flymake-report-fatal-status "CFGERR"
> - (format "Configuration error has occurred while running %s" command))
> - (flymake-report-status nil ""))) ; "STOPPED"
> - (flymake-report-status (format "%d/%d" err-count warn-count) ""))))
> + (if (and (equal 0 err-count) (equal 0 warn-count))
> + (if (equal 0 exit-status)
> + (flymake-report-status "" "") ; PASSED
> + (if (not flymake-check-was-interrupted)
> + (flymake-report-fatal-status "CFGERR"
> + (format "Configuration error has occurred while running %s" command))
> + (flymake-report-status nil ""))) ; "STOPPED"
> + (flymake-report-status (format "%d/%d" err-count warn-count) "")))))
>
> (defun flymake-parse-output-and-residual (output)
> "Split OUTPUT into lines, merge in residual if necessary."
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 14 Mar 2014 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 96 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.