From b28de574112991bfd2234989d080e54f565a549c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Thu, 9 Nov 2017 20:33:02 +0000 Subject: [PATCH] Sort entries of the Flymake diagnostics buffer (bug#29175) Reported by Lele Gaifax . * lisp/progmodes/flymake.el (flymake--diagnostics-buffer-entries): Sort results of flymake-diagnostics. --- lisp/progmodes/flymake.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index e833cd949ee..921ac913309 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1137,7 +1137,8 @@ POS can be a buffer position or a button" (defun flymake--diagnostics-buffer-entries () (with-current-buffer flymake--diagnostics-buffer-source - (cl-loop for diag in (flymake-diagnostics) + (cl-loop for diag in + (cl-sort (flymake-diagnostics) #'< :key #'flymake-diagnostic-beg) for (line . col) = (save-excursion (goto-char (flymake--diag-beg diag)) -- 2.39.5