* problems with org-tempo @ 2018-12-13 22:36 Uwe Brauer 2018-12-14 1:55 ` Berry, Charles 0 siblings, 1 reply; 5+ messages in thread From: Uwe Brauer @ 2018-12-13 22:36 UTC (permalink / raw) To: emacs-orgmode; +Cc: Rasmus Pank Roulund Hi I hoped that org-tempo would be a substitute for the old beloved org template system. well 1. It expands <b + TAB. That is good. However 2. The syntax is not the same for example I want Key: b Keyword: bibliographystyle:plain bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib But <b Expands to #+bibliographystyle:plain bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib: Which is annoying. It should be bibliographystyle:plain bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib Any chance to get that behavior. I don't feel like learning a new tool for inserting template, since I am very acquainted with the old one. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: problems with org-tempo 2018-12-13 22:36 problems with org-tempo Uwe Brauer @ 2018-12-14 1:55 ` Berry, Charles 2018-12-14 8:01 ` Uwe Brauer 0 siblings, 1 reply; 5+ messages in thread From: Berry, Charles @ 2018-12-14 1:55 UTC (permalink / raw) To: Uwe Brauer; +Cc: Rasmus Pank Roulund, emacs-orgmode@gnu.org > On Dec 13, 2018, at 2:36 PM, Uwe Brauer <oub@mat.ucm.es> wrote: > > > Hi > > I hoped that org-tempo would be a substitute for the old beloved org > template system. well > > 1. It expands <b + TAB. That is good. However > > 2. The syntax is not the same for example I want > > Key: b > Keyword: > bibliographystyle:plain > bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib > > > But > <b > > Expands to > > #+bibliographystyle:plain > bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib: > > Which is annoying. It should be > > bibliographystyle:plain > bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib > > Any chance to get that behavior. I don't feel like learning a new tool > for inserting template, since I am very acquainted with the old one. > You need `(require 'org-tempo)', then #+begin_src emacs-lisp (tempo-define-template "org-display-bib" '("bibliographystyle:plain" n "bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib" p n) "<b" "Insert bib" 'org-tempo-tags) #+end_src should do it. HTH, Chuck ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: problems with org-tempo 2018-12-14 1:55 ` Berry, Charles @ 2018-12-14 8:01 ` Uwe Brauer 2018-12-14 8:08 ` [partially solved: cursor] (was: problems with org-tempo) Uwe Brauer 2018-12-14 8:08 ` problems with org-tempo Uwe Brauer 0 siblings, 2 replies; 5+ messages in thread From: Uwe Brauer @ 2018-12-14 8:01 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1249 bytes --] > You need `(require 'org-tempo)', then > #+begin_src emacs-lisp > (tempo-define-template "org-display-bib" > '("bibliographystyle:plain" n > "bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib" p n) > "<b" "Insert bib" 'org-tempo-tags) > #+end_src Thanks that works like charm. However I have some more templates of the form so I tried #+begin_src emacs-lisp (tempo-define-template "org-display-bib" '("bibliographystyle:plain" n "bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib" p n) "<b" "Insert bib" 'org-tempo-tags) (tempo-define-template "org-display-comentario" '("* Comentarios Hoja ?" n "| Documentación codigo | Explicación código | Ficheros matlab | Fichero MLX | Impresión |" p n "|----------------------+--------------------+-----------------+-------------+-----------|" p n "| | | | | |" p n) "<c" "Insert comentario" 'org-tempo-tags) #+end_src But the second template to be expanded with <c does not work. What do I miss? Thanks [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5025 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* [partially solved: cursor] (was: problems with org-tempo) 2018-12-14 8:01 ` Uwe Brauer @ 2018-12-14 8:08 ` Uwe Brauer 2018-12-14 8:08 ` problems with org-tempo Uwe Brauer 1 sibling, 0 replies; 5+ messages in thread From: Uwe Brauer @ 2018-12-14 8:08 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: smime.p7m --] [-- Type: application/pkcs7-mime, Size: 9159 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: problems with org-tempo 2018-12-14 8:01 ` Uwe Brauer 2018-12-14 8:08 ` [partially solved: cursor] (was: problems with org-tempo) Uwe Brauer @ 2018-12-14 8:08 ` Uwe Brauer 1 sibling, 0 replies; 5+ messages in thread From: Uwe Brauer @ 2018-12-14 8:08 UTC (permalink / raw) To: emacs-orgmode >>> "Uwe" == Uwe Brauer <oub@mat.ucm.es> writes: >> You need `(require 'org-tempo)', then >> #+begin_src emacs-lisp >> (tempo-define-template "org-display-bib" >> '("bibliographystyle:plain" n >> "bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib" p n) >> "<b" "Insert bib" 'org-tempo-tags) >> #+end_src > Thanks that works like charm. However I have some more templates of > the form so I tried > #+begin_src emacs-lisp > (tempo-define-template "org-display-bib" > '("bibliographystyle:plain" n > "bibliography:/home/oub/texmf/bibtex/bib/bibgraf.bib" p n) > "<b" "Insert bib" 'org-tempo-tags) > (tempo-define-template "org-display-comentario" > '("* Comentarios Hoja ?" n > "| Documentación codigo | Explicación código | Ficheros matlab | Fichero MLX | Impresión |" p n > "|----------------------+--------------------+-----------------+-------------+-----------|" p n > "| | | | | |" p n) > "<c" "Insert comentario" 'org-tempo-tags) > #+end_src After restarting emacs, the second template also works, so this is settled. Sorry for not having tested it before. An additional question though: it is possible to have the cursor at a specific position, as in the old org template system (using ?) Thanks Uwe Brauer ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-12-14 8:17 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-12-13 22:36 problems with org-tempo Uwe Brauer 2018-12-14 1:55 ` Berry, Charles 2018-12-14 8:01 ` Uwe Brauer 2018-12-14 8:08 ` [partially solved: cursor] (was: problems with org-tempo) Uwe Brauer 2018-12-14 8:08 ` problems with org-tempo Uwe Brauer
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).