From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Nikishkin Subject: Re: Question mark not supported in structured templates? Date: Wed, 30 Oct 2019 10:23:18 +0800 Message-ID: References: <87a79k6jum.fsf@ucl.ac.uk> <2AD69AC5-E6EE-4327-AE2B-07E377668822@ucsd.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:57701) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPde2-0004Dy-Li for emacs-orgmode@gnu.org; Tue, 29 Oct 2019 22:23:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPde1-0006Lg-8g for emacs-orgmode@gnu.org; Tue, 29 Oct 2019 22:23:34 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:46604) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iPde1-0006Js-1m for emacs-orgmode@gnu.org; Tue, 29 Oct 2019 22:23:33 -0400 Received: by mail-ed1-x533.google.com with SMTP id z22so459112edr.13 for ; Tue, 29 Oct 2019 19:23:31 -0700 (PDT) In-Reply-To: <2AD69AC5-E6EE-4327-AE2B-07E377668822@ucsd.edu> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "Berry, Charles" Cc: "emacs-orgmode@gnu.org" 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) =D1=81=D1=80, 30 =D0=BE=D0=BA=D1=82. 2019 =D0=B3. =D0=B2 00:43, Berry, Char= les : > > `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 th= e 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" ) > " > (tempo-define-template "org-src-named-R" > '("#+name: " p n > "#+begin_src R" n > n "#+end_src" ) > " > (tempo-define-template "org-eqnarray" > '("\\begin{eqnarray} " '> n p > n "\\end{eqnarray}" >) > " > (tempo-define-template "org-equation" > '("\\begin{equation} " '> n p > n "\\end{equation}" >) > " > (tempo-define-template "org-displaymath" > '("# begin math" n > "\\[" p n > "\\]" n > "# end math" n) > " > #+end_src > > HTH, > > Chuck > > > > On Oct 29, 2019, at 1:59 AM, Vladimir Nikishkin w= rote: > > > > 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? > > --=20 Yours sincerely, Vladimir Nikishkin