Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does emacs sometimes insert weird characters at the top of my file?

Every so often, when I save a file using emacs I open the file to find a weird string of characters inserted at the beginning of the file. I have noticed this on multiple computers, so I don't believe it is specific to my machine.

I'm running Ubuntu 9.04 with GNU Emacs version 23.1.1.

Here is a sample of what I found today while editing a latex document:

B1;2305;0c\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}

Am I perhaps closing the file incorrectly?

like image 415
Rusty Shackelford Avatar asked Nov 15 '10 19:11

Rusty Shackelford


1 Answers

Are you running Emacs in the shell or under X? That looks like a terminal problem (similar to the escape sequences you see if your terminal doesn't like your cursor keys et al.)

like image 115
Ulrich Schwarz Avatar answered Sep 22 '22 16:09

Ulrich Schwarz