You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open a LaTeX-mode buffer containing $\left\langle \right\rangle$. Put the cursor in the middle of the brackets and do M-x sp-up-sexp. This should move the point to the rightmost $.
Actual behavior
The point does not move; we are dealt the message "Search failed: there is an unmatched expression somewhere or we are at the beginning/end of file."
Backtraces if necessary (M-x toggle-debug-on-error)
No error.
Environment & version information
smartparens version: 1.11.0
Active major-mode: LaTeX-mode
Smartparens strict mode: nil
Emacs version (M-x emacs-version): GNU Emacs 30.0.50 (build 4, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build 23C71)) of 2024-02-06
Starterkit/Distribution: Vanilla
OS: darwin
The text was updated successfully, but these errors were encountered:
Sorry, I should have seen in the manual the rule about pairs having to be prefix-free, so please feel free to close this issue -- I'll just note that both \langle, \rangle and \left\langle, \right\rangle appear often for me, so it's a significant issue.
The prefix-free note is not entirely correct anymore. I should revise it.
You can in fact have two pairs, let's say \langle and \rangle and what you have. The pairs then highlight a bit weirdly, but somewhat work. The fact that the navigation doesn't work I would consider a bug, because at the least it should recognize the "inside" pair (langle rangle) and jump out of that. So I think this is a valid report.
Just FYI, after submitting this report, I worked out some ad-hoc parenthesis-based navigation just for tex modes: https://github.com/ultronozm/tex-parens.el. I'm happy with this, so please feel free to deprioritize my report (at least as far as I'm concerned). I'd also be happy to try to incorporate my solution into smartparens if you thought that it made sense to do so, but it's not clear to me how feasible that would be. Anyway, thanks again for taking a look at this report and noting the issue.
Expected behavior
Modify
smartparens-latex.el
to contain the following additional local pair definition:Open a LaTeX-mode buffer containing
$\left\langle \right\rangle$
. Put the cursor in the middle of the brackets and doM-x sp-up-sexp
. This should move the point to the rightmost$
.Actual behavior
The point does not move; we are dealt the message "Search failed: there is an unmatched expression somewhere or we are at the beginning/end of file."
Backtraces if necessary (
M-x toggle-debug-on-error
)No error.
Environment & version information
smartparens
version: 1.11.0major-mode
:LaTeX-mode
M-x emacs-version
): GNU Emacs 30.0.50 (build 4, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build 23C71)) of 2024-02-06The text was updated successfully, but these errors were encountered: