From: Vladimir Nikishkin <lockywolf@gmail.com>
To: "Berry, Charles" <ccberry@ucsd.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Question mark not supported in structured templates?
Date: Wed, 30 Oct 2019 10:23:18 +0800 [thread overview]
Message-ID: <CA+A2iZaAGZdTpeBvh70Una404=tROcVYT6kcimGxLMJQbwbQnw@mail.gmail.com> (raw)
In-Reply-To: <2AD69AC5-E6EE-4327-AE2B-07E377668822@ucsd.edu>
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 <ccberry@ucsd.edu>:
>
> `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 <lockywolf@gmail.com> 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
prev parent reply other threads:[~2019-10-30 2:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 7:57 Question mark not supported in structured templates? Vladimir Nikishkin
2019-10-29 8:23 ` Fraga, Eric
2019-10-29 8:59 ` Vladimir Nikishkin
2019-10-29 16:42 ` Berry, Charles
2019-10-30 2:23 ` Vladimir Nikishkin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+A2iZaAGZdTpeBvh70Una404=tROcVYT6kcimGxLMJQbwbQnw@mail.gmail.com' \
--to=lockywolf@gmail.com \
--cc=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.