All Questions
29 questions
0
votes
0
answers
38
views
Wrong type argument: symbolp, 'yas-minor-mode
Whenever I type, Emacs gives me the warning 'wrong type argument: symbolp, 'yas-minor-mode'.
0
votes
0
answers
57
views
'fr<Tab>' doesn't expand at all
I'm trying to take lecture notes using org-mode and cdlatex-mode. The problem I meet is when I try to use Tab to expand fr it doesn't expand correctly.
\(fr<Tab>\) will become \(\begin{frame}[]\...
0
votes
1
answer
56
views
Use contents of a heading in Yasnippet
Is it possible to define a yasnippet that will pick up contents of a heading?
Say, I have something like this:
* Heading 1
:PROPERTIES:
:CUSTOM_ID: MyHead
:END:
Text under Heading 1
I will like to ...
0
votes
0
answers
14
views
Error yas--advance-end-maybe-previous-fields with autoactivating yasnippets in latex environments in org mode
I get the error yas--advance-end-maybe-previous-fields: Assertion failed: (memq field (yas--snippet-fields snippet)) in org mode when I use snippets that:
do not contain $1 in the snippet
use auto ...
0
votes
2
answers
134
views
Does enabling by default a custom input method have any side effect on the default method?
I added these to my init.el:
(use-package org
:ensure nil
:hook (org-mode . (lambda ()
(org-indent-mode)
(variable-pitch-mode -1)
(...
1
vote
0
answers
164
views
Insert single date stamp with Yasnippet and date prompt or org-read-date
For kontext:
The emacs package "Yasnippet" let's you replace a keyword (like "/newagenda") with a predefined text. It lets you also modify some variable fields quickly after the ...
0
votes
0
answers
342
views
Conflict with TAB keybinding for Yasnippet and Orgmode heading
I tried to use Yasnippet to create a template for org-drill "flashcard"
# -*- mode: snippet -*-
# name: Orgdrill twosided card
# key: drill2
# --
* ${1:Write title here} ...
1
vote
1
answer
832
views
Make :tangle don't add a newline at the end of the file
The context
I'm storing all my custom defined yasnippet snippets in an Org file (see below)
$ cat ~/.emacs.d/snippets/snippets.org
#+PROPERTY: header-args:yasnippet :mkdirp yes
#+begin_src yasnippet :...
0
votes
0
answers
73
views
How to resolve keybinding conflict, or set precedence of the bindings to the same keys for different functions?
How do I resolve keybinding conflict? Or if it's possible to have precedence of keybindings for the same key for different functions?
I have the following snippet definition, in org-mode:
#+name:${2:...
3
votes
1
answer
88
views
Font-lock Yasnippet template from within Org-Babel block
I want to manage my library of snippets from a single org-mode document and tangle these to their respective snippet files, as needed. Now functionally, this works out-of-the box, with the one ...
1
vote
0
answers
114
views
using org table as yasnippet input
I'm using yasnippets to create code blocks in org mode to document and execute DevOps activities. To improve productivity, it would be nice to have a possibility to create org tables with rows of ...
0
votes
2
answers
193
views
Is it possible to repeat the last org-mode source block's headers
Lately I have been writing a lot of literate sysadmining, writing down my thoughts as I explore systems by executing commands on them. This means that I end up writing the following boilerplate over ...
1
vote
1
answer
536
views
Using auto-insert and yasnippet to insert variables into template
I've been reading this and this, trying to figure out how to have an org-mode in-buffer settings template such as this:
# # -*- mode: org -*-
# # -*- coding: utf-8 -*-
#+TITLE: $1
#+AUTHOR: `(user-...
0
votes
1
answer
117
views
yasnippet color
I use yasnippet in orgmode to expand codeblocks of Python and start typing code.
My snippet is defined as:
# -*- mode: snippet -*-
# name: emacs-jupyter code block for python (silent)
# key: <spp
#...
0
votes
2
answers
287
views
Problem with org-insert-link and yas-expand
I have a problem when I want to yas-expand a link in Org-mode and it has a dash (-) in the text (url and description). Then the snippet break and exits. If I do the same in fundamental-mode it works.
...
1
vote
1
answer
220
views
Setting An Org Heading Property From Yasnippet
I have a yasnippet snippet for adding the boilerplate to my "daily review" org document. Here's what it looks like:
# key: ndr
# name: newdailyreview
# --
* Accomplishments
:PROPERTIES:
:CUSTOM_ID:...
2
votes
0
answers
317
views
Aligning (ditaa) rectangles with variable string width in yasnippet
To quickly add simple diagrams to notes, I've created yasnippets for ditaa boxes. The text inside each box is a $x - and therefore has a length I do not know at snippet design time. As a consequence, ...
4
votes
2
answers
2k
views
Yasnippets: loading two major modes (`org-mode` and `LaTeX`)
I'm trying to load the yasnippets for the LaTeX mode every time I open an org file.
Is it possible? How can this be achieved?
3
votes
0
answers
95
views
Preferring org-cycle to yas-expand when hitting tab
If both org-mode and yasnippet are active, tab will expand a snippet if possible and otherwise execute org-cycle. Is it possible to reverse this priority?
org mode version: 9.0.9.
yasnippet version: ...
2
votes
1
answer
449
views
Org subtree from yasnippet
Can yasnippet be used to insert an org subtree of the same level as the last? For example, if one often writes
***** $1
#+BEGIN_SRC latex
\paragraph{$1.}
$0
#+END_SRC
how might one avoid ...
1
vote
0
answers
63
views
Conflict between org and yas: \Cc &
In org mode, \Cc & goes back to the reference to a link; but this binding is suppressed by yasnippet. Do I have to redefine it, or can I prevent yasnippet from creating these bindings in the ...
4
votes
1
answer
1k
views
yasnippets and org-mode: yas-next-field-or-maybe-expand does not expand
In org mode, the TAB key maps to yas-next-field-or-maybe-expand. But it is not working.
But if I run yas-expand (by hand) it works as expected.
TAB does expand in other modes.
Any ideas what might ...
13
votes
3
answers
2k
views
Is it possible to make yasnippets to expand snippets inside an org-mode babel section in the appropriate mode?
For example I have an org mode that has the following
#+BEGIN_SRC emacs-lisp
#+END_SRC
Is it possible to configure yasnippets in such a way so all emacs-lisp-mode snippets can be expanded inside ...
4
votes
1
answer
1k
views
yasnippet truncates clipboard contents
I have a yasnippet that is intended to create a footnote in org-mode format and automatically insert the contents of the clipboard.
# -*- mode: snippet -*-
# name: footnote
# key: fn
# --
[fn:: `(...
1
vote
1
answer
298
views
yasnippet won't replace default values (placeholders) in org-table caption
I'm using yasnippet to create a template for org-mode tables. This works fine, and allows me to create default values (placeholders) for the column headers. The default values are highlighted by ...
4
votes
1
answer
1k
views
in yasnippet, how to insert variable date with fixed time of day?
I want a yasnippet to insert an org-mode date and time.
The date should be today's date, but the time should be fixed.
So far my snippet correctly inserts today's date, but not the time:
# -*- ...
2
votes
2
answers
1k
views
Yasnippet invoked org-time-stamp function inserts double timestamp
I created a yasnippet template to quickly timestamp a note I'd like to make in org-mode. The body of the yasnippet file reads
$0
:PROPERTIES:
:CREATED: `(org-insert-time-stamp nil t t)`
:END:
...
3
votes
0
answers
259
views
Jump sequence for placeholders in yasnippet not working in org-property blocks
I use the yasnippet bundle and it works like charm.
When I want to include placeholders in a PROPERTIES section of an org-document it is not working.
Here's the snipper:
#type: snippet
# --
:...
3
votes
2
answers
351
views
Org-mode: Disable `t` + `TAB` => `# TODO: ` autocomplete feature
There is a built-in org-mode shortcut where a t character followed by TAB key results in an auto-complete function that produces the # TODO: string literal. How can I disable this? Even better, how ...