[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] function for inserting a block
From: |
Bastien Guerry |
Subject: |
Re: [O] function for inserting a block |
Date: |
Wed, 08 Nov 2017 15:34:11 +0100 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/27.0 (gnu/linux) |
Hi Nicolas,
Nicolas Goaziou <address@hidden> writes:
> Bastien <address@hidden> writes:
>
>> is there a simple mechanism in Emacs core to restore the same
>> functionnality?
>
> Of course, it is called Abbrev mode: (info "(emacs)Abbrev
> Concepts").
Abbrev only expands on words constituents, so "<s" would not work.
> You may also use (info "(autotype)Using Skeletons") for more advanced
> uses.
I see. So combining the two, we would have something like this:
(define-skeleton org-skeleton-src-block
"" nil
>
"#+begin_src" \n
_ \n
"#+end_src")
(define-abbrev org-mode-abbrev-table "<s"
"" 'org-skeleton-src-block)
... modulo the restriction on "<s" mentioned above.
I need to think about this and Kaushal proposal to see if we can
come up with a simple and backward-compatible solution.
Already thanks for the pointers.
--
Bastien
- Re: [O] function for inserting a block, (continued)
- Re: [O] function for inserting a block, William Denton, 2017/11/08
- Re: [O] function for inserting a block, Rasmus, 2017/11/08
- Re: [O] function for inserting a block, Berry, Charles, 2017/11/08
- Re: [O] function for inserting a block, Nicolas Goaziou, 2017/11/08
- Re: [O] function for inserting a block, Thomas S. Dye, 2017/11/08
- Re: [O] function for inserting a block, Takaaki Ishikawa, 2017/11/08
- Re: [O] function for inserting a block, Eric Abrahamsen, 2017/11/08
- Re: [O] function for inserting a block, Nicolas Goaziou, 2017/11/08
- Re: [O] function for inserting a block, Thomas S. Dye, 2017/11/08