bug-auctex
[Top][All Lists]
Advanced

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

bug#21434: BUG Report: "mark-sexp" function disable.


From: Arash Esbati
Subject: bug#21434: BUG Report: "mark-sexp" function disable.
Date: Mon, 04 Mar 2024 11:40:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Tassilo Horn <tsdh@gnu.org> writes:

> 赵瑞昌 <zhaoruichang@tsinghua.org.cn> writes:
>
>> I have updated the emacs to 24.5.1, and installed auctex 11.88.8 by
>> `package-list-packages'.  however, the problem seems still exist: when
>> `C-M-@' (mark-sexp) at the beginning of a `\begin{...', only `\begin'
>> canbe marked, instead of the whole env.  And also the
>> `forward/backward-sexp' can only effect to the `\begin'.
>
> Ah, now I get what you are saying.  Well, (La)TeX has no real notion of
> a sexp, so `forward-sexp' and `backward-sexp' basically move over words
> and symbols (TeX macros), or from one (, [, or { to the respective
> closing paren/bracket.
>
> But you can give Magnar's awesome expand-region a try.
>
>   https://github.com/magnars/expand-region.el
>
> That has support for expanding the current region also in LaTeX specific
> ways.  E.g. with
>
> \begin{enumerate}
> \item foo
> \item _b_ar
> \end{enumerate}
>
> where the _b_ means point is on the b in bar, calling er/expand-region
> results in
>
> \begin{enumerate}
> \item foo
> \item _bar_
> \end{enumerate}
>
> where the complete _bar_ is marked, another call gives
>
> \begin{enumerate}
> \item foo
> _\item bar_
> \end{enumerate}
>
> where the complete \item ... is marked, another two calls mark all
> items, and a final call markes the complete environment.
>
> I think that's exactly what you want, right?  And expand-region.el can
> do this magic not only for latex but also for lisp, ruby, python, xml,
> javascript, CSS, and what not.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I think this is a "wontfix", therefore I'm closing this report.

Best, Arash





reply via email to

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