emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question Regarding Yasnippet With Org Mode (Emacs 27.2)


From: Samuel Banya
Subject: Re: Question Regarding Yasnippet With Org Mode (Emacs 27.2)
Date: Mon, 24 May 2021 01:09:02 +0000
User-agent: Cyrus-JMAP/3.5.0-alpha0-448-gae190416c7-fm-20210505.004-gae190416

Hey there Greg,

Gotcha.

Just to confirm, you're saying I should add a "(require 'org-tempo)" in my Emacs config in that case?

Or are you saying that I should disable "org-modules" setting value by setting it to nil or '0' (zero)?

If that is the case, what would be the syntax to do this change?

Just wanted to ask since I'd be happy to make the changes my config to see if that would help, but needed to know what you meant for me to try out to fix the issue.

Thanks,

Sam

On Sun, May 23, 2021, at 4:33 PM, Greg Minshall wrote:
Samuel,

i think that by default, Org no longer listens to, e.g., =<s[TAB]=.
but, if you load =org-tempo=, it still does.  i wonder if you might see
if you are loading =org-tempo= (maybe [C-h v org-modules]), disable
that, and see if that clears away some of the underbrush.

(you can get something like the old behavior with =C-c C-,=.)

i use yasnippet to expand =<le[TAB]=.
----
# key: <le
# name: latex equation environment
# --
\begin{equation}
    $0
\end{equation}
----
and, that works for me.

if i re-format your snippet (maybe this was the original formatting?)
----
# name: src
# key: <s
# --
#+BEGIN_SRC $1
$0
#+END_SRC
----

and open an org file, =<s[TAB]=, it seems to work if i enter a language
name and then =[TAB]= to commit.  if i commit with =[RET]= instead, it
still *seems* to work (in terms of the buffer contents), but i get this
message
----
[yas] Committing snippets. Action would destroy a protection overlay.
----

i didn't run into any lisp errors.

in case any of that helps.

cheers, Greg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]