This question is a follow-up to Switching to the local directory after loading a file?
I have the following in my .vimrc:
autocmd BufReadPost *.tex lchdir %:p:h
with the intent of setting the current directory to the same as the edited file for *.tex files, without setting the global autochdir.
It works if I call:
gvim /home/romano/education/IntroEle-SAP-135/Lab-T1/LabTestExample.tex
Look at the full filename in status line here:

But it does not work if I call:
gvim --servername desktop_0 --remote-tab-silent /home/romano/education/IntroEle-SAP-135/Lab-T1/LabTestExample.tex
Screenshot:

(the culprit seems to be the --remote-tab-silent switch). How can I correct this so that the autocmd works in the two cases?
:help bug-reportsfor information on how to report them. – Martin Tournoij Feb 20 '15 at 22:19