[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: |
Fri, 20 Oct 2017 14:13:02 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) |
Kaushal Modi <address@hidden> writes:
> On Fri, Oct 20, 2017 at 2:07 PM Eric Abrahamsen <address@hidden> wrote:
>
> Okay, here's another version, with a new keybinding and completion. The
> completion strings are uppercase, which might not always be the right
> thing, but probably more often than not.
>
> Hi Eric,
>
> I just tried it out, and it works great!
>
> I have a comment about
>
> (when (string-equal (downcase type) "example")
> (org-escape-code-in-region s e))
>
> I have never needed to escape org in example, blocks, but I *have* needed to
> do that in org src blocks.
>
> Should type string be also matched with "src org"?
>
> Actually should the type string be matched only with "src org"? Because I see
> the Org example blocks as <pre> <code> blocks in HTML with no syntax
> highlighting.. so
> those can contain code from any language.
>
> Also as this is part of org and emacs, org-structure-predefined-blocks
> deserves "SRC org" and "SRC emacs-lisp" too? :)
The template really only inserts the block type, not anything specific
like the source language or export backend. I think prompting for
"second-level" information like that might be a little overkill.
As for what should be escaped and what shouldn't, I defer to Nicolas,
let's see what he says.
Eric
- Re: [O] function for inserting a block, (continued)
- Re: [O] function for inserting a block, Nicolas Goaziou, 2017/10/17
- Re: [O] function for inserting a block, Eric Abrahamsen, 2017/10/17
- Re: [O] function for inserting a block, Eric Abrahamsen, 2017/10/17
- Re: [O] function for inserting a block, Carsten Dominik, 2017/10/18
- Re: [O] function for inserting a block, Eric Abrahamsen, 2017/10/18
- Re: [O] function for inserting a block, Carsten Dominik, 2017/10/19
- Re: [O] function for inserting a block, Eric Abrahamsen, 2017/10/20
- Re: [O] function for inserting a block, Kaushal Modi, 2017/10/20
- Re: [O] function for inserting a block, Kaushal Modi, 2017/10/20
- Re: [O] function for inserting a block, Eric Abrahamsen, 2017/10/20
- Re: [O] function for inserting a block,
Eric Abrahamsen <=
- Re: [O] function for inserting a block, Kaushal Modi, 2017/10/20
- Re: [O] function for inserting a block, Xebar Saram, 2017/10/21
- Re: [O] function for inserting a block, Marco Wahl, 2017/10/21
- Re: [O] function for inserting a block, Xebar Saram, 2017/10/21
- Re: [O] function for inserting a block, Eric Abrahamsen, 2017/10/21
- Re: [O] function for inserting a block, Kaushal Modi, 2017/10/23
- Re: [O] function for inserting a block, Carsten Dominik, 2017/10/23
- Re: [O] function for inserting a block, Kaushal Modi, 2017/10/23
- Re: [O] function for inserting a block, Eric Abrahamsen, 2017/10/23
- Re: [O] function for inserting a block, Nicolas Goaziou, 2017/10/23