Received: (at submit) by debbugs.gnu.org; 28 Mar 2018 22:27:06 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 28 18:27:06 2018 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> To: "" <bug-auctex@HIDDEN> Subject: [PATCH] add customize option for flymake 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-Debbugs-Envelope-To: submit 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 --=-=-=--
Alex Branham <alex.branham@HIDDEN>
:bug-auctex@HIDDEN
.
Full text available.bug-auctex@HIDDEN
:bug#30980
; Package auctex
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.