X-Loop: help-debbugs@HIDDEN Subject: bug#30980: [PATCH] add customize option for flymake Resent-From: Alex Branham <alex.branham@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-auctex@HIDDEN Resent-Date: Wed, 28 Mar 2018 22:28:02 +0000 Resent-Message-ID: <handler.30980.B.152227602613009 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 30980 X-GNU-PR-Package: auctex X-GNU-PR-Keywords: patch To: 30980 <at> debbugs.gnu.org X-Debbugs-Original-To: "" <bug-auctex@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.152227602613009 (code B ref -1); Wed, 28 Mar 2018 22:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Mar 2018 22:27:06 +0000 Received: from localhost ([127.0.0.1]:57737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1f1JX8-0003Nk-2b for submit <at> debbugs.gnu.org; Wed, 28 Mar 2018 18:27:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <alex.branham@HIDDEN>) id 1f1JX4-0003NF-H7 for submit <at> debbugs.gnu.org; Wed, 28 Mar 2018 18:27:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alex.branham@HIDDEN>) id 1f1JWx-00054F-Us for submit <at> debbugs.gnu.org; Wed, 28 Mar 2018 18:26:57 -0400 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_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <alex.branham@HIDDEN>) id 1f1JWx-000542-Og for submit <at> debbugs.gnu.org; Wed, 28 Mar 2018 18:26:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <alex.branham@HIDDEN>) id 1f1JWw-0006PQ-3m for bug-auctex@HIDDEN; Wed, 28 Mar 2018 18:26:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alex.branham@HIDDEN>) id 1f1JWr-00052L-Ur for bug-auctex@HIDDEN; Wed, 28 Mar 2018 18:26:54 -0400 Received: from mail-ot0-x230.google.com ([2607:f8b0:4003:c0f::230]:44319) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <alex.branham@HIDDEN>) id 1f1JWr-00052B-KU for bug-auctex@HIDDEN; Wed, 28 Mar 2018 18:26:49 -0400 Received: by mail-ot0-x230.google.com with SMTP id x6-v6so4385582otg.11 for <bug-auctex@HIDDEN>; Wed, 28 Mar 2018 15:26:49 -0700 (PDT) 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=GYbsW94MBVERuIlZd+i7K+bqgrNZ545JJqh2fjGH98M=; b=U77WTtLFJ+F5HEmZv2mVK8jsuKR6N7ElCvfKs1JtuOQyaeq5PcOjUR3W/aVQQzwcI4 eE4JC1+0ZcUuKgt782reb3rA7XcO+YtVT/eD1ZQbOFYdmOTaRhhOGpIqJkrh++hYoUq/ vpx6se89k6glb2Tn+VIWyF42HGyS4b4jYsyv63YRWjT51ijVmtDOcnax/VT09KcfkxoY y88ZU9ww+Q4jAoZ7sS6dXIzs2uIpHalkY54yYHLtpPFMjYPSM2e+ioa28l6ki6Vd4Q6j jQp7zqOjXpNqyXJMYdMsNX4LUPbC31s0kgOOJQW6N5L3ewy32DCOmebXhI5GXWRqRK3P PtDg== 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=GYbsW94MBVERuIlZd+i7K+bqgrNZ545JJqh2fjGH98M=; b=CY2p3omo05RtcnH6K7VJPazFmeSSHVbFraGDOanzkhyYGhhx38Kc5MBKui+VrzINmY C+Y7BavT8hBNlCW/7KpzkRJYdgobt9vF78IoZgOvRiGjBOYfpLU24kwcTxX1UkhaTpei vR2PwW8GsYgA88QGMLwOLo0QCe1NFo91eiRCYLw8HW30DsLxD/PLBunnu5PO+pCEHrRV Lx/vSwxYWUdYUGFkJdd95gsRadgGezO/VXieLTCx5y4AuVBQYj0+zYDj6dFrhcrWkJ3c mUdWfLopateeacHxNFDnb9h38ylfnXdiIQktnVq2f0EyIG6i1dq5Nijgr4ww3eKc3DPd YnYA== X-Gm-Message-State: AElRT7Eq1J9ufbLDE1QI5m/+A9h30PC/jmkZW2ulJPp8D2ihTSH+/j/O bd1FPsMLc+ZMTQrWYlS5oTEhs80K X-Google-Smtp-Source: AIpwx4+hksLSj6Sny2BVMxt4T5KqGqkUmGRiUPiILSDDpVguy5EwT4Kz5ED6NbYlt2F0ciiLNXZzeg== X-Received: by 2002:a9d:5e12:: with SMTP id d18-v6mr3615747oti.386.1522276008406; Wed, 28 Mar 2018 15:26:48 -0700 (PDT) Received: from mars (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id s129-v6sm2625572oia.26.2018.03.28.15.26.47 for <bug-auctex@HIDDEN> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Mar 2018 15:26:47 -0700 (PDT) User-agent: mu4e 1.0; emacs 26.0.91 From: Alex Branham <alex.branham@HIDDEN> Date: Wed, 28 Mar 2018 17:27:56 -0500 Message-ID: <87lgebesyb.fsf@HIDDEN> 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-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain Hello - This patch lets users set the flags that chktex uses. It also moves the documentation of the addition of flymake support into a new section in changes.texi (I didn't realize 12.1 had already been released when I added it earlier). Let me know if anything looks wrong. Alex ------------------------------------------------------------ From d6ec0bd5db2f5d8097b6d2e784ea3de390ff63f0 Mon Sep 17 00:00:00 2001 From: Alex Branham <branham@HIDDEN> Date: Wed, 28 Mar 2018 17:23:38 -0500 Subject: [PATCH] New customize option LaTeX-flymake-chktex-flags * latex-flymake.el (LaTeX-flymake-chktex-flags): New option. * latex-flymake.el (LaTeX-flymake): Use it. * doc/auctex.texi: * doc/changes.texi: Document new option. --- doc/auctex.texi | 5 +++-- doc/changes.texi | 23 +++++++++++++++-------- latex-flymake.el | 20 +++++++++++++++++++- 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/doc/auctex.texi b/doc/auctex.texi index e861a752..9757f746 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -3854,8 +3854,9 @@ buffers by adding this to your init file: @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. +You can customize @code{LaTeX-flymake-chktex-flags} to enable or disable +chktex warnings. Note that @AUCTeX{} currently only provides support for +using @code{chktex} as the flymake backend. Each of the two utilities @code{lacheck} and @code{chktex} will find some errors the other doesn't, but @code{chktex} is more configurable, diff --git a/doc/changes.texi b/doc/changes.texi index bddec6a1..3e84f3c8 100644 --- a/doc/changes.texi +++ b/doc/changes.texi @@ -8,6 +8,21 @@ @end ifset +@heading News in DEVELOP + +@itemize @bullet +@item +@AUCTeX{} has support for the Flymake package in Emacs 26 or newer. To +enable, call @kbd{M-x flymake-mode RET} or add this to your +@file{.emacs} file: +@lisp +(add-hook 'LaTeX-mode-hook #'flymake-mode) +@end lisp +The accompanying new customize option @code{LaTeX-flymake-chktex-flags} +allows users to turn on/off specific warnings. + +@end itemize + @heading News in 12.1 @itemize @bullet @@ -19,14 +34,6 @@ been dropped. Besides the change in the supported version of Emacs, there has been no functional change in this release, which is equivalent to version 11.92. -@item -@AUCTeX{} has support for the Flymake package in Emacs 26 or newer. To -enable, call @kbd{M-x flymake-mode RET} or add this to your -@file{.emacs} file: -@lisp -(add-hook 'LaTeX-mode-hook #'flymake-mode) -@end lisp - @end itemize @heading News in 11.92 diff --git a/latex-flymake.el b/latex-flymake.el index 2a86ebed..40bc3052 100644 --- a/latex-flymake.el +++ b/latex-flymake.el @@ -40,6 +40,23 @@ (defvar-local LaTeX--flymake-proc nil) +(defcustom LaTeX-flymake-chktex-flags nil + "If non-nil, a list of strings to pass as arguments to the chktex backend. +You can use this to enable or disable specific warnings by +setting it to something like: + +'(\"-n12\" \"-w41\") + +Which would disable warning 12 (\"interword spacing should +perhaps be used\") and enable 41 (\"you ought not to use +primitive TeX in LaTeX code\"). + +See the chktex manual for warning numbers and details about how +to use flags." + :type '(choice (const nil :tag "Use chktex defaults") + (repeat string)) + :group 'LaTeX) + (defun LaTeX-flymake (report-fn &rest _args) "Setup flymake integration. @@ -56,7 +73,8 @@ REPORT-FN is flymake's callback function." (make-process :name "LaTeX-flymake" :noquery t :connection-type 'pipe :buffer (generate-new-buffer " *LaTeX-flymake*") - :command '("chktex" "--verbosity=0" "--quiet" "--inputfiles") + :command (append `("chktex" "--verbosity=0" "--quiet" "--inputfiles") + LaTeX-flymake-chktex-flags) :sentinel (lambda (proc _event) (when (eq 'exit (process-status proc)) -- 2.16.3 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-New-customize-option-LaTeX-flymake-chktex-flags.patch From d6ec0bd5db2f5d8097b6d2e784ea3de390ff63f0 Mon Sep 17 00:00:00 2001 From: Alex Branham <branham@HIDDEN> Date: Wed, 28 Mar 2018 17:23:38 -0500 Subject: [PATCH] New customize option LaTeX-flymake-chktex-flags * latex-flymake.el (LaTeX-flymake-chktex-flags): New option. * latex-flymake.el (LaTeX-flymake): Use it. * doc/auctex.texi: * doc/changes.texi: Document new option. --- doc/auctex.texi | 5 +++-- doc/changes.texi | 23 +++++++++++++++-------- latex-flymake.el | 20 +++++++++++++++++++- 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/doc/auctex.texi b/doc/auctex.texi index e861a752..9757f746 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -3854,8 +3854,9 @@ buffers by adding this to your init file: @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. +You can customize @code{LaTeX-flymake-chktex-flags} to enable or disable +chktex warnings. Note that @AUCTeX{} currently only provides support for +using @code{chktex} as the flymake backend. Each of the two utilities @code{lacheck} and @code{chktex} will find some errors the other doesn't, but @code{chktex} is more configurable, diff --git a/doc/changes.texi b/doc/changes.texi index bddec6a1..3e84f3c8 100644 --- a/doc/changes.texi +++ b/doc/changes.texi @@ -8,6 +8,21 @@ @end ifset +@heading News in DEVELOP + +@itemize @bullet +@item +@AUCTeX{} has support for the Flymake package in Emacs 26 or newer. To +enable, call @kbd{M-x flymake-mode RET} or add this to your +@file{.emacs} file: +@lisp +(add-hook 'LaTeX-mode-hook #'flymake-mode) +@end lisp +The accompanying new customize option @code{LaTeX-flymake-chktex-flags} +allows users to turn on/off specific warnings. + +@end itemize + @heading News in 12.1 @itemize @bullet @@ -19,14 +34,6 @@ been dropped. Besides the change in the supported version of Emacs, there has been no functional change in this release, which is equivalent to version 11.92. -@item -@AUCTeX{} has support for the Flymake package in Emacs 26 or newer. To -enable, call @kbd{M-x flymake-mode RET} or add this to your -@file{.emacs} file: -@lisp -(add-hook 'LaTeX-mode-hook #'flymake-mode) -@end lisp - @end itemize @heading News in 11.92 diff --git a/latex-flymake.el b/latex-flymake.el index 2a86ebed..40bc3052 100644 --- a/latex-flymake.el +++ b/latex-flymake.el @@ -40,6 +40,23 @@ (defvar-local LaTeX--flymake-proc nil) +(defcustom LaTeX-flymake-chktex-flags nil + "If non-nil, a list of strings to pass as arguments to the chktex backend. +You can use this to enable or disable specific warnings by +setting it to something like: + +'(\"-n12\" \"-w41\") + +Which would disable warning 12 (\"interword spacing should +perhaps be used\") and enable 41 (\"you ought not to use +primitive TeX in LaTeX code\"). + +See the chktex manual for warning numbers and details about how +to use flags." + :type '(choice (const nil :tag "Use chktex defaults") + (repeat string)) + :group 'LaTeX) + (defun LaTeX-flymake (report-fn &rest _args) "Setup flymake integration. @@ -56,7 +73,8 @@ REPORT-FN is flymake's callback function." (make-process :name "LaTeX-flymake" :noquery t :connection-type 'pipe :buffer (generate-new-buffer " *LaTeX-flymake*") - :command '("chktex" "--verbosity=0" "--quiet" "--inputfiles") + :command (append `("chktex" "--verbosity=0" "--quiet" "--inputfiles") + LaTeX-flymake-chktex-flags) :sentinel (lambda (proc _event) (when (eq 'exit (process-status proc)) -- 2.16.3 --=-=-=--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Alex Branham <alex.branham@HIDDEN> Subject: bug#30980: Acknowledgement ([PATCH] add customize option for flymake) Message-ID: <handler.30980.B.152227602613009.ack <at> debbugs.gnu.org> References: <87lgebesyb.fsf@HIDDEN> X-Gnu-PR-Message: ack 30980 X-Gnu-PR-Package: auctex X-Gnu-PR-Keywords: patch Reply-To: 30980 <at> debbugs.gnu.org Date: Wed, 28 Mar 2018 22:28:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-auctex@HIDDEN If you wish to submit further information on this problem, please send it to 30980 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 30980: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D30980 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#30980: [PATCH] add customize option for flymake Resent-From: Arash Esbati <arash@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-auctex@HIDDEN Resent-Date: Mon, 04 Mar 2024 21:51:02 +0000 Resent-Message-ID: <handler.30980.B30980.170958905013161 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 30980 X-GNU-PR-Package: auctex X-GNU-PR-Keywords: patch To: Alex Branham <alex.branham@HIDDEN> Cc: 30980 <at> debbugs.gnu.org Received: via spool by 30980-submit <at> debbugs.gnu.org id=B30980.170958905013161 (code B ref 30980); Mon, 04 Mar 2024 21:51:02 +0000 Received: (at 30980) by debbugs.gnu.org; 4 Mar 2024 21:50:50 +0000 Received: from localhost ([127.0.0.1]:45078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rhGCw-0003QC-8D for submit <at> debbugs.gnu.org; Mon, 04 Mar 2024 16:50:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <arash@HIDDEN>) id 1rhGCs-0003Px-Ti for 30980 <at> debbugs.gnu.org; Mon, 04 Mar 2024 16:50:48 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <arash@HIDDEN>) id 1rhGAC-0005AH-H5; Mon, 04 Mar 2024 16:48:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=UQbXOaIbFYc/CvzxwbRiRbD4Lh7KSagN0PtoNTW3TZk=; b=LmZN27pcyAAt2CG8fAEn vESz3M68tGWvKc7ZH7l0m86u8vQ2Yv+QucpB8OXQfBhT2gqYy7w8HqQ/LKYX21LnFEcJ7Yi2GZdSI ulCeHobMBQDOvy5wGl42AZkFJL/a3X4YXtC7mdqZnUek6nvlT6GfsKeNtlw0tw0mjrfcMxY3OjpNM i4Au6hvkubrX7ZvsYa7W9bgsxdlzVdzGoiDJmb5c8TcH4beEjn+c00QNpL80Ky9DSWYgFmst9GFEm YWnd4s8TDL4igJrQiUl4quI+kJteCehHhFe5Km8nnnv1sVir6RuL6RTRnL9nf+KSuz0EtgRI36FY8 37BWRs/H6Zn2cA==; From: Arash Esbati <arash@HIDDEN> In-Reply-To: <87lgebesyb.fsf@HIDDEN> (Alex Branham's message of "Wed, 28 Mar 2018 17:27:56 -0500") References: <87lgebesyb.fsf@HIDDEN> Date: Mon, 04 Mar 2024 22:47:56 +0100 Message-ID: <m2h6hly8hf.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Alex Branham <alex.branham@HIDDEN> writes: > This patch lets users set the flags that chktex uses. It also moves the > documentation of the addition of flymake support into a new section in > changes.texi (I didn't realize 12.1 had already been released when I > added it earlier). > > Let me know if anything looks wrong. (I'm going through old bug reports that unfortunately weren't resolved at the time.) Hi Alex, first of all, my sincere apologies that you didn't get any response from us -- I hope you have the time and energy to pick this up again with me. I think your addition makes sense and we should install it. I have some comments below: >>From d6ec0bd5db2f5d8097b6d2e784ea3de390ff63f0 Mon Sep 17 00:00:00 2001 > From: Alex Branham <branham@HIDDEN> > Date: Wed, 28 Mar 2018 17:23:38 -0500 > Subject: [PATCH] New customize option LaTeX-flymake-chktex-flags > > * latex-flymake.el (LaTeX-flymake-chktex-flags): New option. > * latex-flymake.el (LaTeX-flymake): Use it. Did you hit 'C-x 4 a' to generate the logs? Usually, this part should look like this: * latex-flymake.el (LaTeX-flymake-chktex-flags): New option. (LaTeX-flymake): Use it. > * doc/auctex.texi: > * doc/changes.texi: Document new option. > --- > doc/auctex.texi | 5 +++-- > doc/changes.texi | 23 +++++++++++++++-------- > latex-flymake.el | 20 +++++++++++++++++++- > 3 files changed, 37 insertions(+), 11 deletions(-) > > diff --git a/doc/auctex.texi b/doc/auctex.texi > index e861a752..9757f746 100644 > --- a/doc/auctex.texi > +++ b/doc/auctex.texi > @@ -3854,8 +3854,9 @@ buffers by adding this to your init file: > @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. > +You can customize @code{LaTeX-flymake-chktex-flags} to enable or disable > +chktex warnings. Note that @AUCTeX{} currently only provides support for > +using @code{chktex} as the flymake backend. Here, you should add a @defopt environment describing `LaTeX-flymake-chktex-flags'. And while we're at it: Can we rename this to `LaTeX-flymake-chktex-options'? So something like: @defopt LaTeX-flymake-chktex-options List of strings passed to chktex program as additonal options. @end defopt > Each of the two utilities @code{lacheck} and @code{chktex} will find > some errors the other doesn't, but @code{chktex} is more configurable, > diff --git a/doc/changes.texi b/doc/changes.texi > index bddec6a1..3e84f3c8 100644 > --- a/doc/changes.texi > +++ b/doc/changes.texi > @@ -8,6 +8,21 @@ > > @end ifset > > +@heading News in DEVELOP > + > +@itemize @bullet > +@item > +@AUCTeX{} has support for the Flymake package in Emacs 26 or newer. To > +enable, call @kbd{M-x flymake-mode RET} or add this to your > +@file{.emacs} file: > +@lisp > +(add-hook 'LaTeX-mode-hook #'flymake-mode) > +@end lisp This part is already in News in 12.2. > +The accompanying new customize option @code{LaTeX-flymake-chktex-flags} > +allows users to turn on/off specific warnings. This part should go into the NEWS -- slightly rephrased. > diff --git a/latex-flymake.el b/latex-flymake.el > index 2a86ebed..40bc3052 100644 > --- a/latex-flymake.el > +++ b/latex-flymake.el > @@ -40,6 +40,23 @@ > > (defvar-local LaTeX--flymake-proc nil) > > +(defcustom LaTeX-flymake-chktex-flags nil > + "If non-nil, a list of strings to pass as arguments to the chktex backend. ^^^^^^^^^ options? > +You can use this to enable or disable specific warnings by > +setting it to something like: > + > +'(\"-n12\" \"-w41\") With a recent Emacs, this needs to be: \\='(\"-n12\" \"-w41\") > + > +Which would disable warning 12 (\"interword spacing should > +perhaps be used\") and enable 41 (\"you ought not to use > +primitive TeX in LaTeX code\"). > + > +See the chktex manual for warning numbers and details about how > +to use flags." > + :type '(choice (const nil :tag "Use chktex defaults") > + (repeat string)) > + :group 'LaTeX) > + > (defun LaTeX-flymake (report-fn &rest _args) > "Setup flymake integration. > > @@ -56,7 +73,8 @@ REPORT-FN is flymake's callback function." > (make-process > :name "LaTeX-flymake" :noquery t :connection-type 'pipe > :buffer (generate-new-buffer " *LaTeX-flymake*") > - :command '("chktex" "--verbosity=0" "--quiet" "--inputfiles") > + :command (append `("chktex" "--verbosity=0" "--quiet" "--inputfiles") > + LaTeX-flymake-chktex-flags) Why using backquote when appending? Or maybe: :command `("chktex" "--verbosity=0" "--quiet" "--inputfiles" ,@LaTeX-flymake-chktex-options) > :sentinel > (lambda (proc _event) > (when (eq 'exit (process-status proc)) Again, sorry for being late. Best, Arash
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.