GNU bug report logs -
#36483
12.1.2; 'lacheck' and 'chktex' results not recongnized by compilation mode when filename has spaces
Previous Next
Reported by: Gustavo Barros <gusbrs.2016 <at> gmail.com>
Date: Wed, 3 Jul 2019 00:21:01 UTC
Severity: normal
Tags: fixed
Found in version 12.1.2
Done: Ikumi Keita <ikumi <at> ikumi.que.jp>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 36483 <at> debbugs.gnu.org (full text, mbox):
Hi Keita,
On Mon, Jul 15 2019, Ikumi Keita wrote:
> Hi Gustavo,
>
>>>>>> Gustavo Barros <gusbrs.2016 <at> gmail.com> writes:
>
> I reported this problem in emacs-devel <at> gnu.org, but didn't get any
> response unfortunately. What we can do tentatively now is to add an
> ad-hoc workaround like a patch quoted below to AUCTeX.
Thank you for that.
>
> What do you think about this?
>
Well, the potential repercussions of the change are somewhat beyond my league.
But I understand the proposed change is restrained to `TeX-command-buffer`, so
no consequences are expected outside AUCTeX.
However, I don’t have the means to judge if this might cause any side effects
to other TeX-commands or if dealing with this in ad-hoc fashion is to be
frowned upon or not (it looks good to me, but I’m no dev). So I trust your
judgment on that. If you are fine with it, so am I.
Of course, I’ve tested it, and it works. So I’m very happy with this
result. Thank you very much.
> Regards,
> Ikumi Keita
>
> diff --git a/tex-buf.el b/tex-buf.el
> index 8b87c4c6..cf3ada95 100644
> --- a/tex-buf.el
> +++ b/tex-buf.el
> @@ -1293,7 +1293,17 @@ run of `TeX-run-TeX', use
> (defun TeX-run-compile (_name command _file)
> "Ignore first and third argument, start compile with second argument."
> (let ((default-directory (TeX-master-directory)))
> - (setq TeX-command-buffer (compile command))))
> + (setq TeX-command-buffer (compile command)))
> + ;; Make `compilation-mode' to recognize file names with spaces.
> + ;; (bug#36483)
> + (with-current-buffer TeX-command-buffer
> + (make-local-variable 'compilation-error-regexp-alist)
> + (add-to-list 'compilation-error-regexp-alist
> + ;; Add slightly modified entry of the one associated
> + ;; with `comma' in `compilation-error-regexp-alist-alist'
> + ;; to pick up file names with spaces.
> + '("^\"\\([^,\"\n\t]+\\)\", line \\([0-9]+\\)\
> +\\(?:[(. pos]+\\([0-9]+\\))?\\)?[:.,; (-]\\( warning:\\|[-0-9 ]*(W)\\)?" 1
> 2 3 (4)) t))))
>
> (defun TeX-run-shell (_name command _file)
> "Ignore first and third argument, start shell-command with second
> argument."
Besides that, if I may.
I’m not an English native speaker, but I do think "Make `compilation-mode'
recognize file names with spaces." would sound better. And, if I am not
mistaken, I believe there is a (closing) parenthesis too much in the patch.
Thank you again very much for seeing this through.
Best regards,
Gustavo Barros.
This bug report was last modified 5 years and 306 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.