0

I am observing what I believe is an odd behavior in Emacs.

I have a Latex file which, when opened, changes the keybindings in my Emacs.

For example, C-x s does not save the file anymore, and Emacs does not find the default pdf viewer upon compiling and visualizing the file.

In the modeline I read:

-UU0:----F1  letter.tex  Top L1  (LaTex Ref)

While normally when I open the other LaTex files I read:

-UUU(DOS):----F1  filename.tex  Top L1  (LaTex/P Ref)

What should I look at?

The file looks like the following:

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{array}
\usepackage{babel}
\usepackage{amsmath}
\usepackage{pstricks}
\usepackage{amsmath,amsthm,amsopn,amstext,amscd,amsfonts,amssymb}
\usepackage{subfig}
\usepackage{graphics,graphicx,epsfig}
\usepackage{xspace}
\usepackage{verbatim}
\usepackage{epstopdf}
\usepackage{color}
\usepackage[round]{natbib}
\usepackage{booktabs}
\usepackage[hyphens]{url}
\usepackage{hyperref}
\usepackage{changepage}
\usepackage{geometry}
\geometry{top=2cm,bottom=2cm,left=2cm,right=2cm}

\newcommand{\C3}{\noindent \textcolor{red}{COMMENT.}\vspace{0.5cm}}

\newcommand{\C2}[1]{
\noindent\hspace{0.2\linewidth}\begin{minipage}{0.8\linewidth}
\emph{#1}
\end{minipage}
\vspace{0.5cm}
}

\newcommand{\C1}[1]{
\noindent #1
\vspace{0.5cm}
}


\begin{document}
\end{document}
  • I'm no expert in LaTeX modes, but to me looks like you're in aucTeX mode in one case and Latex/P mode in the other. Why it loads one or another might be in the first file line or in your config files – Muihlinn Jun 2 at 15:12
  • No: LaTeX/P is just auctex with TeX-pdf-mode switched on. – Fran Burstall Jun 2 at 17:52
  • Are there any file-local variables declared at the bottom of the strange file? – Fran Burstall Jun 2 at 18:09
  • @FranBurstall I update the question with the preamble of the file. There is no local variable at the end of the file. – k88074 Jun 3 at 8:28
  • 2
    "For example, C-x s does not save the file anymore" -- so what does it do? What does C-h k C-x s tell you? – phils Jun 3 at 12:38

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.