0

Around half the time (and I haven't established a solid repro that triggers it), opening a new file in emacs will trigger a big pause, then two windows appear: one showing *temp file* and one asking me to choose encoding for the temp file. This is on a beefy windows 10 machine with windows 25.1.1.

enter image description here

I'm running on prelude and mostly use projectile, but it happens outside of projectile and I've cleared projectile's file list. Emacs has been rebooted multiple times.

Anyone know how I can stop this? Maybe I need to manually clear this temp file, but where does it live?

  • The first thing to check is if this happens in an emacs -Q environment. Does the "file" utility report the encoding for these files? – stsquad Feb 19 '18 at 10:29
  • this file that can't be encoded is the *temp* file, and I can't find anything on where that lives (if it's even an on-disk file) – tenpn Feb 19 '18 at 10:32
  • I'm assuming the temp file is an interim buffer that emacs creates to encode the file you just opened. Is there any reason to think it is unrelated to the file you just opened? – stsquad Feb 19 '18 at 11:05
  • it previews the temp file in the top-right of my screenshot, and that's not what I'm opening. I'm just opening a regular code file, not a huge list of other files. – tenpn Feb 19 '18 at 11:30
  • also it doesn't seem consistent - the incident I had this morning was opening a file I've opened swiftly multiple times in the last few weeks, and has no non-ascii chars. – tenpn Feb 19 '18 at 11:31
0

This continued, with variations, for years. It didn't happen on my other machines that sync'd the same dotfiles.

I finally fixed it by deleting a bunch of the files under ~.emacs.d\savefile. Will update if the problem comes back.

0

My guess is:

  • You're calling find-file or similar.
  • You have some kind of custom completion framework installed which is kicking in automatically at this point in order to present you with a selection of files to choose from. (Based on the screenshot, this is presumably helm).
  • The framework is using this *temp* buffer to process its data.
  • One or more of your files contains one or more funky characters in its filename.

The warning buffer gives you an interface for inspecting the characters with encoding issues, which will surely take you to the filenames in question, which will give you some more information/context about why and when this issue occurs, and allow you to provide a recipe to reproduce the issue.

Armed with that recipe, you could then pose the question upstream to the maintainer of the framework in question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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