2

In earlier versions of emacs (<23, I believe), when a region ( e.g., 'some text') was selected in AucTeX, and C-e was entered to include the text an environment, the following was obtained:

\begin{center}
some text
\end{center}

However, in Emacs 24, it is not possible to use C-e if a region has been selected. Rather, I have to unselect the region and then type C-e. If the point is on the text, the environment is inserted after the text with C-e:

some text
\begin{center}

\end{center}

and the cursor is within the environment.

Is it possible to get the old behaviour back?

3
  • 3
    The feature you describe works also with Emacs 24, so probably you have some settings in your init file preventing this from working.
    – giordano
    Oct 22, 2015 at 10:57
  • Thank you. I found the culprit: '(cua-mode t nil (cua-base)) Oct 22, 2015 at 14:58
  • 1
    You may want to answer your own question then ;-)
    – giordano
    Oct 22, 2015 at 16:26

1 Answer 1

1

The selected text does not seem to be included if cua-mode is turned on, so it needs to be turned off:

(cua-mode 0)

Your Answer

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

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