org-extra-emphasis-alist markers return 'no such pair found'
qaptoR opened this issue · comments
I use a package that adds org-extra-emphasis-alist so that I have 16 more types of emphasis markup styles.
the new markers I use are !
, $
, ^
, %
, and &
.
When i type cs^
or ds^
it returns no such pair found
, where ^
can be any of the markers listed above.
But I can add them perfectly well with ysiw^
or visual selecting the word and then S^
I've also tried both methods from the readme to either add new rules to the alist, or using the macro method
this is the use of the macro:
(macro-name "caret" "^" "\\^" "\\^")
There is clearly some issue happening between the packages. But I can't understand how it could be, since evil-surround should theoretically be searching the physical text, and org-extra-emphasis doesn't change the physical text, it just provides a new face
@qaptoR I'm not sure I can replicate. If I add this to my config:
(setq-default evil-surround-pairs-alist
(push '(?^ . ("^" . "^")) evil-surround-pairs-alist))
Then I can do ds^
just fine.
Alternatively, if I add this to my config:
(add-hook 'org-mode-hook (lambda ()
(push '(?^ . ("^" . "^")) evil-surround-pairs-alist)))
Then it also works, but only in org mode.
Am I missing something?
Thank you for getting back about this. I will try your solution as soon as I get the chance and edit this comment with the result.
I think I assumed that I needed to escape the ^
because I thought evil-surround was using regex to pattern-match the symbols.
Ah, no, evil-surround takes plain string for the delims, and uses regexp-quote
under the hood to do the search. Let me know how you get on!