0

In the Emacs Manual (50.4.2) as an example of init file examples we have this by Richard Stallaman:

Set up defaults for the Latin-1 character set, which supports most of the languages of Western Europe.

(set-language-environment "Latin-1")

I am curious as to why the manual not suggest utf-8? Could this be an historical artifact? If so, why has it never been updated? Is this merely and example and not a recommendation? Perhaps there is an advantage to using Latin 1?

7
  • 2
    The title of the section is "Init Examples" - emphasis added. No recommendation is implied: it's just a list of "You want to do <this>? Here is how". Best thing to do is: nothing. If it works out of the box without you doing anything, you avoid a lot of hassles. Eventually, you might run into situations where the default does not work for whatever reason. At that point, you can start delving into arcana, but by then you should be a seasoned Emacser and able to find your way through the documentation to solve all problems.
    – NickD
    Commented Jul 30, 2023 at 17:38
  • If utf-8 is now the default, it follows that there is no need to add utf as the language environment to dot emacs? If so, do I need: (set-language-environment "UTF-8") (prefer-coding-system 'utf-8) (setq-default buffer-file-coding-system 'utf-8)
    – Edman
    Commented Jul 31, 2023 at 10:23
  • 1
    I have LANG=en_US.UTF-8 set by my system and I set nothing in my emacs init. I would suggest that you start with that setup (i.e. doing nothing in emacs) and see how it works.
    – NickD
    Commented Jul 31, 2023 at 11:28
  • 1
    I set that in my .bashrc (I am on msys2 in Windows). The coding system in Emacs is now utf-8-dos.
    – Edman
    Commented Jul 31, 2023 at 12:28
  • 1
    Yes (to both questions :-) )
    – NickD
    Commented Aug 1, 2023 at 21:05

0

Your Answer

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

Browse other questions tagged or ask your own question.