auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Output to directory patch


From: Ikumi Keita
Subject: Re: Output to directory patch
Date: Fri, 12 Mar 2021 19:23:01 +0900

Hi Al,

>>>>> Al Haji-Ali <abdo.haji.ali@gmail.com> writes:
> Yes, you are right about the commands. But the complete path to an
> output file might be needed if TeX-master-file is called with a nil
> `nondirectory`. In any case, since I have access to the master
> filename, I can figure out the directory without calling
> TeX-master-directory in TeX-master-output-dir.

> I implemented those suggestions in my public repo (and rebased to
> master). Now, TeX-output-dir is read locally and hence all subfiles
> must have it set correctly to the same value (for example in as a
> directory-local variable instead of file-local variable).

Thanks, I appreciate your continued effort.

Now I'm inclined to incorporate your patch, and would like to request
some items.

1. First of all, please write documentation for the new feature. Add
appropriate section of paragraphs to texinfo files under doc/
subdirectory.

2. Please fill the following comments and code in
`TeX-inline-preview-internal':
,----
|                                         ;; Get the filename from 
TeX-master-file with prv
|                                         ;; to get the correct path but then 
strip
|                                         ;; the extension
|                                         (file-name-sans-extension 
(TeX-master-file "prv" t))))))
`----

3. The comparison between name-or-file-fn and 'TeX-region-file in the
following code of `TeX-command-default' can be done with `eq', which
would be lighter than `equal'.
,----
|   (let ((command-next nil)
|         (name (TeX--concat-ext name-or-file-fn)))
|     (cond ((if (equal name-or-file-fn 'TeX-region-file)
`----

4. In `TeX-command-list', "%(output-dir)" need not to be put between
"%`" and "%'":
,----
|   '(("TeX" "%(PDF)%(tex) %(file-line-error) %`%(extraopts) %(output-dir) 
%S%(PDFout)%(mode)%' %t"
`----
,----
|     ("AmSTeX" "amstex %(PDFout) %`%(extraopts) %(output-dir) %S%(mode)%' %t"
`----
The constructs "%`" and "%'" are provided to enclose elements which have
possibility to contain TeX code (string beginning with a backslash "\")
when expanded.

5. There are small incomatibilities in defcutom of `TeX-output-dir':
,----
| (defcustom TeX-output-dir nil
|   "The directory where the output files will be generated. The
|   directory cannot start with a `.'.
| 
| If this variable is nil, AUCTeX will assume that the output
| directory is the same as the directory of TeX-master."
|   :group 'TeX-file
|   :local t
|   :safe 'string-or-null-p
|   :type 'string)
`----
5-1. Keyword :local isn't supported by older emacsen (at least 24.3).
     Use separate `make-variable-buffer-local' instead.
5-2. The default value nil doesn't match the `string' type, thus
     customization buffer shown by M-x customize-option displays
     "mismatch" like this:
,----
| Hide TeX-output-dir: nil
|     State : STANDARD. (mismatch)
`----

6.(Option) It would be slightly better if 'FUNCTION-NAME-SYMBOLs are
rewritten as #'FUNCTION-NAME-SYMBOLs in codes committed anew, but I
leave it to your choice since it would make only thin difference.

Regards,
Ikumi Keita



reply via email to

[Prev in Thread] Current Thread [Next in Thread]