Fuco1 / smartparens

Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
GNU General Public License v3.0
1.81k stars 193 forks source link

sp-forward-slurp-sexp not working in org-mode #971

Open bymoz089 opened 5 years ago

bymoz089 commented 5 years ago

Description

sp-forward-slurp-sexp does not work properly within orb-mode on ephasize markup (like *foo*, ~foo~, =foo= and so on). sp-forward-slurp-sexp does not work properly within orb-mode on sp-local-pair defined pairs.

Steps to reproduce the problem

  1. start Emacs with emacs -Q
  2. initalize packagemanager
  3. run require code:
    (require 'smartparens)
    (require 'org)
    (require 'smartparens-org)
    (smartparens-global-mode)
  4. open an org-mode buffer
  5. within an org-mode buffer have following text (| denoting cursor position) ~|~foobar and call sp-forward-slurp-sexp

Expected behavior

text should change to: ~|foobar~

Actual behavior

nothing changes at all: ~|~foobar

Further Obersvations

Defining a local pair with: (sp-local-pair 'org-mode "#" "#" :insert "C-c C-x l" :trigger "#" :actions '(:add insert wrap autoskip navigate))

Then insert #|#foobar and doing (sp-forward-slurp-sexp) results in the same misbehavior.

While Slurping ordinary brackets works with org-mode.

Environment & version information

Fuco1 commented 3 months ago

See also #1008