Package: auctex;
Reported by: Alex Branham <alex.branham <at> gmail.com>
Date: Sun, 11 Feb 2018 18:07:02 UTC
Severity: normal
Tags: patch
Done: Mosè Giordano <mose <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30423 in the body.
You can then email your comments to 30423 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Sun, 11 Feb 2018 18:07:02 GMT) Full text and rfc822 format available.Alex Branham <alex.branham <at> gmail.com>
:bug-auctex <at> gnu.org
.
(Sun, 11 Feb 2018 18:07:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Alex Branham <alex.branham <at> gmail.com> To: bug-auctex <at> gnu.org Subject: 2018-01-25; [patch] flymake support Date: Sun, 11 Feb 2018 12:06:56 -0600
[Message part 1 (text/plain, inline)]
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 <branham <at> utexas.edu> 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
[0001-Support-flymake-in-Emacs-26-using-chktex.patch (text/x-patch, attachment)]
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Fri, 16 Feb 2018 02:36:01 GMT) Full text and rfc822 format available.Message #8 received at 30423 <at> debbugs.gnu.org (full text, mbox):
From: Alex Branham <alex.branham <at> gmail.com> To: 30423 <at> debbugs.gnu.org Subject: Re: 2018-01-25; [patch] flymake support Date: Thu, 15 Feb 2018 20:36:13 -0600
Has anyone had time to look at this or test it out? On Sun 11 Feb 2018 at 12:06, Alex Branham <alex.branham <at> gmail.com> 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 <branham <at> utexas.edu> > 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 <branham <at> utexas.edu> > 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
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Fri, 16 Feb 2018 08:39:01 GMT) Full text and rfc822 format available.Message #11 received at 30423 <at> debbugs.gnu.org (full text, mbox):
From: Mosè Giordano <mose <at> gnu.org> To: Alex Branham <alex.branham <at> gmail.com> Cc: 30423 <at> debbugs.gnu.org Subject: Re: bug#30423: 2018-01-25; [patch] flymake support Date: Fri, 16 Feb 2018 09:37:32 +0100
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 <alex.branham <at> gmail.com>: > 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 <branham <at> utexas.edu> > 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=30484. 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è
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Fri, 16 Feb 2018 15:11:01 GMT) Full text and rfc822 format available.Message #14 received at 30423 <at> debbugs.gnu.org (full text, mbox):
From: Alex Branham <alex.branham <at> gmail.com> To: Mosè Giordano <mose <at> gnu.org> Cc: 30423 <at> debbugs.gnu.org Subject: Re: bug#30423: 2018-01-25; [patch] flymake support Date: Fri, 16 Feb 2018 09:10:28 -0600
On Fri 16 Feb 2018 at 02:37, Mosè Giordano <mose <at> gnu.org> 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 <alex.branham <at> gmail.com>: >> 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 <branham <at> utexas.edu> >> 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=30484. 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
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Fri, 16 Feb 2018 16:58:02 GMT) Full text and rfc822 format available.Message #17 received at 30423 <at> debbugs.gnu.org (full text, mbox):
From: Alex Branham <alex.branham <at> gmail.com> To: Mosè Giordano <mose <at> gnu.org> Cc: 30423 <at> debbugs.gnu.org Subject: separate flymake into latex-flymake.el Date: Fri, 16 Feb 2018 10:57:49 -0600
[Message part 1 (text/plain, inline)]
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 <branham <at> utexas.edu> 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
[0001-Support-flymake-in-Emacs-26-using-chktex.patch (text/x-patch, attachment)]
Mosè Giordano <mose <at> gnu.org>
:Alex Branham <alex.branham <at> gmail.com>
:Message #22 received at 30423-done <at> debbugs.gnu.org (full text, mbox):
From: Mosè Giordano <mose <at> gnu.org> To: Alex Branham <alex.branham <at> gmail.com> Cc: 30423-done <at> debbugs.gnu.org Subject: Re: separate flymake into latex-flymake.el Date: Sat, 17 Feb 2018 19:55:51 +0100
Hi Alex, 2018-02-16 17:57 GMT+01:00 Alex Branham <alex.branham <at> gmail.com>: > 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è
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Sun, 18 Feb 2018 20:16:02 GMT) Full text and rfc822 format available.Message #25 received at 30423 <at> debbugs.gnu.org (full text, mbox):
From: Arash Esbati <arash <at> gnu.org> To: Alex Branham <alex.branham <at> gmail.com> Cc: 30423 <at> debbugs.gnu.org, Mosè Giordano <mose <at> gnu.org> Subject: Re: bug#30423: separate flymake into latex-flymake.el Date: Sun, 18 Feb 2018 21:14:58 +0100
Alex Branham <alex.branham <at> gmail.com> 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
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Mon, 19 Feb 2018 01:44:01 GMT) Full text and rfc822 format available.Message #28 received at 30423 <at> debbugs.gnu.org (full text, mbox):
From: Alex Branham <alex.branham <at> gmail.com> To: Arash Esbati <arash <at> gnu.org> Cc: 30423 <at> debbugs.gnu.org, Mosè Giordano <mose <at> gnu.org> Subject: Re: bug#30423: separate flymake into latex-flymake.el Date: Sun, 18 Feb 2018 19:44:20 -0600
On Sun 18 Feb 2018 at 14:14, Arash Esbati <arash <at> gnu.org> wrote: > Alex Branham <alex.branham <at> gmail.com> 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
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Tue, 20 Feb 2018 20:22:01 GMT) Full text and rfc822 format available.Message #31 received at 30423 <at> debbugs.gnu.org (full text, mbox):
From: Arash Esbati <arash <at> gnu.org> To: Alex Branham <alex.branham <at> gmail.com> Cc: 30423 <at> debbugs.gnu.org, Mosè Giordano <mose <at> gnu.org> Subject: Re: bug#30423: separate flymake into latex-flymake.el Date: Tue, 20 Feb 2018 21:17:21 +0100
Alex Branham <alex.branham <at> gmail.com> writes: > On Sun 18 Feb 2018 at 14:14, Arash Esbati <arash <at> gnu.org> 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
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Tue, 20 Feb 2018 21:00:02 GMT) Full text and rfc822 format available.Message #34 received at 30423 <at> debbugs.gnu.org (full text, mbox):
From: Alex Branham <alex.branham <at> gmail.com> To: Arash Esbati <arash <at> gnu.org> Cc: 30423 <at> debbugs.gnu.org, Mosè Giordano <mose <at> gnu.org> Subject: Re: bug#30423: separate flymake into latex-flymake.el Date: Tue, 20 Feb 2018 14:59:18 -0600
[Message part 1 (text/plain, inline)]
On Tue 20 Feb 2018 at 14:17, Arash Esbati <arash <at> gnu.org> wrote: > Alex Branham <alex.branham <at> gmail.com> writes: > >> On Sun 18 Feb 2018 at 14:14, Arash Esbati <arash <at> gnu.org> 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 <branham <at> utexas.edu> 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{<URL:ftp://ftp.ctan.org/tex-archive/support/lacheck/>} 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{<URL:ftp://ftp.ctan.org/tex-archive/support/lacheck/>} and @code{chktex} from @file{<URL:ftp://ftp.ctan.org/tex-archive/support/chktex/>}. 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 <at> 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
[0001-Improve-flymake-documentation.patch (text/x-patch, attachment)]
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Wed, 21 Feb 2018 20:54:02 GMT) Full text and rfc822 format available.Message #37 received at 30423-done <at> debbugs.gnu.org (full text, mbox):
From: Arash Esbati <arash <at> gnu.org> To: Alex Branham <alex.branham <at> gmail.com> Cc: 30423-done <at> debbugs.gnu.org, Mosè Giordano <mose <at> gnu.org> Subject: Re: bug#30423: separate flymake into latex-flymake.el Date: Wed, 21 Feb 2018 21:52:10 +0100
Alex Branham <alex.branham <at> gmail.com> 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
bug-auctex <at> gnu.org
:bug#30423
; Package auctex
.
(Wed, 21 Feb 2018 21:16:02 GMT) Full text and rfc822 format available.Message #40 received at 30423-done <at> debbugs.gnu.org (full text, mbox):
From: Alex Branham <alex.branham <at> gmail.com> To: Arash Esbati <arash <at> gnu.org> Cc: 30423-done <at> debbugs.gnu.org, Mosè Giordano <mose <at> gnu.org> Subject: Re: bug#30423: separate flymake into latex-flymake.el Date: Wed, 21 Feb 2018 15:15:36 -0600
On Wed 21 Feb 2018 at 14:52, Arash Esbati <arash <at> gnu.org> wrote: > Alex Branham <alex.branham <at> gmail.com> 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
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Thu, 22 Mar 2018 11:24:04 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.