auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] Broken environment options placement (with transient-mark-mode)


From: Tassilo Horn
Subject: [AUCTeX] Broken environment options placement (with transient-mark-mode)
Date: Thu, 09 Dec 2010 11:19:39 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Hi,

let's say I have a code snippet that I copy into my LaTeX buffer:

--8<---------------cut here---------------start------------->8---
  query isFemale(m : families::Member) : Boolean {
    not m.familyMother.oclIsUndefined()
    or not m.familyDaughter.oclIsUndefined()
  }
--8<---------------cut here---------------end--------------->8---

Now I activate the mark at the beginning of the first line and move
point to the beginning of the line after the closing brace.  I hit C-c
C-e, choose the lstlisting environment and enter my options.  When
confirming with RET, that's what I end up with.

--8<---------------cut here---------------start------------->8---
\begin{lstlisting}
  query isFemale(m : families::Member) : Boolean {
    not m.familyMother.oclIsUndefined()
    or not
    
m.familyDaughter.oclIsUndefined()[float={h!},language=qvtr,label={lst:qvtr-query-is-female},caption={caption}]
  }
\end{lstlisting}
--8<---------------cut here---------------end--------------->8---

As you can see, the options are misplaced, and the correct thing would
be

--8<---------------cut here---------------start------------->8---
\begin{lstlisting}[float={h!},language=qvtr,label={lst:qvtr-query-is-female},caption={caption}]
  query isFemale(m : families::Member) : Boolean {
    not m.familyMother.oclIsUndefined()
    or not m.familyDaughter.oclIsUndefined()
  }
\end{lstlisting}
--8<---------------cut here---------------end--------------->8---

This feature of environmentalizing a marked region (including the bug)
requires transient-mark-mode.

I use AUCTeX 11.86 with the patch from Ralf
(<address@hidden> on auctex-devel).

Bye,
Tassilo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]