[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] function for inserting a block
From: |
Eric Abrahamsen |
Subject: |
Re: [O] function for inserting a block |
Date: |
Wed, 08 Nov 2017 08:01:15 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) |
Bastien Guerry <address@hidden> writes:
> 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.
I'd be happy to add something to the manual, once we've got a clear way
of replicating the old system.
- 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
- Re: [O] function for inserting a block, Carsten Dominik, 2017/11/09