-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LaTeX mode: the feature that encloses a region by $ doesn't work #834
Comments
I try to test with a new few pairs in latex mode and here is the result:
Looking in the code of smartparens, I observed that the variable sp-wrap-overlay for sp-wrap-overlay for |
The problem is that This can be fixed somehow, but is pretty hackish. I'm trying to come up with some nice solution (the issue being that only one predicate can be registered for |
Thank you for the confirmation and I'm looking forward to your update! |
A workaround in the meantime is to rebind |
@jabranham Thank you for the suggestion! |
Same happen for the quotation; where it is supposed that the marked region is inserted in a quotation like `` " , when I just hit ". How can we fix that? Also, I do not know how to " rebind $ to self-insert-command in TeX-mode-map" as you suggested. |
For rebind |
It works for me with the default config on emacs 26.1, I can't repro this. |
this doesn't work for me (GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-09-16) Without the code above, when I selected With the code above, it does differently: it delets |
Seems that this was also happening because before the functions were called |
Expected behavior
in LaTeX mode, when marking a region like
foo |zoo bar|> zar
, where|
indicates the region boundary, and>
indicates the cursor and type the$
key, I expected that the textzoo bar
will be enclosed in a pair of$
, like:foo $zoo bar$ zar
.Actual behavior
The text
zoo bar
is deleted. The remain text isfoo zar
Steps to reproduce the problem
foo zoo bar zar
,zoo bar
$
foo zar
(zoo bar
is deleted)Environment & version information
Linux Mint 18.3, Spacsmacs, GNU Emacs 26.0.90, smartparens-20171201.242
The text was updated successfully, but these errors were encountered: