From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 11 13:06:47 2018 Received: (at submit) by debbugs.gnu.org; 11 Feb 2018 18:06:47 +0000 Received: from localhost ([127.0.0.1]:38590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekw1X-0005MP-8A for submit@debbugs.gnu.org; Sun, 11 Feb 2018 13:06:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekw1V-0005MB-7t for submit@debbugs.gnu.org; Sun, 11 Feb 2018 13:06:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekw1O-0002Yv-Nn for submit@debbugs.gnu.org; Sun, 11 Feb 2018 13:06:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43870) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ekw1O-0002Yj-IZ for submit@debbugs.gnu.org; Sun, 11 Feb 2018 13:06:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekw1N-0004lV-1h for bug-auctex@gnu.org; Sun, 11 Feb 2018 13:06:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekw1K-0002V2-9Q for bug-auctex@gnu.org; Sun, 11 Feb 2018 13:06:37 -0500 Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:38407) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ekw1J-0002UI-W7 for bug-auctex@gnu.org; Sun, 11 Feb 2018 13:06:34 -0500 Received: by mail-oi0-x22a.google.com with SMTP id j15so9582665oii.5 for ; Sun, 11 Feb 2018 10:06:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=S5c/luv8rFmrPJesHtuazH8uWpbJPy1ZeqXgp3e2Yqk=; b=mowH7/0/cf0RGCsmDpbokqtkCHJ0QoAMpTjxTEn00toebxLyWNB38LhhfvdN6ciES5 yo6q92Tl5hGqmgy45Y8OvkGxjm4lNNcFeg6qv05As/tsXG47AnhiDRRoLyl6e8RWxelX weGdYkB/AGc18mCmNU40BNxSd4CwlHcuzEo8WeKUy4w2yT6azdeFAW0zM/DkdhZJyCp+ 3Hb2r8OYOy5u8Hzikx+cM7nrFublHV3H6hKwBCf7yfCXCGlhMzehreREGhVN//qR5Xhg 0r+yY1sHMKL9aMx/xpzBNd6h+Vapijh8blXkBlanBKOtgB/qnJ2JfZ8Y78duUcIF61/y 9PjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=S5c/luv8rFmrPJesHtuazH8uWpbJPy1ZeqXgp3e2Yqk=; b=QzV6VPXEF9ccM53rPYd71fYhtepndvHnckUCTf5UEGrZGRY9JQSCs8QxJmffN8/B6z KHsvIus5I+tJwFUIFUnwJ2N4qhK4p08aEu58YANtBrM3T8Yryvyc05A99M34NYNpMq72 lEGt4dFS86motsCv7WDSrFOK2fiMrGNGMoyzhqH34dmjR1eNRLcENJGPpyNsC/LcYmWm j9rHKs5yHJtz8rmbosNsaitGrdIcvoxmvDnUidA/uwaHNKjSGECdSOQgHQ/2LrHp5FJ0 nB8btruwcA8FqifVnHtR4lfKL1o1KOT8vlgJ/KMGFwRGnqjsEnM6yLUFdEgIOtZfM9yd 5wew== X-Gm-Message-State: APf1xPBB0jE+4fdHFhnpmJpMtbGiTy2viVq3uLT/2m3HNUAvT9uqrlDV yiS18sBKQhB+XyIlaUDu/8GDVHYQ X-Google-Smtp-Source: AH8x22551BZ1bJXBQw8ENz2xvq+elx+qKjIb0DNFslb24QWsvd24vsGUzBY7Z28JQIxCXeRGTcpQog== X-Received: by 10.202.189.5 with SMTP id n5mr6326332oif.316.1518372392848; Sun, 11 Feb 2018 10:06:32 -0800 (PST) Received: from mars (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id g19sm3748972oth.9.2018.02.11.10.06.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 10:06:31 -0800 (PST) User-agent: mu4e 1.0; emacs 26.0.91 From: Alex Branham To: bug-auctex@gnu.org Subject: 2018-01-25; [patch] flymake support Date: Sun, 11 Feb 2018 12:06:56 -0600 Message-ID: <876073s8n3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain Flymake got a major rewrite in Emacs 26, the attached patch adds support for this in latex.el. Users can enable it by calling adding flymake-mode to LaTeX-mode-hook. >From 0b8eeebd01d0ed25823d4f40a7ab3cff0d150b8f Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Sun, 11 Feb 2018 11:54:09 -0600 Subject: [PATCH] Support flymake in Emacs 26+ using chktex --- latex.el | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/latex.el b/latex.el index c2d8a4ca..e3792faf 100644 --- a/latex.el +++ b/latex.el @@ -1,4 +1,4 @@ -;;; latex.el --- Support for LaTeX documents. +;;; latex.el --- Support for LaTeX documents. -*- lexical-binding: t; -*- ;; Copyright (C) 1991, 1993-2017 Free Software Foundation, Inc. @@ -6568,6 +6568,77 @@ function would return non-nil and `(match-string 1)' would return (1+ any-col) beg-col)))))))) +;; Flymake + +(defvar-local LaTeX--flymake-proc nil) + +(defun LaTeX-flymake (report-fn &rest _args) + "Setup flymake integration. + +REPORT-FN is flymake's callback function." + (unless (executable-find "chktex") + (error "Cannot find chktex")) + (when (process-live-p LaTeX--flymake-proc) + (kill-process LaTeX--flymake-proc)) + (let ((source (current-buffer))) + (save-restriction + (widen) + (setq + LaTeX--flymake-proc + (make-process + :name "LaTeX-flymake" :noquery t :connection-type 'pipe + :buffer (generate-new-buffer " *LaTeX-flymake*") + :command '("chktex" "--verbosity=0" "--quiet" "--inputfiles") + :sentinel + (lambda (proc _event) + (when (eq 'exit (process-status proc)) + (unwind-protect + (if (with-current-buffer source (eq proc LaTeX--flymake-proc)) + (with-current-buffer (process-buffer proc) + (goto-char (point-min)) + (cl-loop + while (search-forward-regexp + (rx line-start "stdin:" + ;; line + (group-n 1 (one-or-more num)) + ":" + ;; column + (group-n 2 (one-or-more num)) + ":" + ;; This is information about the + ;; number of the warning, which we + ;; probably don't care about: + (one-or-more num) + ":" + ;; Warning message: + (group-n 3 (one-or-more not-newline)) line-end) + nil t) + for msg = (match-string 3) + for (beg . end) = (flymake-diag-region + source + (string-to-number (match-string 1)) + (string-to-number (match-string 2))) + for type = :warning + collect (flymake-make-diagnostic source + beg + end + type + msg) + into diags + finally (funcall report-fn diags))) + (flymake-log :warning "Canceling obsolete check %s" + proc)) + (kill-buffer (process-buffer proc))))))) + (process-send-region LaTeX--flymake-proc (point-min) (point-max)) + (process-send-eof LaTeX--flymake-proc)))) + +(defun LaTeX-setup-flymake-backend () + "Setup flymake backend for LaTeX." + (add-hook 'flymake-diagnostic-functions 'LaTeX-flymake nil t)) + +(when (< 25 emacs-major-version) + (add-hook 'LaTeX-mode-hook 'LaTeX-setup-flymake-backend)) + (provide 'latex) ;;; latex.el ends here -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Support-flymake-in-Emacs-26-using-chktex.patch >From 0b8eeebd01d0ed25823d4f40a7ab3cff0d150b8f Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Sun, 11 Feb 2018 11:54:09 -0600 Subject: [PATCH] Support flymake in Emacs 26+ using chktex --- latex.el | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/latex.el b/latex.el index c2d8a4ca..e3792faf 100644 --- a/latex.el +++ b/latex.el @@ -1,4 +1,4 @@ -;;; latex.el --- Support for LaTeX documents. +;;; latex.el --- Support for LaTeX documents. -*- lexical-binding: t; -*- ;; Copyright (C) 1991, 1993-2017 Free Software Foundation, Inc. @@ -6568,6 +6568,77 @@ function would return non-nil and `(match-string 1)' would return (1+ any-col) beg-col)))))))) +;; Flymake + +(defvar-local LaTeX--flymake-proc nil) + +(defun LaTeX-flymake (report-fn &rest _args) + "Setup flymake integration. + +REPORT-FN is flymake's callback function." + (unless (executable-find "chktex") + (error "Cannot find chktex")) + (when (process-live-p LaTeX--flymake-proc) + (kill-process LaTeX--flymake-proc)) + (let ((source (current-buffer))) + (save-restriction + (widen) + (setq + LaTeX--flymake-proc + (make-process + :name "LaTeX-flymake" :noquery t :connection-type 'pipe + :buffer (generate-new-buffer " *LaTeX-flymake*") + :command '("chktex" "--verbosity=0" "--quiet" "--inputfiles") + :sentinel + (lambda (proc _event) + (when (eq 'exit (process-status proc)) + (unwind-protect + (if (with-current-buffer source (eq proc LaTeX--flymake-proc)) + (with-current-buffer (process-buffer proc) + (goto-char (point-min)) + (cl-loop + while (search-forward-regexp + (rx line-start "stdin:" + ;; line + (group-n 1 (one-or-more num)) + ":" + ;; column + (group-n 2 (one-or-more num)) + ":" + ;; This is information about the + ;; number of the warning, which we + ;; probably don't care about: + (one-or-more num) + ":" + ;; Warning message: + (group-n 3 (one-or-more not-newline)) line-end) + nil t) + for msg = (match-string 3) + for (beg . end) = (flymake-diag-region + source + (string-to-number (match-string 1)) + (string-to-number (match-string 2))) + for type = :warning + collect (flymake-make-diagnostic source + beg + end + type + msg) + into diags + finally (funcall report-fn diags))) + (flymake-log :warning "Canceling obsolete check %s" + proc)) + (kill-buffer (process-buffer proc))))))) + (process-send-region LaTeX--flymake-proc (point-min) (point-max)) + (process-send-eof LaTeX--flymake-proc)))) + +(defun LaTeX-setup-flymake-backend () + "Setup flymake backend for LaTeX." + (add-hook 'flymake-diagnostic-functions 'LaTeX-flymake nil t)) + +(when (< 25 emacs-major-version) + (add-hook 'LaTeX-mode-hook 'LaTeX-setup-flymake-backend)) + (provide 'latex) ;;; latex.el ends here -- 2.16.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 15 21:35:52 2018 Received: (at 30423) by debbugs.gnu.org; 16 Feb 2018 02:35:52 +0000 Received: from localhost ([127.0.0.1]:45446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emVsO-00025r-2S for submit@debbugs.gnu.org; Thu, 15 Feb 2018 21:35:52 -0500 Received: from mail-ot0-f180.google.com ([74.125.82.180]:37305) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emVsL-00025e-Oi for 30423@debbugs.gnu.org; Thu, 15 Feb 2018 21:35:50 -0500 Received: by mail-ot0-f180.google.com with SMTP id e64so1600475ote.4 for <30423@debbugs.gnu.org>; Thu, 15 Feb 2018 18:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:in-reply-to:date:message-id :mime-version; bh=FuTOIuuIexx4t6tNakRHergdE6h4RmetpaDo284fIvA=; b=Wc14E0Q5PqQkoZRgrPsAtrvQdaWmwXYAhJyUdCyhJDedB86kIDI37HGihhkfoHIAek xQD233a+acLr5sy4A6n1Xl8OnqvBKerbtTzcLHxjGIR9q2HHLOyd4AicAa6aEqu53olg XJ8QMl1EY5VhmxNQPv3leUh5aW+I+RESyy64TPgkliqP+/NNUmdzIPAETwYb9V7pxwAc TcOsn/SvmBi23PPzS6WW2pADlN0Q2okZlG1uGhSfcb6RrBWKI76jo1uB5FNhnw2+byZ0 84JWuytpNJpEjRW9GOGOBQJ8Mww++asFI4d0sc1i/48FcG2ei1k7kVo8UpZ31vdKyoXJ 5J3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject :in-reply-to:date:message-id:mime-version; bh=FuTOIuuIexx4t6tNakRHergdE6h4RmetpaDo284fIvA=; b=fezviX2OJXkl3eLk9eL0YiBNpZdJUrBJjr6tY/fRoo9Dqb6FcSZmQN/28fuRaYM/al 5Wb5QSwbI6JCv/CLTJsnfgITgWcD9pbM58vhj5HyCdkwEvkfN1VDAnskdN2+MCpBHiHV OHjqEH0+bymOwfbwul97VAuyPeOxPmYbaRJ9qXTXXvS/z+a2DHi+yTRb1KUSC+6sdZUo ciSy2wElZAvqUIyl5JQO8ThXnkugU5SEWNZY0P4+Dnpw1MP3pEEUAt9Vlo4LaLfwH+0E aytJJ7j6UhU3+xj1/g9Fob95f0iHWq+s88eSoWc+QRQb1ZC+UrEeVRXG4Q7QoExyao7a ZaIg== X-Gm-Message-State: APf1xPDTMAoRRzD/JUeULclNRBGlxgo2Jk7oZU5SpAGD95CX9g8QQMAO c7dUxKGPkZF7L/yUwWUp/Htng4yN X-Google-Smtp-Source: AH8x226TGHXITfEaHiurWjA5l8VSWO0m5wthXySs5zsRqtMZp4xOjBMRyg4+C910rDwxxVh0uRWWoQ== X-Received: by 10.157.55.182 with SMTP id x51mr3272734otb.200.1518748543848; Thu, 15 Feb 2018 18:35:43 -0800 (PST) Received: from mars (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id n189sm4592028oif.28.2018.02.15.18.35.43 for <30423@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2018 18:35:43 -0800 (PST) References: <876073s8n3.fsf@gmail.com> User-agent: mu4e 1.0; emacs 26.0.91 From: Alex Branham To: 30423@debbugs.gnu.org Subject: Re: 2018-01-25; [patch] flymake support In-reply-to: <876073s8n3.fsf@gmail.com> Date: Thu, 15 Feb 2018 20:36:13 -0600 Message-ID: <87fu614q5e.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30423 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Has anyone had time to look at this or test it out? On Sun 11 Feb 2018 at 12:06, Alex Branham wrote: > Flymake got a major rewrite in Emacs 26, the attached patch adds support for this in latex.el. Users can enable it by calling adding flymake-mode to LaTeX-mode-hook. > > > > From 0b8eeebd01d0ed25823d4f40a7ab3cff0d150b8f Mon Sep 17 00:00:00 2001 > From: Alex Branham > Date: Sun, 11 Feb 2018 11:54:09 -0600 > Subject: [PATCH] Support flymake in Emacs 26+ using chktex > > --- > latex.el | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 72 insertions(+), 1 deletion(-) > > diff --git a/latex.el b/latex.el > index c2d8a4ca..e3792faf 100644 > --- a/latex.el > +++ b/latex.el > @@ -1,4 +1,4 @@ > -;;; latex.el --- Support for LaTeX documents. > +;;; latex.el --- Support for LaTeX documents. -*- lexical-binding: t; -*- > > ;; Copyright (C) 1991, 1993-2017 Free Software Foundation, Inc. > > @@ -6568,6 +6568,77 @@ function would return non-nil and `(match-string 1)' would return > (1+ any-col) > beg-col)))))))) > > +;; Flymake > + > +(defvar-local LaTeX--flymake-proc nil) > + > +(defun LaTeX-flymake (report-fn &rest _args) > + "Setup flymake integration. > + > +REPORT-FN is flymake's callback function." > + (unless (executable-find "chktex") > + (error "Cannot find chktex")) > + (when (process-live-p LaTeX--flymake-proc) > + (kill-process LaTeX--flymake-proc)) > + (let ((source (current-buffer))) > + (save-restriction > + (widen) > + (setq > + LaTeX--flymake-proc > + (make-process > + :name "LaTeX-flymake" :noquery t :connection-type 'pipe > + :buffer (generate-new-buffer " *LaTeX-flymake*") > + :command '("chktex" "--verbosity=0" "--quiet" "--inputfiles") > + :sentinel > + (lambda (proc _event) > + (when (eq 'exit (process-status proc)) > + (unwind-protect > + (if (with-current-buffer source (eq proc LaTeX--flymake-proc)) > + (with-current-buffer (process-buffer proc) > + (goto-char (point-min)) > + (cl-loop > + while (search-forward-regexp > + (rx line-start "stdin:" > + ;; line > + (group-n 1 (one-or-more num)) > + ":" > + ;; column > + (group-n 2 (one-or-more num)) > + ":" > + ;; This is information about the > + ;; number of the warning, which we > + ;; probably don't care about: > + (one-or-more num) > + ":" > + ;; Warning message: > + (group-n 3 (one-or-more not-newline)) line-end) > + nil t) > + for msg = (match-string 3) > + for (beg . end) = (flymake-diag-region > + source > + (string-to-number (match-string 1)) > + (string-to-number (match-string 2))) > + for type = :warning > + collect (flymake-make-diagnostic source > + beg > + end > + type > + msg) > + into diags > + finally (funcall report-fn diags))) > + (flymake-log :warning "Canceling obsolete check %s" > + proc)) > + (kill-buffer (process-buffer proc))))))) > + (process-send-region LaTeX--flymake-proc (point-min) (point-max)) > + (process-send-eof LaTeX--flymake-proc)))) > + > +(defun LaTeX-setup-flymake-backend () > + "Setup flymake backend for LaTeX." > + (add-hook 'flymake-diagnostic-functions 'LaTeX-flymake nil t)) > + > +(when (< 25 emacs-major-version) > + (add-hook 'LaTeX-mode-hook 'LaTeX-setup-flymake-backend)) > + > (provide 'latex) > > ;;; latex.el ends here > -- > 2.16.1 > > From 0b8eeebd01d0ed25823d4f40a7ab3cff0d150b8f Mon Sep 17 00:00:00 2001 > From: Alex Branham > Date: Sun, 11 Feb 2018 11:54:09 -0600 > Subject: [PATCH] Support flymake in Emacs 26+ using chktex > > --- > latex.el | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 72 insertions(+), 1 deletion(-) > > diff --git a/latex.el b/latex.el > index c2d8a4ca..e3792faf 100644 > --- a/latex.el > +++ b/latex.el > @@ -1,4 +1,4 @@ > -;;; latex.el --- Support for LaTeX documents. > +;;; latex.el --- Support for LaTeX documents. -*- lexical-binding: t; -*- > > ;; Copyright (C) 1991, 1993-2017 Free Software Foundation, Inc. > > @@ -6568,6 +6568,77 @@ function would return non-nil and `(match-string 1)' would return > (1+ any-col) > beg-col)))))))) > > +;; Flymake > + > +(defvar-local LaTeX--flymake-proc nil) > + > +(defun LaTeX-flymake (report-fn &rest _args) > + "Setup flymake integration. > + > +REPORT-FN is flymake's callback function." > + (unless (executable-find "chktex") > + (error "Cannot find chktex")) > + (when (process-live-p LaTeX--flymake-proc) > + (kill-process LaTeX--flymake-proc)) > + (let ((source (current-buffer))) > + (save-restriction > + (widen) > + (setq > + LaTeX--flymake-proc > + (make-process > + :name "LaTeX-flymake" :noquery t :connection-type 'pipe > + :buffer (generate-new-buffer " *LaTeX-flymake*") > + :command '("chktex" "--verbosity=0" "--quiet" "--inputfiles") > + :sentinel > + (lambda (proc _event) > + (when (eq 'exit (process-status proc)) > + (unwind-protect > + (if (with-current-buffer source (eq proc LaTeX--flymake-proc)) > + (with-current-buffer (process-buffer proc) > + (goto-char (point-min)) > + (cl-loop > + while (search-forward-regexp > + (rx line-start "stdin:" > + ;; line > + (group-n 1 (one-or-more num)) > + ":" > + ;; column > + (group-n 2 (one-or-more num)) > + ":" > + ;; This is information about the > + ;; number of the warning, which we > + ;; probably don't care about: > + (one-or-more num) > + ":" > + ;; Warning message: > + (group-n 3 (one-or-more not-newline)) line-end) > + nil t) > + for msg = (match-string 3) > + for (beg . end) = (flymake-diag-region > + source > + (string-to-number (match-string 1)) > + (string-to-number (match-string 2))) > + for type = :warning > + collect (flymake-make-diagnostic source > + beg > + end > + type > + msg) > + into diags > + finally (funcall report-fn diags))) > + (flymake-log :warning "Canceling obsolete check %s" > + proc)) > + (kill-buffer (process-buffer proc))))))) > + (process-send-region LaTeX--flymake-proc (point-min) (point-max)) > + (process-send-eof LaTeX--flymake-proc)))) > + > +(defun LaTeX-setup-flymake-backend () > + "Setup flymake backend for LaTeX." > + (add-hook 'flymake-diagnostic-functions 'LaTeX-flymake nil t)) > + > +(when (< 25 emacs-major-version) > + (add-hook 'LaTeX-mode-hook 'LaTeX-setup-flymake-backend)) > + > (provide 'latex) > > ;;; latex.el ends here From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 16 03:38:25 2018 Received: (at 30423) by debbugs.gnu.org; 16 Feb 2018 08:38:25 +0000 Received: from localhost ([127.0.0.1]:45603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1embXF-0004nM-3F for submit@debbugs.gnu.org; Fri, 16 Feb 2018 03:38:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1embXD-0004n7-5o for 30423@debbugs.gnu.org; Fri, 16 Feb 2018 03:38:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1embX3-0003Kr-UK for 30423@debbugs.gnu.org; Fri, 16 Feb 2018 03:38:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1embX3-0003KZ-Pg for 30423@debbugs.gnu.org; Fri, 16 Feb 2018 03:38:13 -0500 Received: from mail-io0-f181.google.com ([209.85.223.181]:38067) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1embX3-0006A5-7e for 30423@debbugs.gnu.org; Fri, 16 Feb 2018 03:38:13 -0500 Received: by mail-io0-f181.google.com with SMTP id d13so3432947iog.5 for <30423@debbugs.gnu.org>; Fri, 16 Feb 2018 00:38:13 -0800 (PST) X-Gm-Message-State: APf1xPBBM5rXntrhaeqhom5dMOe3y3M2T/yXY9M1tQBXud0NKRyXn4d5 fv/73BrsPWncH77/T5DdwfuEw8VWqo9XLUhOO9w= X-Google-Smtp-Source: AH8x225OLi74UezQHF9ZeAYP5EUGIg8+496YNCg1V4U/7r/VfcaO5HgAnwiRpg3lyyPGMyd2/v9R9X6ITjqh3LvycK8= X-Received: by 10.107.107.1 with SMTP id g1mr7141607ioc.63.1518770292527; Fri, 16 Feb 2018 00:38:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.10.130 with HTTP; Fri, 16 Feb 2018 00:37:32 -0800 (PST) In-Reply-To: <876073s8n3.fsf@gmail.com> References: <876073s8n3.fsf@gmail.com> From: =?UTF-8?Q?Mos=C3=A8_Giordano?= Date: Fri, 16 Feb 2018 09:37:32 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#30423: 2018-01-25; [patch] flymake support To: Alex Branham Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30423 Cc: 30423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi Alex, thanks again for your contribution. I think it's fine in principle to support Flymake, as long as this doesn't introduce dependence on external packages. We strive to keep dependencies as low as possible. 2018-02-11 19:06 GMT+01:00 Alex Branham : > Flymake got a major rewrite in Emacs 26, the attached patch adds support = for this in latex.el. Users can enable it by calling adding flymake-mode to= LaTeX-mode-hook. > > > > From 0b8eeebd01d0ed25823d4f40a7ab3cff0d150b8f Mon Sep 17 00:00:00 2001 > From: Alex Branham > Date: Sun, 11 Feb 2018 11:54:09 -0600 > Subject: [PATCH] Support flymake in Emacs 26+ using chktex > > --- > latex.el | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++++- > 1 file changed, 72 insertions(+), 1 deletion(-) > > diff --git a/latex.el b/latex.el > index c2d8a4ca..e3792faf 100644 > --- a/latex.el > +++ b/latex.el > @@ -1,4 +1,4 @@ > -;;; latex.el --- Support for LaTeX documents. > +;;; latex.el --- Support for LaTeX documents. -*- lexical-binding: t; -= *- I'm concerned by this change. We haven't used lexical binding so far because we used to support very old Emacsens. While this change may be desirable, I've the feeling that AUCTeX relies on dynamic binding. I've opened a ticket as a memo for anyone willing to work on it: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D30484. Does your patch fundamentally rely on lexical binding or can work also with dynamic binding? In addition, I'm not sure latex.el is the right place for this. The file contains only stuff for editing LaTeX documents. For example, support for ispell is in its own module, required by latex.el. What other people thinks about this? Bye, Mos=C3=A8 From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 16 10:10:05 2018 Received: (at 30423) by debbugs.gnu.org; 16 Feb 2018 15:10:06 +0000 Received: from localhost ([127.0.0.1]:47065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emheH-0005hN-JY for submit@debbugs.gnu.org; Fri, 16 Feb 2018 10:10:05 -0500 Received: from mail-ot0-f178.google.com ([74.125.82.178]:33539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emheF-0005gp-M9 for 30423@debbugs.gnu.org; Fri, 16 Feb 2018 10:10:04 -0500 Received: by mail-ot0-f178.google.com with SMTP id q9so2966663oti.0 for <30423@debbugs.gnu.org>; Fri, 16 Feb 2018 07:10:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=1Rgba+YMzaBHLYBWnbOgju5qq6ZRwAziHR6SFwobr5c=; b=isqu0i6MBQGXuiCWEkQPGf482ZaEieJS5CXzv4EOrlMlda3ZMiEAD6VZ85aarhqKgF 7jwP1ioPVeiZWhNrovukpyoDmsExMdnXyhxQBFFypaAhZkWRERBUJ5g7o17RmNgLu6oJ m/wSg+bZoOUqCWpPlmpc8s6n/3CRSGRzIC0LyH2wz3fbZeRInltLWR8YLFOSCf5C6Kp1 8RggEzuzThl4iZYvzTMrNOu1G146NGT+NCppqV1h/p3LBqogSakYyewnkSN309Juf8o7 U9BJfLd0EAQfGRrkWZtlRb/A1gTJahm+/9oC/fu5ArKj9DpUn0n6bmC2aOyvhik6G58X Y3rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=1Rgba+YMzaBHLYBWnbOgju5qq6ZRwAziHR6SFwobr5c=; b=RcqJhxLknsThOYAVKE6idPzlccDoIFQltUnx1WKfdBDiUcxT17poSfnhvJk6S05jbR QHslW/In29N8GmsZ70f7gCbqW6LffcKtCMuPMK7C2V3Ct2g+mdkxg7//QoJCu+N3uHBI yyUe9Di+JiiKV3czt54HsMA0i5Wt8FxqrDCAp1Qop/vrQdFJM3vYEDOuadG/GgUqJA5q P57fiPfnIIACnEIRNQDGBJTuGbn3xw5J7YVfeFNBedG2AqldXvhTmDHWcPiT0zml7LHC k+znjocYAliHKioeJgadkduu9r2Og4pnRWprIitFGxbx5sdNEoHjTtOmubJRKwauhSXB VBjQ== X-Gm-Message-State: APf1xPDQQResirIHAod4awEl26phzmTSdoiBmhg3RB6OZ6wOUUc4d3+X KhdJT3iathwF3Cly5ilFDU+PRHJ6 X-Google-Smtp-Source: AH8x226/s1XDUfPa86XOmkVKMu8ozhigC2qkGqQHUJxhDzr55qIODt7ie/7HNLJG94WLvaDqIcfiKw== X-Received: by 10.157.11.122 with SMTP id p55mr4855829otd.272.1518793797972; Fri, 16 Feb 2018 07:09:57 -0800 (PST) Received: from mars (nat-128-62-63-249.public.utexas.edu. [128.62.63.249]) by smtp.gmail.com with ESMTPSA id i11sm9469317oth.5.2018.02.16.07.09.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Feb 2018 07:09:57 -0800 (PST) References: <876073s8n3.fsf@gmail.com> User-agent: mu4e 1.0; emacs 26.0.91 From: Alex Branham To: =?utf-8?Q?Mos=C3=A8?= Giordano Subject: Re: bug#30423: 2018-01-25; [patch] flymake support In-reply-to: Date: Fri, 16 Feb 2018 09:10:28 -0600 Message-ID: <87d1153r8b.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30423 Cc: 30423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Fri 16 Feb 2018 at 02:37, Mos=C3=A8 Giordano wrote: > Hi Alex, > > thanks again for your contribution. I think it's fine in principle to > support Flymake, as long as this doesn't introduce dependence on > external packages. We strive to keep dependencies as low as possible. Understood, no dependencies added here. > 2018-02-11 19:06 GMT+01:00 Alex Branham : >> Flymake got a major rewrite in Emacs 26, the attached patch adds support= for this in latex.el. Users can enable it by calling adding flymake-mode t= o LaTeX-mode-hook. >> >> From 0b8eeebd01d0ed25823d4f40a7ab3cff0d150b8f Mon Sep 17 00:00:00 2001 >> From: Alex Branham >> Date: Sun, 11 Feb 2018 11:54:09 -0600 >> Subject: [PATCH] Support flymake in Emacs 26+ using chktex >> >> --- >> latex.el | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++- >> 1 file changed, 72 insertions(+), 1 deletion(-) >> >> diff --git a/latex.el b/latex.el >> index c2d8a4ca..e3792faf 100644 >> --- a/latex.el >> +++ b/latex.el >> @@ -1,4 +1,4 @@ >> -;;; latex.el --- Support for LaTeX documents. >> +;;; latex.el --- Support for LaTeX documents. -*- lexical-binding: t; = -*- > > I'm concerned by this change. We haven't used lexical binding so far > because we used to support very old Emacsens. While this change may > be desirable, I've the feeling that AUCTeX relies on dynamic binding. > I've opened a ticket as a memo for anyone willing to work on it: > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D30484. I believe lexical binding was added in Emacs 24. Since auctex requires Emacs 24.3 or newer, I don't think this should be an issue. Or am I missing something? > Does your patch fundamentally rely on lexical binding or can work also > with dynamic binding? As written, it won't work with dynamic binding. > In addition, I'm not sure latex.el is the right place for this. The > file contains only stuff for editing LaTeX documents. For example, > support for ispell is in its own module, required by latex.el. What > other people thinks about this? We could kill two birds with one stone by adding a new file latex-flymake.el or something that uses lexical-binding. Thanks for the comments! Alex From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 16 11:57:28 2018 Received: (at 30423) by debbugs.gnu.org; 16 Feb 2018 16:57:28 +0000 Received: from localhost ([127.0.0.1]:47142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emjKC-0008Ot-Bu for submit@debbugs.gnu.org; Fri, 16 Feb 2018 11:57:28 -0500 Received: from mail-ot0-f178.google.com ([74.125.82.178]:33281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emjKB-0008Oh-7S for 30423@debbugs.gnu.org; Fri, 16 Feb 2018 11:57:27 -0500 Received: by mail-ot0-f178.google.com with SMTP id q9so3281583oti.0 for <30423@debbugs.gnu.org>; Fri, 16 Feb 2018 08:57:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:cc:subject:date:message-id:mime-version; bh=epMD43iHcSPGz5a3fctm74MtTPzu3Jc3/y+P/jo5Em4=; b=tYqzBH/Es4pMVSbPJ/PKx5pGUhDwwf/z4DTzhvGuXqCEM8F05fn7Bd1Xlo/702+NT0 u+n8NZh71MQr04X5UfYEzqwpqHqdWrYRWNm5zq6ETk1kefYJnJW0BsxX+oKhmh09GfAm osZF5Qx+eu4vLB610IknGx80OrtJJk6a0oRNDDtJVa9gQqBB+fOLumFEnmsL1FDCivsb NCGLYgszswfOkXcqer8s9G7VC4hnhs7KV5P7dmzDTNiFrrJjIzy6lBIQprMRPBIq5JQX 27/R73bYNrHHN0x/lJA3cqZI8Lv0gYG7Fg6THunOOq6PqLqtLiaTUeEE/B8XOKpijMQJ yPyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:cc:subject:date:message-id :mime-version; bh=epMD43iHcSPGz5a3fctm74MtTPzu3Jc3/y+P/jo5Em4=; b=MlFatQaRqLkg6pVCfPOiyEXvrQGnK6FZn+DLVbkuIeaauz45drKSYuQE/c5cAoDwcZ dnExjuK0dk5ihJ4+MHw+1HQRg8nlTbfEdXmHkp8vcZAngqKezsdiNOmsr3ms6yU7B/c2 Ip2iXu1x8PlP2T3FDvg7PXjFK1rxWNX4p/4SA3GGkQJCZUi9CGVBLRQJoLabkqZ9IoLv fBwwF+HY7CZd1CXHLua5zJmEehKT+iBVaGB86sTac0E9W64+HRDhsNBerkOzYDwCA1jg fwcHLQ/eG/QSaKQIobnrfE9Eduj7M84NihjPfEmd9TVBn5emUkiHJXMqMgV3zuXz41O1 YhMg== X-Gm-Message-State: APf1xPCnRxsdGFByGbDNLSKazqlYJ73nL8hY4aYvjkvlxKEsfZZd3fnz Wlaa6N5CCo2K4JNGuk2n1qQ2paSI X-Google-Smtp-Source: AH8x225Oth56k7+32if7yWfW9gnLg5yNGLK0YDZh+cYst/VqBABaxB9IylwUgOiauCS2VhyWOwthUQ== X-Received: by 10.157.43.125 with SMTP id f58mr2968317otd.206.1518800241044; Fri, 16 Feb 2018 08:57:21 -0800 (PST) Received: from mars (nat-128-62-63-249.public.utexas.edu. [128.62.63.249]) by smtp.gmail.com with ESMTPSA id q57sm10035844otq.25.2018.02.16.08.57.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Feb 2018 08:57:19 -0800 (PST) User-agent: mu4e 1.0; emacs 26.0.91 From: Alex Branham To: =?utf-8?Q?Mos=C3=A8?= Giordano Subject: separate flymake into latex-flymake.el Date: Fri, 16 Feb 2018 10:57:49 -0600 Message-ID: <87wozcna7m.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30423 Cc: 30423@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Here's a different version of the patch I sent with flymake support in its own file. I also removed the lexical-binding from latex.el. >From b373d749d85addd82d17fe4b6c6ec92a0c52e12b Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Fri, 16 Feb 2018 10:55:52 -0600 Subject: [PATCH] Support flymake in Emacs 26+ using chktex --- latex-flymake.el | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ latex.el | 3 ++ 2 files changed, 89 insertions(+) create mode 100644 latex-flymake.el diff --git a/latex-flymake.el b/latex-flymake.el new file mode 100644 index 00000000..e77e0591 --- /dev/null +++ b/latex-flymake.el @@ -0,0 +1,86 @@ +;;; latex-flymake.el --- Flymake integration -*- lexical-binding: t; -*- + +;;; Commentary: +;; This file provides flymake integration for latex documents using +;; "chktex" as a backend. You must be running Emacs 26 or newer. +;; Enable it by adding the following to your init file: + +;; (add-hook 'LaTeX-mode-hook flymake-mode) + +;;; Code: + +(eval-when-compile + (require 'cl-lib)) +(require 'flymake) + +(defvar-local LaTeX--flymake-proc nil) + +(defun LaTeX-flymake (report-fn &rest _args) + "Setup flymake integration. + +REPORT-FN is flymake's callback function." + (unless (executable-find "chktex") + (error "Cannot find chktex")) + (when (process-live-p LaTeX--flymake-proc) + (kill-process LaTeX--flymake-proc)) + (let ((source (current-buffer))) + (save-restriction + (widen) + (setq + LaTeX--flymake-proc + (make-process + :name "LaTeX-flymake" :noquery t :connection-type 'pipe + :buffer (generate-new-buffer " *LaTeX-flymake*") + :command '("chktex" "--verbosity=0" "--quiet" "--inputfiles") + :sentinel + (lambda (proc _event) + (when (eq 'exit (process-status proc)) + (unwind-protect + (if (with-current-buffer source (eq proc LaTeX--flymake-proc)) + (with-current-buffer (process-buffer proc) + (goto-char (point-min)) + (cl-loop + while (search-forward-regexp + (rx line-start "stdin:" + ;; line + (group-n 1 (one-or-more num)) + ":" + ;; column + (group-n 2 (one-or-more num)) + ":" + ;; This is information about the + ;; number of the warning, which we + ;; probably don't care about: + (one-or-more num) + ":" + ;; Warning message: + (group-n 3 (one-or-more not-newline)) line-end) + nil t) + for msg = (match-string 3) + for (beg . end) = (flymake-diag-region + source + (string-to-number (match-string 1)) + (string-to-number (match-string 2))) + for type = :warning + collect (flymake-make-diagnostic source + beg + end + type + msg) + into diags + finally (funcall report-fn diags))) + (flymake-log :warning "Canceling obsolete check %s" + proc)) + (kill-buffer (process-buffer proc))))))) + (process-send-region LaTeX--flymake-proc (point-min) (point-max)) + (process-send-eof LaTeX--flymake-proc)))) + +(defun LaTeX-setup-flymake-backend () + "Setup flymake backend for LaTeX." + (add-hook 'flymake-diagnostic-functions 'LaTeX-flymake nil t)) + +(when (< 25 emacs-major-version) + (add-hook 'LaTeX-mode-hook #'LaTeX-setup-flymake-backend)) + +(provide 'latex-flymake) +;;; latex-flymake.el ends here diff --git a/latex.el b/latex.el index c2d8a4ca..2d7f8223 100644 --- a/latex.el +++ b/latex.el @@ -31,6 +31,9 @@ (require 'tex) (require 'tex-style) (require 'tex-ispell) +(when (<= 26 emacs-major-version) + ;; latex-flymake requires Emacs 26. + (require 'latex-flymake)) (eval-when-compile (require 'cl)) ;FIXME: Use cl-lib. ;;; Syntax -- 2.16.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Support-flymake-in-Emacs-26-using-chktex.patch >From b373d749d85addd82d17fe4b6c6ec92a0c52e12b Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Fri, 16 Feb 2018 10:55:52 -0600 Subject: [PATCH] Support flymake in Emacs 26+ using chktex --- latex-flymake.el | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ latex.el | 3 ++ 2 files changed, 89 insertions(+) create mode 100644 latex-flymake.el diff --git a/latex-flymake.el b/latex-flymake.el new file mode 100644 index 00000000..e77e0591 --- /dev/null +++ b/latex-flymake.el @@ -0,0 +1,86 @@ +;;; latex-flymake.el --- Flymake integration -*- lexical-binding: t; -*- + +;;; Commentary: +;; This file provides flymake integration for latex documents using +;; "chktex" as a backend. You must be running Emacs 26 or newer. +;; Enable it by adding the following to your init file: + +;; (add-hook 'LaTeX-mode-hook flymake-mode) + +;;; Code: + +(eval-when-compile + (require 'cl-lib)) +(require 'flymake) + +(defvar-local LaTeX--flymake-proc nil) + +(defun LaTeX-flymake (report-fn &rest _args) + "Setup flymake integration. + +REPORT-FN is flymake's callback function." + (unless (executable-find "chktex") + (error "Cannot find chktex")) + (when (process-live-p LaTeX--flymake-proc) + (kill-process LaTeX--flymake-proc)) + (let ((source (current-buffer))) + (save-restriction + (widen) + (setq + LaTeX--flymake-proc + (make-process + :name "LaTeX-flymake" :noquery t :connection-type 'pipe + :buffer (generate-new-buffer " *LaTeX-flymake*") + :command '("chktex" "--verbosity=0" "--quiet" "--inputfiles") + :sentinel + (lambda (proc _event) + (when (eq 'exit (process-status proc)) + (unwind-protect + (if (with-current-buffer source (eq proc LaTeX--flymake-proc)) + (with-current-buffer (process-buffer proc) + (goto-char (point-min)) + (cl-loop + while (search-forward-regexp + (rx line-start "stdin:" + ;; line + (group-n 1 (one-or-more num)) + ":" + ;; column + (group-n 2 (one-or-more num)) + ":" + ;; This is information about the + ;; number of the warning, which we + ;; probably don't care about: + (one-or-more num) + ":" + ;; Warning message: + (group-n 3 (one-or-more not-newline)) line-end) + nil t) + for msg = (match-string 3) + for (beg . end) = (flymake-diag-region + source + (string-to-number (match-string 1)) + (string-to-number (match-string 2))) + for type = :warning + collect (flymake-make-diagnostic source + beg + end + type + msg) + into diags + finally (funcall report-fn diags))) + (flymake-log :warning "Canceling obsolete check %s" + proc)) + (kill-buffer (process-buffer proc))))))) + (process-send-region LaTeX--flymake-proc (point-min) (point-max)) + (process-send-eof LaTeX--flymake-proc)))) + +(defun LaTeX-setup-flymake-backend () + "Setup flymake backend for LaTeX." + (add-hook 'flymake-diagnostic-functions 'LaTeX-flymake nil t)) + +(when (< 25 emacs-major-version) + (add-hook 'LaTeX-mode-hook #'LaTeX-setup-flymake-backend)) + +(provide 'latex-flymake) +;;; latex-flymake.el ends here diff --git a/latex.el b/latex.el index c2d8a4ca..2d7f8223 100644 --- a/latex.el +++ b/latex.el @@ -31,6 +31,9 @@ (require 'tex) (require 'tex-style) (require 'tex-ispell) +(when (<= 26 emacs-major-version) + ;; latex-flymake requires Emacs 26. + (require 'latex-flymake)) (eval-when-compile (require 'cl)) ;FIXME: Use cl-lib. ;;; Syntax -- 2.16.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 17 13:56:43 2018 Received: (at 30423-done) by debbugs.gnu.org; 17 Feb 2018 18:56:43 +0000 Received: from localhost ([127.0.0.1]:48614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1en7f9-0003W8-FD for submit@debbugs.gnu.org; Sat, 17 Feb 2018 13:56:43 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1en7f7-0003Vs-Ic for 30423-done@debbugs.gnu.org; Sat, 17 Feb 2018 13:56:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1en7ey-0000wn-JF for 30423-done@debbugs.gnu.org; Sat, 17 Feb 2018 13:56:36 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1en7ey-0000wj-Fd for 30423-done@debbugs.gnu.org; Sat, 17 Feb 2018 13:56:32 -0500 Received: from mail-it0-f44.google.com ([209.85.214.44]:56148) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1en7ey-0003G1-7P for 30423-done@debbugs.gnu.org; Sat, 17 Feb 2018 13:56:32 -0500 Received: by mail-it0-f44.google.com with SMTP id b66so5229494itd.5 for <30423-done@debbugs.gnu.org>; Sat, 17 Feb 2018 10:56:32 -0800 (PST) X-Gm-Message-State: APf1xPAXi6y0l939RjnuDr3Ae7HoDmG8BF7ZXyWXDkP+9+S3fng4xpFN UPZMZqUjNP1BqCCfp+EInLBfMCpBk5bqZRD8v5Y= X-Google-Smtp-Source: AH8x2251q9rqY5Y2oumGPBNxiwFfbpzIviX/TTBLv96JHo/s+Bu0HL252L0kI2DqvpaR/L4mUgcegDzpHukOTSfYpTI= X-Received: by 10.36.194.70 with SMTP id i67mr11911493itg.56.1518893791638; Sat, 17 Feb 2018 10:56:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.10.130 with HTTP; Sat, 17 Feb 2018 10:55:51 -0800 (PST) In-Reply-To: <87wozcna7m.fsf@gmail.com> References: <87wozcna7m.fsf@gmail.com> From: =?UTF-8?Q?Mos=C3=A8_Giordano?= Date: Sat, 17 Feb 2018 19:55:51 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: separate flymake into latex-flymake.el To: Alex Branham Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30423-done Cc: 30423-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi Alex, 2018-02-16 17:57 GMT+01:00 Alex Branham : > Here's a different version of the patch I sent with flymake support in > its own file. I also removed the lexical-binding from latex.el. Great! Patch installed, thanks again. Bye, Mos=C3=A8 From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 18 15:15:58 2018 Received: (at 30423) by debbugs.gnu.org; 18 Feb 2018 20:15:58 +0000 Received: from localhost ([127.0.0.1]:50201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enVNO-0003Pm-Gu for submit@debbugs.gnu.org; Sun, 18 Feb 2018 15:15:58 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enVNN-0003Pb-Hs for 30423@debbugs.gnu.org; Sun, 18 Feb 2018 15:15:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enVND-0003hZ-JN for 30423@debbugs.gnu.org; Sun, 18 Feb 2018 15:15:52 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enVND-0003hU-G0; Sun, 18 Feb 2018 15:15:47 -0500 Received: from p5b326074.dip0.t-ipconnect.de ([91.50.96.116]:52019 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1enVNC-0000p6-Ny; Sun, 18 Feb 2018 15:15:47 -0500 From: Arash Esbati To: Alex Branham Subject: Re: bug#30423: separate flymake into latex-flymake.el References: <876073s8n3.fsf@gmail.com> <87wozcna7m.fsf@gmail.com> Date: Sun, 18 Feb 2018 21:14:58 +0100 In-Reply-To: <87wozcna7m.fsf@gmail.com> (Alex Branham's message of "Fri, 16 Feb 2018 10:57:49 -0600") Message-ID: <86tvueoy0t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30423 Cc: 30423@debbugs.gnu.org, =?iso-8859-1?Q?Mos=E8?= Giordano X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Alex Branham writes: > Here's a different version of the patch I sent with flymake support in > its own file. I also removed the lexical-binding from latex.el. Hi Alex, many thanks for your patch. Some comments: > +;;; latex-flymake.el --- Flymake integration -*- lexical-binding: t; -*- Could you please add the standard header with Copyright etc. here? > +;;; Commentary: > +;; This file provides flymake integration for latex documents using > +;; "chktex" as a backend. You must be running Emacs 26 or newer. > +;; Enable it by adding the following to your init file: > + > +;; (add-hook 'LaTeX-mode-hook flymake-mode) _/^\_ There is a quote missing here. Is there a reason why you didn't add this file to Makefile.in in order to get byte-compiled? And could you please add something to the manual? Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 18 20:43:56 2018 Received: (at 30423) by debbugs.gnu.org; 19 Feb 2018 01:43:56 +0000 Received: from localhost ([127.0.0.1]:50338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enaUm-0004iD-2h for submit@debbugs.gnu.org; Sun, 18 Feb 2018 20:43:56 -0500 Received: from mail-oi0-f42.google.com ([209.85.218.42]:36797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enaUk-0004hz-9c for 30423@debbugs.gnu.org; Sun, 18 Feb 2018 20:43:54 -0500 Received: by mail-oi0-f42.google.com with SMTP id 24so6106230oij.3 for <30423@debbugs.gnu.org>; Sun, 18 Feb 2018 17:43:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=NAiM5XZvjjOdIn81WkM3YYC3nSsF+B/UusXUSzS4lKg=; b=NNtuD4Edwvyho5eEyIXyE1hSM3GcMpbxgrHVP6pYYlU+EiHw5HGwelv1dxOrH1C60Q zI11exHUiqHMuR8pV8nlNYYxNys0OOpBmTQjfEXLoB+95wm2KIFZiFdhwE8kQDDhfvUz W2eEZokaRB54aAo/BOrFevapZGELO4zuAh1Ybh8TrKgguLrWTvTt6kX/FXj1dhC5Ogc1 RBU7F11Y3yqB0X0Ennn3AlMTcX17u4h43XmrRAoDjYswMpxvDu6UXbM9dRG5UoCdM9Wz xyQiuXrPEevACE50q3UYNi1bzjeJcwfvtbhoJ5lA+SREWXeps9eyF15HKVoS6UKgl8VM B82g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=NAiM5XZvjjOdIn81WkM3YYC3nSsF+B/UusXUSzS4lKg=; b=o5BMThC9uegrYsacv1CbVaXv+OC+FA/Bkn3jTTdRt+HSPspNnTZVJndEu0vdoFcNGS +fLsoVn/xc2weqE5TnQYKpOGwvaDZlxbftQ6FYvuSzUivH1Hf+4jw5dzHKFwF5k/RQw9 VROOAVFltylzwXIVknF+a5nFreLDRnpFVQXQfX7lVul6k7OeEdNhilvOB64viwzW4bUc B8vClKJBgMVr04RCbpPx/0l9a+w762WIhi4WUJJndmE2DwjNBlGYCP51PO4LKZjkzqa1 rBJeHQr0VzJSFd8DegzzTHUCGqkAF2uoqCJLZuJUPI6x97CHKB9xlH59AWkqSAqd0x6n OEOA== X-Gm-Message-State: APf1xPAEoKVjvlGInRdTeKd9iO+ZqiElMHOSFwya0R6sVlz7ouXIkTXe B3JP4wLG0D024Ll/vwyfnRmZ1nR3 X-Google-Smtp-Source: AH8x226ebdYNh8rXzo4HO5iPDYm/igGbe3zUeLFgk21xdJ9gM5PSNvwQI5fgqLfEdyvIRo2+2oHbxw== X-Received: by 10.202.13.16 with SMTP id 16mr9681777oin.4.1519004628302; Sun, 18 Feb 2018 17:43:48 -0800 (PST) Received: from mars (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id s101sm12406907ota.27.2018.02.18.17.43.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Feb 2018 17:43:47 -0800 (PST) References: <876073s8n3.fsf@gmail.com> <87wozcna7m.fsf@gmail.com> <86tvueoy0t.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.0.91 From: Alex Branham To: Arash Esbati Subject: Re: bug#30423: separate flymake into latex-flymake.el In-reply-to: <86tvueoy0t.fsf@gnu.org> Date: Sun, 18 Feb 2018 19:44:20 -0600 Message-ID: <87mv05zrbf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30423 Cc: 30423@debbugs.gnu.org, =?utf-8?Q?Mos=C3=A8?= Giordano X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Sun 18 Feb 2018 at 14:14, Arash Esbati wrote: > Alex Branham writes: > Hi Alex, > > many thanks for your patch. Some comments: > >> +;;; latex-flymake.el --- Flymake integration -*- lexical-binding: t; -*- > > Could you please add the standard header with Copyright etc. here? Sure thing, will include in the next patch. >> +;;; Commentary: >> +;; This file provides flymake integration for latex documents using >> +;; "chktex" as a backend. You must be running Emacs 26 or newer. >> +;; Enable it by adding the following to your init file: >> + >> +;; (add-hook 'LaTeX-mode-hook flymake-mode) > _/^\_ > There is a quote missing here. Thanks, I'll add that too. > > Is there a reason why you didn't add this file to Makefile.in in order > to get byte-compiled? No, I'll do that too. > And could you please add something to the manual? Yes, I'd be more than happy to. Where should it go? Is a new node in the "Display" chapter ("Controlling Screen Display") OK or should it go somewhere else? Thanks! Alex From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 20 15:21:38 2018 Received: (at 30423) by debbugs.gnu.org; 20 Feb 2018 20:21:38 +0000 Received: from localhost ([127.0.0.1]:53252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoEPx-0007ql-S9 for submit@debbugs.gnu.org; Tue, 20 Feb 2018 15:21:38 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoEPw-0007qZ-Ta for 30423@debbugs.gnu.org; Tue, 20 Feb 2018 15:21:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoEPo-0003js-Mi for 30423@debbugs.gnu.org; Tue, 20 Feb 2018 15:21:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoEPo-0003jf-Jv; Tue, 20 Feb 2018 15:21:28 -0500 Received: from p5b3261cf.dip0.t-ipconnect.de ([91.50.97.207]:52697 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1eoEPn-0007Pi-Qw; Tue, 20 Feb 2018 15:21:28 -0500 From: Arash Esbati To: Alex Branham Subject: Re: bug#30423: separate flymake into latex-flymake.el References: <876073s8n3.fsf@gmail.com> <87wozcna7m.fsf@gmail.com> <86tvueoy0t.fsf@gnu.org> <87mv05zrbf.fsf@gmail.com> Date: Tue, 20 Feb 2018 21:17:21 +0100 In-Reply-To: <87mv05zrbf.fsf@gmail.com> (Alex Branham's message of "Sun, 18 Feb 2018 19:44:20 -0600") Message-ID: <868tbna01a.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30423 Cc: 30423@debbugs.gnu.org, =?iso-8859-1?Q?Mos=E8?= Giordano X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Alex Branham writes: > On Sun 18 Feb 2018 at 14:14, Arash Esbati wrote: > >> Is there a reason why you didn't add this file to Makefile.in in order >> to get byte-compiled? > > No, I'll do that too. I did this one just now. May I point your attention to this thread? http://lists.gnu.org/archive/html/auctex/2018-02/msg00019.html Maybe you could help out. >> And could you please add something to the manual? > > Yes, I'd be more than happy to. Where should it go? Is a new node in the > "Display" chapter ("Controlling Screen Display") OK or should it go > somewhere else? The manual has a section "4.4 Checking for problems"[1]. Does it fit better? WDYT? Best, Arash Footnotes: [1] https://www.gnu.org/software/auctex/manual/auctex.html#Checking From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 20 15:59:30 2018 Received: (at 30423) by debbugs.gnu.org; 20 Feb 2018 20:59:30 +0000 Received: from localhost ([127.0.0.1]:53279 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoF0b-0002EK-Vd for submit@debbugs.gnu.org; Tue, 20 Feb 2018 15:59:30 -0500 Received: from mail-oi0-f43.google.com ([209.85.218.43]:40902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoF0Z-0002E6-Lu for 30423@debbugs.gnu.org; Tue, 20 Feb 2018 15:59:28 -0500 Received: by mail-oi0-f43.google.com with SMTP id c12so3694225oic.7 for <30423@debbugs.gnu.org>; Tue, 20 Feb 2018 12:59:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=jFGsPAmUTbo63+/asXUCn+39HmXmn76FBrV2C2CoJ/s=; b=ArXgZo6lx/DeCt0W1JeSA90V+fwLJwZA6aFzeaLRnoDYwNPp679ngc/6VlcIxGi+3L vm0yWxX/4tpIA2oaK02M3BS7oavjbgBHMuppjoLgViV4dRg8qvrpyxFNTU1s+kizXCD4 dHTa5EnApQRX2BVYABlA8utEpj60F4PRxoQmhe9m6gaUxDrOGtYCm5u+2pid+jYzAiLI xLawDTt0NuELmu/RK9LVmE+0GhAboYLXiRsVRmoxWb0x8VDwRg6sJCNTk42/RhD44kbH SCRuFsXlqxiDdMIdzUrXQAUvwbot93gQjV7qnjR5UBOY9Fvr3UERw5/6YcZ5nY6mvz/k 9cRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=jFGsPAmUTbo63+/asXUCn+39HmXmn76FBrV2C2CoJ/s=; b=C1rdUZDsuOVAVY6MazXKUgpR2UDNScBrWvaPu6pMLdH5aFbA8lJ+f6MuojbgJoZ+9E QKmoibqO7wsBl2DBAedIkKDxBQuLxVY0DaQqOLOD4Lz9z3BGHYnoSoJ+nECgeNpizY7W /sioG00qO6Xz0kDn5g0kKil9ayMdSqG+IXVQuULB3+DtbZVdpjttzd+WiK08cPc0TXph LpK9YbxjISesSRH3By4B8MQbn2hTGFpScL6J6OpWIJ3iq/4p2clJP/pRIo2p8+pF9+hZ WgICI7jm3nDEkkB3PJVzbee7aIAYv+Imupnm7pZo5/EN7J5s89WKwuNNVX1ilJQegXkJ qKEQ== X-Gm-Message-State: APf1xPCPrv5xVRLEA7sjKoAyBxpaineEVxVJeQYntSQQz2CiYrJxRKte 7WBL4arKeAcn/Q+RBdrvuJHqmmwk X-Google-Smtp-Source: AH8x227gL7nCTPEO2ByqX+NnLklIzrFXu0wWnqQjBslfkn9lieuzObHln4aUpjgOPQIh0a8PAmOFvg== X-Received: by 10.202.177.136 with SMTP id a130mr671186oif.252.1519160361555; Tue, 20 Feb 2018 12:59:21 -0800 (PST) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id m93sm3011586otm.70.2018.02.20.12.59.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Feb 2018 12:59:20 -0800 (PST) References: <876073s8n3.fsf@gmail.com> <87wozcna7m.fsf@gmail.com> <86tvueoy0t.fsf@gnu.org> <87mv05zrbf.fsf@gmail.com> <868tbna01a.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.0.91 From: Alex Branham To: Arash Esbati Subject: Re: bug#30423: separate flymake into latex-flymake.el In-reply-to: <868tbna01a.fsf@gnu.org> Date: Tue, 20 Feb 2018 14:59:18 -0600 Message-ID: <87tvubjs2h.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 30423 Cc: 30423@debbugs.gnu.org, =?utf-8?Q?Mos=C3=A8?= Giordano X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain On Tue 20 Feb 2018 at 14:17, Arash Esbati wrote: > Alex Branham writes: > >> On Sun 18 Feb 2018 at 14:14, Arash Esbati wrote: >> >>> Is there a reason why you didn't add this file to Makefile.in in order >>> to get byte-compiled? >> >> No, I'll do that too. > > I did this one just now. Great, thanks! > May I point your attention to this thread? > > http://lists.gnu.org/archive/html/auctex/2018-02/msg00019.html > > Maybe you could help out. I'd be glad to, but he doesn't say how it's affecting auctex. I don't seem to be able to see his email either. Can you email him and cc me? >>> And could you please add something to the manual? >> >> Yes, I'd be more than happy to. Where should it go? Is a new node in the >> "Display" chapter ("Controlling Screen Display") OK or should it go >> somewhere else? > > The manual has a section "4.4 Checking for problems"[1]. Does it fit > better? WDYT? Sounds great, here's a small patch. I also added the copyright header and fixed that one quote. Thanks! Alex >From 5021d84fe1b96344053175a26e067a264ff99c11 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Tue, 20 Feb 2018 14:55:52 -0600 Subject: [PATCH] Improve flymake documentation * doc/auctex.texi: Add Flymake support to manual * latex-flymake.el: Add copyright notice and fix a quote --- doc/auctex.texi | 28 ++++++++++++++++++++-------- latex-flymake.el | 24 +++++++++++++++++++++++- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/doc/auctex.texi b/doc/auctex.texi index 08cfe040..ec328d06 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -3831,24 +3831,36 @@ will be used regardless of the value of this variable. @cindex Running @code{chktex} @cindex Style @cindex Problems +@cindex Flymake +@cindex Running Flymake Running @TeX{} or @LaTeX{} will only find regular errors in the document, not examples of bad style. Furthermore, description of the errors may often be confusing. The utilities @code{lacheck} and @code{chktex} can be used to find style errors, such as forgetting to escape the space after an abbreviation or using @samp{...} instead of -@samp{\ldots} and other similar problems. You start @code{lacheck} with -@kbd{C-c C-c Check @key{RET}} and @code{chktex} with @kbd{C-c C-c ChkTeX -@key{RET}}. The result will be a list of errors in the +@samp{\ldots} and other similar problems. You start @code{lacheck} +with @kbd{C-c C-c Check @key{RET}} and @code{chktex} with @kbd{C-c C-c +ChkTeX @key{RET}}. The result will be a list of errors in the @samp{*compilation*} buffer. You can go through the errors with @kbd{C-x `} (@code{next-error}, @pxref{Compilation,,,emacs,The Emacs Editor}), which will move point to the location of the next error. +Alternatively, you may want in-buffer notation. AuCTeX provides +support for this using the Flymake package in Emacs 26 or newer +(@xref{Using Flymake,,,Flymake,GNU Flymake} for details). To enable, +call @kbd{M-x flymake-mode} in the buffer or enable it in all buffers +by adding this to your init file: -Each of the two utilities will find some errors the other doesn't, but -@code{chktex} is more configurable, allowing you to create your own -errors. You may need to install the programs before using them. You -can get @code{lacheck} from -@file{} and +@lisp +(add-hook 'LaTeX-mode-hook #'flymake-mode) +@end lisp + +Note that AuCTeX currently only provides support for using +@code{chktex} as the flymake backend. Each of the two utilities will +find some errors the other doesn't, but @code{chktex} is more +configurable, allowing you to create your own errors. You may need to +install the programs before using them. You can get @code{lacheck} +from @file{} and @code{chktex} from @file{}. diff --git a/latex-flymake.el b/latex-flymake.el index e77e0591..265eeb5b 100644 --- a/latex-flymake.el +++ b/latex-flymake.el @@ -1,11 +1,33 @@ ;;; latex-flymake.el --- Flymake integration -*- lexical-binding: t; -*- +;; Copyright (C), 2018 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + ;;; Commentary: ;; This file provides flymake integration for latex documents using ;; "chktex" as a backend. You must be running Emacs 26 or newer. ;; Enable it by adding the following to your init file: -;; (add-hook 'LaTeX-mode-hook flymake-mode) +;; (add-hook 'LaTeX-mode-hook #'flymake-mode) ;;; Code: -- 2.16.2 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Improve-flymake-documentation.patch >From 5021d84fe1b96344053175a26e067a264ff99c11 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Tue, 20 Feb 2018 14:55:52 -0600 Subject: [PATCH] Improve flymake documentation * doc/auctex.texi: Add Flymake support to manual * latex-flymake.el: Add copyright notice and fix a quote --- doc/auctex.texi | 28 ++++++++++++++++++++-------- latex-flymake.el | 24 +++++++++++++++++++++++- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/doc/auctex.texi b/doc/auctex.texi index 08cfe040..ec328d06 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -3831,24 +3831,36 @@ will be used regardless of the value of this variable. @cindex Running @code{chktex} @cindex Style @cindex Problems +@cindex Flymake +@cindex Running Flymake Running @TeX{} or @LaTeX{} will only find regular errors in the document, not examples of bad style. Furthermore, description of the errors may often be confusing. The utilities @code{lacheck} and @code{chktex} can be used to find style errors, such as forgetting to escape the space after an abbreviation or using @samp{...} instead of -@samp{\ldots} and other similar problems. You start @code{lacheck} with -@kbd{C-c C-c Check @key{RET}} and @code{chktex} with @kbd{C-c C-c ChkTeX -@key{RET}}. The result will be a list of errors in the +@samp{\ldots} and other similar problems. You start @code{lacheck} +with @kbd{C-c C-c Check @key{RET}} and @code{chktex} with @kbd{C-c C-c +ChkTeX @key{RET}}. The result will be a list of errors in the @samp{*compilation*} buffer. You can go through the errors with @kbd{C-x `} (@code{next-error}, @pxref{Compilation,,,emacs,The Emacs Editor}), which will move point to the location of the next error. +Alternatively, you may want in-buffer notation. AuCTeX provides +support for this using the Flymake package in Emacs 26 or newer +(@xref{Using Flymake,,,Flymake,GNU Flymake} for details). To enable, +call @kbd{M-x flymake-mode} in the buffer or enable it in all buffers +by adding this to your init file: -Each of the two utilities will find some errors the other doesn't, but -@code{chktex} is more configurable, allowing you to create your own -errors. You may need to install the programs before using them. You -can get @code{lacheck} from -@file{} and +@lisp +(add-hook 'LaTeX-mode-hook #'flymake-mode) +@end lisp + +Note that AuCTeX currently only provides support for using +@code{chktex} as the flymake backend. Each of the two utilities will +find some errors the other doesn't, but @code{chktex} is more +configurable, allowing you to create your own errors. You may need to +install the programs before using them. You can get @code{lacheck} +from @file{} and @code{chktex} from @file{}. diff --git a/latex-flymake.el b/latex-flymake.el index e77e0591..265eeb5b 100644 --- a/latex-flymake.el +++ b/latex-flymake.el @@ -1,11 +1,33 @@ ;;; latex-flymake.el --- Flymake integration -*- lexical-binding: t; -*- +;; Copyright (C), 2018 Free Software Foundation, Inc. + +;; Maintainer: auctex-devel@gnu.org +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + ;;; Commentary: ;; This file provides flymake integration for latex documents using ;; "chktex" as a backend. You must be running Emacs 26 or newer. ;; Enable it by adding the following to your init file: -;; (add-hook 'LaTeX-mode-hook flymake-mode) +;; (add-hook 'LaTeX-mode-hook #'flymake-mode) ;;; Code: -- 2.16.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 21 15:53:50 2018 Received: (at 30423-done) by debbugs.gnu.org; 21 Feb 2018 20:53:50 +0000 Received: from localhost ([127.0.0.1]:54940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eobOe-0003r0-KM for submit@debbugs.gnu.org; Wed, 21 Feb 2018 15:53:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60041) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eobOd-0003ql-G9 for 30423-done@debbugs.gnu.org; Wed, 21 Feb 2018 15:53:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eobNW-0001OW-4B for 30423-done@debbugs.gnu.org; Wed, 21 Feb 2018 15:53:42 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eobNV-0001OG-UZ; Wed, 21 Feb 2018 15:52:37 -0500 Received: from p5b32640a.dip0.t-ipconnect.de ([91.50.100.10]:53382 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1eobNV-0007v3-91; Wed, 21 Feb 2018 15:52:37 -0500 From: Arash Esbati To: Alex Branham Subject: Re: bug#30423: separate flymake into latex-flymake.el References: <876073s8n3.fsf@gmail.com> <87wozcna7m.fsf@gmail.com> <86tvueoy0t.fsf@gnu.org> <87mv05zrbf.fsf@gmail.com> <868tbna01a.fsf@gnu.org> <87tvubjs2h.fsf@gmail.com> Date: Wed, 21 Feb 2018 21:52:10 +0100 In-Reply-To: <87tvubjs2h.fsf@gmail.com> (Alex Branham's message of "Tue, 20 Feb 2018 14:59:18 -0600") Message-ID: <86d10yrrph.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 30423-done Cc: 30423-done@debbugs.gnu.org, =?iso-8859-1?Q?Mos=E8?= Giordano X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Alex Branham writes: > Sounds great, here's a small patch. I also added the copyright header > and fixed that one quote. Many thanks for the patch. I slightly touched it and committed it under your name; I also added an entry to the news. I close this bug then. Best, Arash http://git.savannah.gnu.org/cgit/auctex.git/commit/?id=5592c69435c03110e207ef05feed96741cb94d1b From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 21 16:15:48 2018 Received: (at 30423-done) by debbugs.gnu.org; 21 Feb 2018 21:15:48 +0000 Received: from localhost ([127.0.0.1]:54960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eobjv-0004Ov-VO for submit@debbugs.gnu.org; Wed, 21 Feb 2018 16:15:48 -0500 Received: from mail-oi0-f52.google.com ([209.85.218.52]:36705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eobju-0004Of-6C for 30423-done@debbugs.gnu.org; Wed, 21 Feb 2018 16:15:46 -0500 Received: by mail-oi0-f52.google.com with SMTP id 24so2187506oij.3 for <30423-done@debbugs.gnu.org>; Wed, 21 Feb 2018 13:15:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=z1Wje9sCsmoFEs2oboS7E/FveYGnA7UmDo9wDr08hmM=; b=UprFtvJd0RyB0nRBVuEQqGfaqSfi1ft5pnI+meMyYvSeDHVx2/u5SuxprHBU45zCXG y9kUKEDRVCfW5rP36CVDfAol8/mCTEhzU75NupgMrpMDuWhm3eINifOti3/c1uZTcA2r I3PenF1iAM9rY5ZaHy/2jQ3BN6Ec4wo0xy+Mx6ysHJZckKccQZ23+yE/3TLInPpYDHbn Wzswk4Wn3y2+XqTgg8PgTaRTHDIIifI3V7SmiIj0bp1BKKeoTzlfaZPY4wA9G1ttVWzH AVl2MfOLwi+o1ANhk62gID/NCzHaFA4mwrhmn3XStV/IUR+Oo17cjE8k83uaHIqqTS0Y VzHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=z1Wje9sCsmoFEs2oboS7E/FveYGnA7UmDo9wDr08hmM=; b=bCsVDylpHhLYCDEQSfNFpoC1dSWdxKUl9QLCG+cbkz5I7jl2nLUQVlLQ4EiaBw5HKR 0sTmm3q4s+WtGc3SbICS/3atmWiaKcPpaUhUuGA8yrbv2vboIPxx/h0D3vvPmu4kFGtU 7fJx8OVaPfeYo46OjgJGFeXNRDYvGiydvfQevjLsVDVRhSDHGE6wVLkzP9NMyGH5GPZe z/aZs8G1gGHk48aB+gOhOAl+PME17CKb4bfy3zEuKz7Rrg+m0oL5j5QQunqlMt0vkLNT KIO3OP3nzS8zs11TdZX4JFiFdGFaXlZA41Q1wTcebmAloTSA91G+YB62UYyG65j9hvrn uRXA== X-Gm-Message-State: APf1xPChus2s99b52M+FeyCjUBnY7jWAgG5xm3mFl5hGUmh+aKuTd5Sj +jOKKoM9lQlvEAeBPQPlXrk2UDQ9 X-Google-Smtp-Source: AH8x224kNqJu6ZQdt2WiTzS1nmJfnf//uStcE7ceFACGllETzIuWRdAgB+uoSzx+gq79siHkZ+jmEQ== X-Received: by 10.202.169.83 with SMTP id s80mr3306562oie.0.1519247740344; Wed, 21 Feb 2018 13:15:40 -0800 (PST) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id c20sm13626274oic.40.2018.02.21.13.15.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Feb 2018 13:15:39 -0800 (PST) References: <876073s8n3.fsf@gmail.com> <87wozcna7m.fsf@gmail.com> <86tvueoy0t.fsf@gnu.org> <87mv05zrbf.fsf@gmail.com> <868tbna01a.fsf@gnu.org> <87tvubjs2h.fsf@gmail.com> <86d10yrrph.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.0.91 From: Alex Branham To: Arash Esbati Subject: Re: bug#30423: separate flymake into latex-flymake.el In-reply-to: <86d10yrrph.fsf@gnu.org> Date: Wed, 21 Feb 2018 15:15:36 -0600 Message-ID: <878tbmgi2v.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 30423-done Cc: 30423-done@debbugs.gnu.org, =?utf-8?Q?Mos=C3=A8?= Giordano X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Wed 21 Feb 2018 at 14:52, Arash Esbati wrote: > Alex Branham writes: > >> Sounds great, here's a small patch. I also added the copyright header >> and fixed that one quote. > > Many thanks for the patch. I slightly touched it and committed it under > your name; I also added an entry to the news. I close this bug then. Great, thanks! Alex > > http://git.savannah.gnu.org/cgit/auctex.git/commit/?id=5592c69435c03110e207ef05feed96741cb94d1b From unknown Fri Sep 12 12:57:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 22 Mar 2018 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator