From: "Berry, Charles" <ccberry@ucsd.edu>
To: Rasmus <rasmus@gmx.us>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [patch] structure snippet completions
Date: Sat, 9 Dec 2017 17:23:17 +0000 [thread overview]
Message-ID: <B169B0B1-DEB4-4B12-A2D3-34FCD3D76212@ucsd.edu> (raw)
In-Reply-To: <87wp1w3oi7.fsf@gmx.us>
> On Dec 8, 2017, at 1:20 PM, Rasmus <rasmus@gmx.us> wrote:
>
>>
>> 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.
Yes. It does that for me, too. But this only affects the buffer from which I `(require 'org-tempo)'.
If there are already org buffers already open, I have to eval (org-tempo-setup) or (org-mode-restart) each one to enable to enable org-tempo in them. Of course, buffers opened later run the org-mode-hooks, so that isn't a problem.
This isn't likely to affect many users, but if someone tries to debug by starting `emacs -Q', opening an org buffer, and then requiring org-tempo from another buffer, s/he could get stuck.
My init file creates a buffer called org-scratch.org in which I doodle and try things out. I was stuck with org-tempo till I moved it below the (require 'org-tempo).
So maybe add a comment that will warn that (require 'org-tempo) only affects the buffer from which it is run and buffers subsequently opened or restarted.
>
> Which version of Emacs are you using?
25.2.1
Chuck
next prev parent reply other threads:[~2017-12-09 17:23 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
2017-12-09 16:22 ` Rasmus
2017-12-09 17:23 ` Berry, Charles [this message]
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=B169B0B1-DEB4-4B12-A2D3-34FCD3D76212@ucsd.edu \
--to=ccberry@ucsd.edu \
--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).