emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Easy templates broken with 9.2
@ 2019-01-27  5:17 Lawrence Bottorff
  0 siblings, 0 replies; 4+ messages in thread
From: Lawrence Bottorff @ 2019-01-27  5:17 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]

It seems my easy templates completion is being ignored. I'm  9.2
(9.2-41-g010a35-elpa ...). I've found a reference or two online but the
fix,  i.e., running (require 'org-tempo) only produced error messages. The
"documentation" doesn't really say exactly what the new format is. Here's a
sample of what my old org-structure-template-alist had:

...
("o" "#+name:\n#+begin_src ocaml :exports both :tangle yes :cache yes
:results silent\n?\n#+end_src")
("G" "#+name:\n#+begin_src gnuplot :exports both :file \n?\n#+end_src")
("r" "\\rightarrow")
...

What do I need to change about my old easy templates to work with 9.2? I
understand "<letter(s) TAB" no longer works, rather, C-c C-, should bring
up a menu.

LB

[-- Attachment #2: Type: text/html, Size: 1109 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Easy templates broken with 9.2
@ 2019-01-27 17:17 Thomas S. Dye
  2019-01-27 17:47 ` Berry, Charles
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas S. Dye @ 2019-01-27 17:17 UTC (permalink / raw)
  To: borgauf; +Cc: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 592 bytes --]

Aloha LB,

I'm working my way through this change, too, hunting down all the 
places I've modified org-structure-template-alist.  You'll need to get 
rid of the templates you've added to this list.  The new function won't 
run if it finds an old-style template on the list.

Once the list is clean, the new function offers the possibility of 
selecting some text, then hitting C-c C-, and choosing a structure that 
encloses the selected text.  This is quite handy.

I had a number of one-line templates that I haven't figured out how to 
replace yet.  Any suggestions are welcome.

hth,
Tom

[-- Attachment #2: Type: text/html, Size: 755 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Easy templates broken with 9.2
  2019-01-27 17:17 Thomas S. Dye
@ 2019-01-27 17:47 ` Berry, Charles
  0 siblings, 0 replies; 4+ messages in thread
From: Berry, Charles @ 2019-01-27 17:47 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-org list, Lawrence Bottorff



> On Jan 27, 2019, at 9:17 AM, Thomas S. Dye <tsdye.com@gmail.com> wrote:
> 
> Aloha LB,
> 
> I'm working my way through this change, too, hunting down all the places I've modified org-structure-template-alist.  You'll need to get rid of the templates you've added to this list.  The new function won't run if it finds an old-style template on the list. 
> 
> Once the list is clean, the new function offers the possibility of selecting some text, then hitting C-c C-, and choosing a structure that encloses the selected text.  This is quite handy.
> 
> I had a number of one-line templates that I haven't figured out how to replace yet.  Any suggestions are welcome.
> 


I like the ability to wrap a region using `C-c C-,' but my fingers still want `<R' to initiate an R src block.  And likewise for a few other similar keypresses.  

So I have this in my init:

#+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


See the docstring for `tempo-define-template' for more details.

I use the default `org-structure-template-alist'.

HTH,

Chuck

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Easy templates broken with 9.2
@ 2019-01-28  3:31 Thomas S. Dye
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas S. Dye @ 2019-01-28  3:31 UTC (permalink / raw)
  To: ccberry; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 59 bytes --]

Aloha Chuck,

That is helpful.  Thanks.

All the best,
Tom

[-- Attachment #2: Type: text/html, Size: 159 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-28  3:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-28  3:31 Easy templates broken with 9.2 Thomas S. Dye
  -- strict thread matches above, loose matches on Subject: below --
2019-01-27 17:17 Thomas S. Dye
2019-01-27 17:47 ` Berry, Charles
2019-01-27  5:17 Lawrence Bottorff

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).