emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] electric-pair, autopair, smartparens, etc in org-mode


From: Nicolas Goaziou
Subject: Re: [O] electric-pair, autopair, smartparens, etc in org-mode
Date: Sun, 21 Oct 2018 09:28:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello,

Matt Price <address@hidden> writes:

> - electric-pair and autopair complete [[ immediately, and don't seem to
> allow me to skip past the closing brackets, so if I try to type [[
> https://link.to.somewhere][link text]] I end up with
> [[link.to.somewhere]][link-text] .

I use C-c C-l to insert links with description. However, electric
pairing does get in the way when writing sub/superscript. I use the
following snippet to work around the issue:

   (add-function :before-until electric-pair-inhibit-predicate
                 (lambda (c)
                   (and (eq ?\{ c)
                        (eq major-mode 'org-mode)
                        (memq (char-before (1- (point))) '(?_ ?^)))))

I guess you could do something similar to disable pairing when entering
a bracket link.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]