<div dir="ltr"><div>Hi,<br><br></div>Plain TeX first reads tex/plain and its subdirectories and if no match is found, other directories are searched for. This is why the last one of the list wins because it will be searched first. If you want to get the same result by kpsewhich, you have to specify -progname tex in order to force the same order of directories.<br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">Zdeněk Wagner<br><a href="http://ttsm.icpf.cas.cz/team/wagner.shtml" target="_blank">http://ttsm.icpf.cas.cz/team/wagner.shtml</a><br><a href="http://icebearsoft.euweb.cz" target="_blank">http://icebearsoft.euweb.cz</a></div></div>
<br><div class="gmail_quote">2017-04-15 11:30 GMT+02:00 Andreas Scherer <span dir="ltr"><<a href="mailto:andreas_tex@freenet.de" target="_blank">andreas_tex@freenet.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
although TeXlive 2016 is frozen, I need assistance with the following<br>
situation: I am trying to install a local version of 'cwebmac.tex', but<br>
TeX picks up a different variant.<br>
<br>
'kpsewhich cwebmac.tex' correctly reports:<br>
/home/andreas/.texlive2016/<wbr>texmf-var/tex/generic/cweb/<wbr>cwebmac.tex<br>
<br>
'kpsewhich -a cwebmac.tex' lists three variants:<br>
/home/andreas/.texlive2016/<wbr>texmf-var/tex/generic/cweb/<wbr>cwebmac.tex<br>
/opt/texlive/texmf-local/tex/<wbr>generic/cweb/cwebmac.tex<br>
/opt/texlive/2016/texmf-dist/<wbr>tex/plain/cweb/cwebmac.tex<br>
<br>
However, when I run 'tex url.tex', I get this:<br>
This is TeX, Version 3.14159265 (TeX Live 2016) (preloaded format=tex)<br>
(./url.tex (/opt/texlive/2016/texmf-dist/<wbr>tex/plain/cweb/cwebmac.tex) *1<br>
! Undefined control sequence.<br>
l.5 You can send e-mail to \pdfURL<br>
                                  {the<br>
?<br>
<br>
(The missing macro is defined in my local 'cwebmac.tex'.)<br>
<br>
Happy Easter,<br>
Andreas<br>
</blockquote></div><br></div>