I'm working on multiple computers and compiling LaTeX document through AUCTeX. I've set up Evince as my external viewer and the synctex and back referencing work perfectly...

...as long as I've compiled the .tex file on the same computer. See, I have different Linux usernames on the different computers, and somehow it seems that the compilation is tied to the username. If I am on Computer 1, with user1 account, trying to use the synctex generated on Computer 2 with user2, it will open an empty buffer named latex.tex<user2>.

I have no idea how to solve this issue, and I couldn't find any setting (on AUCTeX or otherwise) that would fix this, nor I found any shred of mention of a username in the synctex.gz file data. Any suggestions?

(Yes, I do have an \author{} field, and no, it is not either of the user1 or user2.)

  • @db48x I think you don't understand my question.
    – Ink blot
    Apr 16, 2023 at 9:26
  • I think it's more likely to have something to do with your compiler which may record $USER in the target file.
    – shynur
    Apr 16, 2023 at 9:52
  • @Shynur: But I can't find anything like that in the pdf either, and surely there should be a way to make emacs ignore that?
    – Ink blot
    Apr 16, 2023 at 10:00
  • Whether user1 and user2 exist on the same machine at the same time? Are there directories named user1 and user2 on this machine?
    – shynur
    Apr 18, 2023 at 18:29
  • @shynur: No, these are two separate machines. One is a user given to me by my workplace and the other is my user account on my private computer.
    – Ink blot
    May 5, 2023 at 11:56

1 Answer 1


The buffer name is by default taken from the name of the file being edited, but it is not that uncommon to edit multiple files with the same name (naturally these files must all be in different directories). Emacs must create a unique buffer name even when the file names are different, and there are several ways that it can do so. Some of them involve extending the buffer name using part of the path as well.

See chapter 19.7.1 Making Buffer Names Unique in the Emacs manual for more details.

  • 1
    But that's what I mean. If I open the .tex file and the .pdf file, and I click to back reference, it will instead open a blank buffer named file.tex<user2>. If I recompile the tex file, it just works.
    – Ink blot
    Apr 16, 2023 at 9:26
  • Is the blank buffer visiting a file? If so, what is the path to that file?
    – db48x
    Apr 16, 2023 at 11:06
  • It claims to visit the "file.tex<user2>"
    – Ink blot
    Apr 16, 2023 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.