From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: electric-pair, autopair, smartparens, etc in org-mode Date: Tue, 23 Oct 2018 19:48:33 +0800 Message-ID: <878t2oubn2.fsf@gmail.com> References: <877eib21z0.fsf@nicolasgoaziou.fr> <87zhv5nlgv.fsf@gmail.com> Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEvJB-0002TO-5L for emacs-orgmode@gnu.org; Tue, 23 Oct 2018 07:57:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEvJ6-0000CE-Lf for emacs-orgmode@gnu.org; Tue, 23 Oct 2018 07:57:13 -0400 Received: from [61.175.244.13] (port=43388 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEvJ6-0000B5-6a for emacs-orgmode@gnu.org; Tue, 23 Oct 2018 07:57:08 -0400 In-reply-to: <87zhv5nlgv.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Roland Everaert Cc: Org Mode Roland Everaert writes: > Hi, > > I use the following configuration: > > ;;;;;;;;;;;;;;;; parenth=C3=A8ses, accolades et brackets ;;;;;; > (setq skeleton-pair t) > (global-set-key "[" 'skeleton-pair-insert-maybe) > (global-set-key "{" 'skeleton-pair-insert-maybe) > (global-set-key "(" 'skeleton-pair-insert-maybe) > (global-set-key "\"" 'skeleton-pair-insert-maybe) > (global-set-key "'" 'skeleton-pair-insert-maybe) > > This will only close the defined characters. > > > Hope this will help. > > Roland. > This is really helpful for me, I use smartparens before, but it is a little= heavy. So I disabled it. I found your solution is simple and fast. I modif= ied a little: #+begin_src emacs-lisp (require 'skeleton) (setq skeleton-pair t) (define-key org-mode-map (kbd "~") 'skeleton-pair-insert-maybe) (define-key org-mode-map (kbd "=3D") 'skeleton-pair-insert-maybe) (define-key org-mode-map (kbd "*") 'skeleton-pair-insert-maybe) (define-key org-mode-map (kbd "+") 'skeleton-pair-insert-maybe) (define-key org-mode-map (kbd "[") 'skeleton-pair-insert-maybe) (define-key org-mode-map (kbd "{") 'skeleton-pair-insert-maybe) (define-key org-mode-map (kbd "(") 'skeleton-pair-insert-maybe) (define-key org-mode-map (kbd "\"") 'skeleton-pair-insert-maybe) (define-key org-mode-map (kbd "'") 'skeleton-pair-insert-maybe) #+end_src --=20 [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 =20=20=20=20=20=20