emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Question mark not supported in structured templates?


From: Vladimir Nikishkin
Subject: Re: Question mark not supported in structured templates?
Date: Wed, 30 Oct 2019 10:23:18 +0800

What is the canonical difference between org-insert-structure-template
and org-tempo then?

I think, emacs skeleton libraries (M-x info-display-manual RET
autotype RET) support placing the point (with a "_" marker)

ср, 30 окт. 2019 г. в 00:43, Berry, Charles <address@hidden>:
>
> `org-tempo' is the replacement. It is mentioned in the docstring for 
> `org-structure-template-alist'.
>
> Here is what I have in my `emacs-init.org' file:
>
> (The letter `p' denotes where point should land. `n' is a newline. See the 
> docstring for `tempo-define-template' for more details.)
>
>
> #+begin_src emacs-lisp
>
>   (require 'org-tempo)
>
>
>   (tempo-define-template "org-src_R"
>                          '("#+begin_src R" p  n
>                            n "#+end_src" )
>                          "<R" "Insert R block" 'org-tempo-tags)
>
>   (tempo-define-template "org-src-named-R"
>                          '("#+name: " p  n
>                            "#+begin_src R"   n
>                           n "#+end_src" )
>                          "<r" "Insert Named R block" 'org-tempo-tags)
>
>   (tempo-define-template "org-eqnarray"
>                          '("\\begin{eqnarray} " '> n p
>                           n "\\end{eqnarray}" >)
>                          "<Y" "Insert LaTeX eqnarray" 'org-tempo-tags)
>
>   (tempo-define-template "org-equation"
>                          '("\\begin{equation} " '> n p
>                           n "\\end{equation}" >)
>                          "<Q" "Insert LaTeX equation" 'org-tempo-tags)
>
>   (tempo-define-template "org-displaymath"
>                          '("# begin math" n
>                            "\\["  p n
>                            "\\]" n
>                            "# end math" n)
>                          "<m" "Insert \\[ \\]" 'org-tempo-tags)
>
> #+end_src
>
> HTH,
>
> Chuck
>
>
> > On Oct 29, 2019, at 1:59 AM, Vladimir Nikishkin <address@hidden> wrote:
> >
> > In the version 8 of org-mode you could indicate where to put the point
> > after the template is expanded. In the template
> > (list "p" "#begin_src plantuml :file ? :export both \n#end_src"),
> > after the template is expanded, the point would be located after
> > :file, whereas in the template (list "SO" "#begin_src scheme :export
> > both \n?\n#end_src") the point would be located on the frist line
> > after the header.
> >
> > At the moment, `org-insert-structure-template' just inserts the
> > question mark verbatim. I would consider this a regression, but maybe
> > there is some replacement mechanism?
>
>


-- 
Yours sincerely, Vladimir Nikishkin



reply via email to

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