From: "Samuel Banya" <sbanya@fastmail.com>
To: emacs-orgmode@gnu.org
Subject: Question Regarding Yasnippet With Org Mode (Emacs 27.2)
Date: Sun, 23 May 2021 04:51:05 +0000 [thread overview]
Message-ID: <8fbaaf62-b827-4a88-bf7a-23aa1596e469@www.fastmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4081 bytes --]
I haven't been able to utilize the Yasnippet I've been using to override the newer one that Org-Mode created aka '<s' + TAB expansion, which does source blocks in lowercase, which I despise.
I placed my override Yasnippet template in '~/.emacs.d/snippets/org-mode/src'
Mine used to be just fine until I upgraded to Emacs 27.2.
*
*
*Here is the affected Yasnippet that I have placed in '~/.emacs.d/snippets/org-mode/src' whose aim is to just override the default non-Caps version of the same idea:*
# -*- mode: snippet -*- # name: src # key: <s # -- #+BEGIN_SRC $1 $0 #+END_SRC
Here is what I get when I attempt to do "<s TAB" in an Org Mode doc buffer within the modeline:
No such language mode: nil-mode
*What's weird about this is that another similar snippet I did for bash works just fine in comparison, though obviously the user doesn't have to specify the language being used so maybe that's why, this is present in '~/.emacs.d/snippets/org-mode/bashsrc':*
# -*- mode: snippet -*- # name: bashsrc # key: <b # -- #+BEGIN_SRC bash $0 #+END_SRC
Has anyone else ran into this issue?
I'm guessing its some kind of Org Mode vs Yasnippet issue where Org-mode is expanding it too fast, when it should wait for user input hence the "$1" section.
*
*
*Here's the traceback:*
Debugger entered--Lisp error: (error "No such language mode: nil-mode")
signal(error ("No such language mode: nil-mode"))
error("No such language mode: %s" nil-mode)
org-edit-src-code()
org-babel-do-key-sequence-in-edit-buffer("\11")
org-indent-line()
indent-according-to-mode()
yas--indent-region(115547 115559 #s(yas--snippet :expand-env nil :fields (#s(yas--field :number 1 :start #<marker at 115546 in life.org> :end #<marker at 115546 in life.org> :parent-field nil :mirrors nil :transform nil :modified-p nil :next #s(yas--exit :marker #<marker at 115549 in life.org> :next nil))) :exit #s(yas--exit :marker #<marker at 115549 in life.org> :next nil) :id 3 :control-overlay nil :active-field nil :previous-active-field nil :force-exit nil))
yas--indent(#s(yas--snippet :expand-env nil :fields (#s(yas--field :number 1 :start #<marker at 115546 in life.org> :end #<marker at 115546 in life.org> :parent-field nil :mirrors nil :transform nil :modified-p nil :next #s(yas--exit :marker #<marker at 115549 in life.org> :next nil))) :exit #s(yas--exit :marker #<marker at 115549 in life.org> :next nil) :id 3 :control-overlay nil :active-field nil :previous-active-field nil :force-exit nil))
#f(compiled-function () #<bytecode 0xf63605>)()
funcall(#f(compiled-function () #<bytecode 0xf63605>))
(let nil (funcall '#f(compiled-function () #<bytecode 0xf63605>)))
eval((let nil (funcall '#f(compiled-function () #<bytecode 0xf63605>))))
yas--snippet-create("#+BEGIN_SRC $1\n $0\n#+END_SRC" nil 115534 115534)
yas-expand-snippet(#s(yas--template :key "<s" :content "#+BEGIN_SRC $1\n $0\n#+END_SRC" :name "src" :condition nil :expand-env nil :load-file "/home/sam/.emacs.d/snippets/org-mode/src" :save-file nil :keybinding nil :uuid "src" :menu-binding-pair ((menu-item "src" (lambda nil (interactive) (yas--expand-or-visit-from-menu 'org-mode "src")) :keys "<s =>")) :group nil :perm-group nil :table #s(yas--table :name "org-mode" :hash #<hash-table equal 2/65 0x17ba06d> :uuidhash #<hash-table equal 2/65 0x138c6e1> :parents nil :direct-keymap (keymap))) 115534 115536)
yas--expand-or-prompt-for-template((("src" . #s(yas--template :key "<s" :content "#+BEGIN_SRC $1\n $0\n#+END_SRC" :name "src" :condition nil :expand-env nil :load-file "/home/sam/.emacs.d/snippets/org-mode/src" :save-file nil :keybinding nil :uuid "src" :menu-binding-pair ((menu-item "src" (lambda nil (interactive) (yas--expand-or-visit-from-menu ... "src")) :keys "<s =>")) :group nil :perm-group nil :table #s(yas--table :name "org-mode" :hash #<hash-table equal 2/65 0x17ba06d> :uuidhash #<hash-table equal 2/65 0x138c6e1> :parents nil :direct-keymap (keymap))))) 115534 115536)
yas-expand()
funcall-interactively(yas-expand)
call-interactively(yas-expand nil nil)
command-execute(yas-expand)
Thanks.
[-- Attachment #2: Type: text/html, Size: 5297 bytes --]
next reply other threads:[~2021-05-23 15:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-23 4:51 Samuel Banya [this message]
2021-05-23 16:33 ` Question Regarding Yasnippet With Org Mode (Emacs 27.2) Greg Minshall
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=8fbaaf62-b827-4a88-bf7a-23aa1596e469@www.fastmail.com \
--to=sbanya@fastmail.com \
--cc=emacs-orgmode@gnu.org \
/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).