From: "numbchild@gmail.com" <numbchild@gmail.com>
To: Rasmus <rasmus@gmx.us>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [patch] structure snippet completions
Date: Sat, 9 Dec 2017 21:42:46 +0800 [thread overview]
Message-ID: <CAL1eYu+pMZ4Ai-m6rqR7RR82T_UCJoAoBT_tJe3aiYocvtGPpA@mail.gmail.com> (raw)
In-Reply-To: <87wp1w3oi7.fsf@gmx.us>
[-- Attachment #1: Type: text/plain, Size: 3541 bytes --]
error report when I `(require 'org-tempo)`
Debugger entered--Lisp error: (error "Format specifier doesn’t match
argument type")
format("<%c" "Q")
(closure (t) (pair) (format "<%c" (car pair)))(("Q" "#+BEGIN_SRC sql-mode
?\n\n#+END_SRC" "#+BEGIN_SRC sql-mode ?\n\n#+END_SRC"))
mapcar((closure (t) (pair) (format "<%c" (car pair))) (("Q" "#+BEGIN_SRC
sql-mode ?\n\n#+END_SRC" "#+BEGIN_SRC sql-mode ?\n\n#+END_SRC") ("n"
"#+BEGIN_NOTES\n?\n#+END_NOTES") (116 . "translate") (97 . "export ascii")
(99 . "center") (67 . "comment") (101 . "example") (69 . "export") (104 .
"export html") (108 . "export latex") (113 . "quote") (115 . "src") (118 .
"verse") (76 . "latex") (72 . "html") (65 . "ascii") (105 . "index")))
(let ((keys (mapcar (function (lambda (pair) (format "<%c" (car pair))))
(append org-structure-template-alist org-tempo-keywords-alist)))) (if (>
(length keys) (length (delete-dups keys))) (progn (warn "Duplicated keys in
`org-structure-template-alist' and `org-tempo-keywords-alist'"))) (mapc
(function (lambda (key) (if (assoc-string key org-tempo-tags) (setq
org-tempo-tags (delete (assoc-string key org-tempo-tags)
org-tempo-tags))))) keys) (mapc (function org-tempo-add-block)
org-structure-template-alist) (mapc (function org-tempo-add-keyword)
org-tempo-keywords-alist))
org-tempo-add-templates()
org-tempo-setup()
(progn (org-tempo-setup))
(if (eq major-mode 'org-mode) (progn (org-tempo-setup)))
eval-buffer(#<buffer *load*> nil
"/home/stardiviner/Code/Emacs/org-mode/lisp/org-tempo.el" nil t) ; Reading
at buffer position 5019
load-with-code-conversion(#1="/home/stardiviner/Code/Emacs/org-mode/lisp/org-tempo.el"
#1# nil t)
require(org-tempo)
[stardiviner] <Hack this world!> GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter: @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/
On Sat, Dec 9, 2017 at 5:20 AM, Rasmus <rasmus@gmx.us> wrote:
> "Berry, Charles" <ccberry@ucsd.edu> writes:
>
> >> On Dec 7, 2017, at 3:37 PM, Rasmus <rasmus@gmx.us> wrote:
> >>
> >> I have also pushed the code. "<s"-like snippet expansion should be
> >> enabled by requiring org-tempo.
> >>
> >
> > Thanks. I was in a deep funk without "<s" and friends. Feeling better
> now.
>
> I am happy that I am able to help you for once!
>
> >> Let me know about any issues.
> >>
> >
> > Maybe make `tempo-match-finder' be "^ *\\(<[[:word:]]+\\)" so it will
> > match things like "<la" when I want a latex align environment. Or let
> > the user customize it.
>
> At the moment snippets with more than one character isn’t supported. Note
> that the car of org-structure-template-alist elements is now a character.
> "Snippet-strings" (like "la") will be re-added soon cf. the email from
> Eric earlier on in this thread.
>
>
> > A minor gotcha: if you `(require 'org-tempo)' after an org buffer has
> > been created you will need to (org-mode-restart) the buffer to enable
> > completions. I got stuck trying to add custom templates until I
> > realized this.
>
> It shouldn’t do that since this is near the bottom of org-tempo:
>
> (when (eq major-mode 'org-mode) (org-tempo-setup))
>
> On my system it works in the first buffer where I require org-tempo, even
> without reloading.
>
> Which version of Emacs are you using?
>
> Rasmus
>
> --
> A clever person solves a problem. A wise person avoids it
>
>
>
[-- Attachment #2: Type: text/html, Size: 5177 bytes --]
next prev parent reply other threads:[~2017-12-09 13:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 16:22 [patch] structure snippet completions Rasmus
2017-12-04 20:55 ` Nicolas Goaziou
2017-12-05 10:22 ` Rasmus
2017-12-05 20:29 ` Nicolas Goaziou
2017-12-07 23:37 ` Rasmus
2017-12-07 23:49 ` Rasmus
2017-12-08 2:38 ` Kaushal Modi
2017-12-08 20:16 ` Rasmus
2017-12-08 21:07 ` Berry, Charles
2017-12-08 21:20 ` Rasmus
2017-12-09 13:42 ` numbchild [this message]
2017-12-09 16:22 ` Rasmus
2017-12-09 17:23 ` Berry, Charles
2017-12-10 11:09 ` Rasmus
2017-12-04 21:37 ` Eric Abrahamsen
2017-12-05 10:24 ` Rasmus
2017-12-05 19:14 ` Eric Abrahamsen
-- strict thread matches above, loose matches on Subject: below --
2017-12-04 16:20 Rasmus
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAL1eYu+pMZ4Ai-m6rqR7RR82T_UCJoAoBT_tJe3aiYocvtGPpA@mail.gmail.com \
--to=numbchild@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=rasmus@gmx.us \
/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 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).