I tried evaluating find-file-name-handler as suggested and it returns nil. I suspect it is due to OneDrive (and now also Nextcloud's) virtual files, which live online until requested. Somehow opening the file does not trigger the required download. Juanjo Lars Ingebrigtsen escribió: > Juan José García-Ripoll writes: > >> The file is living in OneDrive in Windows 10/11. I will try with other >> files in the same file system, but it has hit me hard this week, which >> I am in remote mode. > > As Eli says, buffer-file-name apparently being nil in this case, and > that's very odd. > > Could there be a special file name handler for OneDrive that's doing > something odd? > > What does > > M-: (find-file-name-handler > "~/OneDrive/Mail/archive/Archives-2017.mbox" 'insert-file-contents) > RET > say? Juan José García Ripoll Instituto de Física Fundamental, CSIC Calle Serrano 113b, Madrid 28006, Spain Phone: (+34) 915616800 (dial 943107 when hearing the voice) http://quinfog.iff.csic.es / http://juanjose.garciaripoll.com