Hi Mosè, Mosè Giordano writes: > 2017-02-10 9:48 GMT+01:00 Arash Esbati : >> >> I think the regexp can be reduced to >> >> --8<---------------cut here---------------start------------->8--- >> (re-search-forward >> "^[[:space:]]*\\\\documentclass\\[\\([^]]+\\)\\]{subfiles}" >> nil t)) >> --8<---------------cut here---------------end--------------->8--- >> >> as `reftex-TeX-master-file' checks if .tex extension is given or not. >> With this change, one can use `C-c )' over all files in a project and >> `C-c C-c' compiles a only subfile when issued in it. >> >> Any comments? I would prepare a patch after confirmation here. > > `thing-at-point-file-name-chars' is a good list of characters > allowable in filenames (maybe it won't work in some corner case but > should do the job in most cases). However I don't have a preference > between your regexp and `thing-at-point-file-name-chars'. Thanks for your response and the hint. I see that @ is missing in `thing-at-point-file-name-chars', I hope that nobody names a file "m@in.tex" (corner case as you said), but I think we are on the safe side if we match everything and reduce the support factor in future ;-) @Tassilo: Can please apply this patch to Emacs master? TIA.