Skip to content
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

strange quote insertion in latex comments #1199

Open
dankessler opened this issue Apr 4, 2024 · 1 comment
Open

strange quote insertion in latex comments #1199

dankessler opened this issue Apr 4, 2024 · 1 comment
Labels

Comments

@dankessler
Copy link

dankessler commented Apr 4, 2024

Expected behavior

Suppose I am editing a comment in a latex file, e.g.,

Blah blah
% here is a comment (|)
blah blah

where point is at (|).

If I strike ", I expect the insertion of a plain ", or perhaps a pair like either "(|)" or like ``(|)''

Actual behavior

Instead, I get this

Blah blah
% here is a comment`(|)'''
blah blah

Steps to reproduce the problem

  1. Install smartparens
  2. Configure with (require 'smartparens-config)
  3. Open a LaTeX file
  4. Activate smartparens: (smartparens-mode)
  5. Put cursor in a commented line (one that starts with %)
  6. Strike "

Backtraces if necessary (M-x toggle-debug-on-error)

Environment & version information

I first noticed this in spacemacs, but I reproduced this in Vanilla emacs with only smartparens installed (using straight installed commit 3ed34cb). This issue appears whether I use LaTeX-mode as provided by auctex, or just the latex-mode that ships with emacs.

  • smartparens version:
  • Active major-mode: latex-mode
  • Emacs version (M-x emacs-version): 29.1
  • Spacemacs/Evil/Other starterkit (specify which)/Vanilla: Vanilla
  • OS: MacOS 14.4.1

Commentary

I'm not sure what's going all batty, but I suspect this could be fixed by adding sp-in-comment-p here

@Fuco1 Fuco1 added the bug label Apr 5, 2024
@Fuco1
Copy link
Owner

Fuco1 commented Apr 5, 2024

I can reproduce this, will look into it. It must be some of the recent changes I did

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready
Development

No branches or pull requests

2 participants