-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
smartparens breaks LaTeX quotation marks mechanism for language styles #1100
Comments
The above mentioned workaround improves the behavior for German quotes (by a lot) but does not resolve the issues completely. When pressing For better reproducibility, here is my tex-code: \documentclass{article}
\usepackage{ngerman}
\begin{document}
"`foo"'
\end{document} And here the value I have set '(("ngerman" "\"`" "\"'" nil) ("german" "\"`" "\"'" nil)) |
Hi, I just want to state that this is still an issue. |
Since (sp-local-pair 'latex-mode "`" nil :actions nil)
(sp-local-pair 'latex-mode "\"" nil :actions nil)
(sp-local-pair 'latex-mode "``" nil :actions nil) I'm sure it could be made to work together, for example by dynamically adding pairs based on To be completely honest, I don't really use tex anymore so this is not very high priority for me. Plus I don't understand how auctex handles this and what users expect, so it's really hard to create a good solution. We can brainstorm some ideas and if there is consensus something can be implemented. But a safe way would be to defer the quote handling to auctex. |
Hi! Thanks for your reply. I have played around a bit, and I sincerely do not understand what is going on. Using
I can normally write a single double quote Then, further deactivating
doesn't really change things (which is a further indication that we are Finally, deactivating
leads to classic AucTeX behavior: In LaTeX comments, insertion is unchanged. In So in the end, I think it is probably best to deactivate all three quotes in Finally, I do not understand what this statement does in
Should we also remove it? |
Yea, tags no longer exist |
Expected behavior
Press
["]
once to get«.»
, twice for"."
(or vice-versa ifTeX-quote-after-quote
is non-nil).Notes
TeX-quote-open
andTeX-quote-close
but could be different depending on the applied language style, e.g."<
and">
, respectively.Actual behavior
Press
["]
once, depending on the value ofTeX-quote-after-quote
and ifTeX-quote-open
andTeX-quote-close
are single or double characters, different behavior are present. Worst case scenario is that only part of the quote string is inserted, moreover partly in the previous line and partly in the current, while deleting a previous character. Refer to syl20bnr/spacemacs#15003 for specific "experiments".Steps to reproduce the problem
auctex
andsmartparens
.\usepackage[german]{babel}
(parsing on load must be activated to successfully load the language style).I leave here my
.emacs
for reference.Workaround
A workaround has been documented in syl20bnr/spacemacs#15003 that allows the use
smartparens
.Environment & version information
smartparens
version: 20210817.1912major-mode
:latex-mode
M-x emacs-version
): GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-19The text was updated successfully, but these errors were encountered: