Whenever I try to open .po (Portable Object) files in emacs, I get a "find-file-noselect-1: Wrong type argument: arrayp, nil" error and the file is not displayed. However, if I change the file extension to something else (like .txt), it opens in emacs fine. It seems as though emacs is trying to run the file because of its extension instead of just display it.

How can I get emacs to simply display .po files?

As a possibly relevant side note, whenever I execute M-x po-mode, it fails with the error "Cannot open load file: po-mode."

  • Does the error occur when you run emacs without loading you init file (emacs -q)? – JeanPierre Feb 11 '17 at 8:16
  • Or, as a first step towards debugging the problem, you could M-x toggle-debug-on-error before opening a .po file: this would show you the backtrace of where the error originates, which might give your readers a hint as to what's actually happening. – wvxvw Feb 11 '17 at 9:57
  • If po-mode doesn't load with M-x po-mode, that's almost certainly relevant. It sounds like po-mode isn't properly installed, or the installation is broken. It's not part of Emacs by default - how did you install it in the first place? – Tyler Feb 11 '17 at 22:11
  • @JeanPierre: the error does still occur with -q. @wvxvw: with that toggle, I get file-truename(nil) as an error. @Tyler: I am on a shared system, so the sysadmin must have installed po-mode. Maybe the right answer it to ask them to reinstall it. – Ben Feb 13 '17 at 15:28
  • Yes, I would ask your admin to reinstall. Or just to remove the package - you can install it yourself without admin privileges. Emacs packages are stored in ~/.emacs.d/, so you should be able to manage your own packages there without your admin doing anything. – Tyler Feb 14 '17 at 23:36

Your Answer

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

Browse other questions tagged or ask your own question.