smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

Org-mode double quote does not create pair

Open liamh opened this issue 4 years ago • 2 comments

Expected behavior

Pressing the double quote key will insert a pair of double quotes and position the cursor between them in org-mode as it does in other buffers.

Actual behavior

Inserts one double quote " and positions the cursor after it as if by c-q ", and then emits an error message sp--post-self-insert-hook-handler: (wrong-type-argument char-or-string-p nil)

Steps to reproduce the problem

Open a buffer in org-mode and press the double-quote key.

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

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
  sp--escape-region(("\"") 240475 240476)
  sp-escape-open-delimiter()
  sp--post-self-insert-hook-handler()
  self-insert-command(1)
  org-self-insert-command(1)
  funcall-interactively(org-self-insert-command 1)
  call-interactively(org-self-insert-command nil nil)
  command-execute(org-self-insert-command)

Environment & version information

In recent enough smartparens you can call M-x sp-describe-system to generate this report. Please fill manually what we could not detect automatically. Edit the output as you see fit to protect your privacy.

  • smartparens version: 20200324.2147
  • Active major-mode: org-mode
  • Smartparens strict mode: nil
  • Emacs version (M-x emacs-version): GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-09-22, modified by Debian
  • Starterkit/Distribution: Vanilla
  • OS: gnu/linux

liamh avatar Apr 20 '20 16:04 liamh

I can't reproduce this. Can you provide a minimal reproducable example.

Are you loading the custom org configuration via (require 'smartparens-config)?

Fuco1 avatar Oct 07 '20 17:10 Fuco1

Unfortunately, I cannot. It seems to be the minimum org file size with this problem is 1.25MB; below that, it is consistently working.

I am not doing (require 'smartparens-config).

On Wed, Oct 7, 2020 at 1:47 PM Matus Goljer < [email protected]> wrote:

I can't reproduce this. Can you provide a minimal reproducable example.

Are you loading the custom org configuration via (require 'smartparens-config)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Fuco1/smartparens/issues/1026#issuecomment-705094189, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGMTA2ICACNR2GQOVM5CCDSJSSSJANCNFSM4MMSSDXQ .

liamh avatar Oct 09 '20 16:10 liamh

This is related to #868 and will be fixed by narrowing the search context.

Fuco1 avatar Apr 03 '24 15:04 Fuco1