[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding to TeX-clean-default-intermediate-suffixes
From: |
Greg Bognar |
Subject: |
Re: Adding to TeX-clean-default-intermediate-suffixes |
Date: |
Tue, 31 Mar 2020 15:47:51 -0400 |
[See below]
-------------------------------------------------------------------------------
On Mon 30 Mar 2020 at 16:48 Joost Kremers wrote:
> On Mon, Mar 30 2020, Greg Bognar wrote:
> >> You should probably customize
> >> `LaTeX-clean-intermediate-suffixes`.
> >> `TeX-clean-default-intermediate-suffixes`
> >> just provides the default value for `LaTeX-clean-intermediate-suffixes`,
> >> which is why it's not a defcustom. (I assume that setting it doesn't have
> >> any effect because its value is not checked when cleaning out files. The
> >> value of `LaTeX-clean-intermediate-suffixes` is used for that.
> >
> > Thanks. I checked `LaTeX-clean-intermediate-suffixes` and its original
> > value is
> >
> > ("\\.aux" "\\.bbl" "\\.bcf" "\\.blg" "\\.brf" "\\.dvi" "\\.ent"
> > "\\.fdb_latexmk" "\\.fls" "\\.fmt" "\\.fot" "\\.glo" "\\.gls"
> > "\\.synctex\\.gz" "\\.idx" "\\.ilg" "\\.ind" "\\.lof" "\\.log" "\\.lot"
> > "\\.nav" "\\.out" "\\.rel" "\\.rip" "\\.snm" "\\.tags" "\\.toc" "\\.url"
> > "\\.vrb" "\\.run\\.xml" "\\.acn" "\\.acr" "\\.alg" "\\.glg" "\\.ist")
> >
> > which is my list, appended with ("\\.acn" "\\.acr" "\\.alg" "\\.glg"
> > "\\.ist")
> > as it should be from latex.el at (defcustom
> > LaTeX-clean-intermediate-suffixes...
> > at line 6061.
> >
> > But the actual value is
> > ("Notes\\.bib" "\\.tdo" "\\.aux" "\\.bbl" "\\.blg" "\\.brf" "\\.fot"
> > "\\.glo" "\\.gls" "\\.idx" "\\.ilg" "\\.ind" "\\.lof" "\\.log" "\\.lot"
> > "\\.nav" "\\.out" "\\.snm" "\\.toc" "\\.url" "\\.synctex\\.gz" "\\.bcf"
> > "\\.run\\.xml" "\\.fls" "-blx\\.bib" "\\.acn" "\\.acr" "\\.alg" "\\.glg"
> > "\\.ist" "\\.fdb_latexmk" "\\.aux.bak" "\\.fls")
> >
> >
> > So it seems `LaTeX-clean-intermediate-suffixes` *does* pick up my setq for
> > `TeX-clean-default-intermediate-suffixes`, but then something overrides it.
> > I
> > never use any "Notes.bib" file, so I don't think it's something in my
> > config.
> > Do you have any suggestions what it might be?
>
> Have you checked your config? Perhaps you set it a long time ago and forgot
> about it? (Happens to me more often than I care to admit. ;-) Or perhaps
> you're
> using some Emacs starter kit or a config from somewhere else? Or perhaps a
> file-local or dir-local variable?
> My advice would be to remove the `setq` from your config, customize
> `LaTeX-clean-intermediate-suffixes` to the value you want it to have and see
> what happens.
I now understand better what happens, but I still haven't solved the problem.
First, the `TeX-clean-default-intermediate-suffixes' variable is defined in
tex.el (l.2184, AUCTeX 12.2.0). Then the `LaTeX-clean-intermediate-suffixes'
variable takes its value and appends it with more suffixes in latex.el (l.6061).
In my init.el, there are two more packages that add to the list: auctex-latexmk
and latex-extra. latex-extra uses add-to-list and auctex-latexmk uses append.
So what I'd like to do is to append `LaTeX-clean-intermediate-suffixes' with
some more suffixes. However, doing
(setq LaTeX-clean-default-intermediate-suffixes
'(append LaTeX-clean-default-intermediate-suffixes
'("\\.dvi" "\\.ent" "\\.fmt" "\\.rel" "\\.rip" "\\.tags"
"\\.vrb")))
does not work. (Even if I completely comment out auctex-latexmk and
latex-extra.)
What is the proper way to append `LaTeX-clean-intermediate-suffixes', preserving
all the other additions to it?
I use use-package, if that makes any difference. I put the setq in the :config
part after
(use-package latex
:ensure auctex
:mode ("\\.tex\\'" . LaTeX-mode)
...
Thanks!