emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Greg Minshall <minshall@umich.edu>
To: "Samuel Banya" <sbanya@fastmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Question Regarding Yasnippet With Org Mode (Emacs 27.2)
Date: Sun, 23 May 2021 19:33:33 +0300	[thread overview]
Message-ID: <3319247.1621787613@apollo2.minshall.org> (raw)
In-Reply-To: Your message of "Sun, 23 May 2021 04:51:05 +0000." <8fbaaf62-b827-4a88-bf7a-23aa1596e469@www.fastmail.com>

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	other threads:[~2021-05-23 16:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23  4:51 Question Regarding Yasnippet With Org Mode (Emacs 27.2) Samuel Banya
2021-05-23 16:33 ` Greg Minshall [this message]
2021-05-24  1:09   ` Samuel Banya
2021-05-24  3:03     ` Greg Minshall
2021-05-23 21:18 ` Sébastien Miquel
2021-05-24  1:04   ` Samuel Banya
2021-05-24  5:51     ` Sébastien Miquel
2021-05-29 21:12       ` Samuel Banya

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=3319247.1621787613@apollo2.minshall.org \
    --to=minshall@umich.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=sbanya@fastmail.com \
    /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).