Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [template]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
12 views

Invalid read syntax error in org-roam-capture-templates

I have the following in my org-roam-capture-templates list: ("tt" "tomorrow task" plain ,(concat "*** %(org-read-date nil nil '+1')\n\n" "Description:\n\...
lmkerbey's user avatar
1 vote
1 answer
83 views

How do you use variables and expressions in a string template?

I am trying to use a custom replacer function in s-format to enable a string template with this behavior: (defun transform (x) (* 6 x)) (let ((a 5)) (s-format "${(transform a)}" '...
John Kitchin's user avatar
  • 11.9k
0 votes
1 answer
42 views

Move cursor down on auto-insert

#+SETUPFILE: ~/.emacs.d/org-templates/level-2.org I have the above line auto-inserted on new org files. Is there a way to make the cursor move to the next line? Now it stays at the beginning of the ...
zeynel's user avatar
  • 371
0 votes
0 answers
23 views

How can I select and call a tempo template inside a tempo template?

I am writing a set of tempo templates in order to help me writing Nixpkgs boilerplate code. Here is my code, and I will refer to it henceforth. The workflow I intent is similar to this: Call tempo-...
Anderson Torres's user avatar
0 votes
1 answer
213 views

How to use org-capture template expansion on finish?

I would like to capture the time when I finish an org-capture template with C-c C-c. Is it possible? And how is it possible to use the given templates (i.e., the template %U) for this? Best Jonas
grszkthfr's user avatar
0 votes
0 answers
42 views

How to split org-roam-capture-templates in to multiple lines? [duplicate]

I have following config for my org-roam: (use-package org-roam :ensure t :init (setq org-roam-v2-ack t) :custom (org-roam-directory "~/roamnotes") (org-roam-completion-everywhere ...
Garid's user avatar
  • 641
0 votes
1 answer
58 views

How to insert an inactive timestamp with Minad's TempEl package?

I want to insert an inactive date/timestamp in Org mode with Daniel Mendler's TempEl templating system. The same date and time inserted with C-u C-u C-! looks like this [2023-02-20 Mon 19:11]. I tried ...
Zoli's user avatar
  • 441
1 vote
0 answers
44 views

Unwanted spacing in datetree template

I have an issue with unwanted spacing when I'm adding entries to datetree. This is the template I'm using, stripped to simplest for the purpose of testing: ("p" "Progress" entry (...
Djole's user avatar
  • 25
0 votes
0 answers
37 views

How do I create a project tree from yasnippet

I have built a project prototype as a module in a directory tree in the following example: module main.ext module_feature item.ext another_item.ext I would like to insert the module ...
alexander's user avatar
  • 133
0 votes
2 answers
320 views

auto-insert-alist

I'd like to insert #+SETUPFILE: ~/.emacs.d/org-templates/level-0.org to each .org file that I intend to publish. I opened the variable auto-insert-alist but I cannot figure out where to paste my ...
zeynel's user avatar
  • 371
1 vote
1 answer
163 views

How to use a Template for creating YaSnippet snippets

I want to have a way, to efficiently create new YaSnippet-snippets. YaSnippet has the functionality, that via pressing C-c C-n one can create a new snippet. However, the empty new snippet is very ...
Sinthoras's user avatar
0 votes
0 answers
33 views

org-mode structure templates only someone works

I want to use structure templates with tab but only: <c <e <q <v work. (With emacs -Q no templates work.)
Francesco Cadei's user avatar
1 vote
1 answer
218 views

Org-capture template extension with project name

I am struggling to setup an org-capture template which captures the current projects name from where it is called. Just like ‘%f’ File visited by current buffer when org-capture was called. I am ...
grszkthfr's user avatar
1 vote
1 answer
26 views

How to disable template insertion for `val`, `let`, etc. in `sml-mode`?

With the latest sml-mode(as of ELPA Jan 2022, Emacs 27), Emacs always creates some kind of pattern after a keyword such as val, fun and let and whitespace. So, if I type fun , I get fun = ^ where ^...
tinlyx's user avatar
  • 1,360
2 votes
1 answer
133 views

Evaluate a variable when inserting text into a buffer

When I open a fresh file for coding, I like to insert a header like this: ##################################################################### # Purpose: # Author: me ([email protected]) # Date: ###...
Dan's user avatar
  • 191
1 vote
2 answers
274 views

Yasnippet conditional template depending on field value

I'm having an issue where I would like to be able to create a template which will conditionally insert a string into the template based on the value of one of the fields. This means I want some sort ...
Reginald Marr's user avatar
5 votes
1 answer
270 views

Is it possible to organize the capture templates selection screen?

As it can be seen above, I have around fifteen capture templates. I think this list may grow or shrink, but in the case that it grows, is there any way to make it more segmented? Like dividing it ...
Paulo Soares's user avatar
1 vote
1 answer
210 views

Org mode HTML export presets

When I export something with org mode to html, with it comes a load of presets such as id, labels, classes, preambles and post ambles. For example: <div id="outline-container-org16cf335" class="...
Paulo Soares's user avatar
2 votes
1 answer
632 views

How to run functions inside auto-insert template

I have this in my init file (use-package autoinsert :ensure t :init ;; Don't want to be prompted before insertion: (setq auto-insert-query nil) (setq auto-insert-directory (locate-user-...
147pm's user avatar
  • 2,969
4 votes
2 answers
687 views

How to set schedule and deadline for entires being inserted via org-capture template file?

I'm trying to leverage the power of org capture templates. There are a few tasks I know I will be scheduling on particular dates of the month. Setting their schedule and deadline in the capture ...
Anuvrat Parashar's user avatar
1 vote
0 answers
2k views

Letter in .org mode

.Org mode is very good in writing the outlined text . I use it routinely. But I have to fall back on wordpad or latex when I have to write a letter. Is there any available templates for letter using ...
Vaibhav's user avatar
  • 583
0 votes
0 answers
156 views

Fill placeholders with dynamic values upon exporting a org document

I would like to create an invoice exported from an org document. At the moment I have a clock table which shows the total number of hours I want to bill. I would like to have a part of the document ...
djangonaut's user avatar
33 votes
5 answers
12k views

Why do easy templates, .e.g, "< s TAB" in org 9.2 not work?

Easy templates in Org 9.2 are not working for me on GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30. I have changed my elpa/ directory to smelpa/. I load emacs -q and switch to the *...
Lorem Ipsum's user avatar
  • 4,517
0 votes
0 answers
168 views

Can emacs open a series of files and split windows for each file in a template fashion?

I have a set of ~8 files in a sub-directory structure that is always the same. /DirA/File1 /DirA/File2 /DirB/File3 /DirB/File4 ... and I find myself doing these steps to split windows and see/edit ...
Martin Leahy's user avatar
7 votes
2 answers
4k views

Template for new file

When opening a new file of certain types, I would like some boilerplate to be inserted. That is, when opening a buffer for a file that does not yet exist, insert some predefined text, optionally with ...
mkaito's user avatar
  • 791
0 votes
1 answer
329 views

org-capture Template expansion leading whitespace: bug, feature, workaround

Emacs 26.1 org-mode: 9.1.9 I have an issue with the way org-capture expands a template when it comes to line beginnings: This template (setq org-capture-templates '(("o" "Todo" entry (file+...
Guebert's user avatar
  • 101
0 votes
1 answer
179 views

How do I pre-process capture buffer before saving to target?

There are times I am given a list of names of people that I need to schedule appointments for in our organization. The names are typically given first, and then details come later. I would like to ...
tomcat's user avatar
  • 355
1 vote
3 answers
222 views

Putting emacs .org file options in .emacs file

I use a template for my work. It contains following options. Can I put those in .emacs file. #+OPTIONS: num:nil; p:t #+OPTIONS: toc:nil #+LATEXCLASS_OPTIONS: {10pt} #+LATEX_HEADER: \...
Vaibhav's user avatar
  • 583
6 votes
2 answers
6k views

How can I create custom org-mode templates?

I use org-mode to maintain my personal site. Whenever I create a new .org file in my website, I find myself retyping the following #+TITLE: #+OPTIONS: html-postamble:nil whn:nil toc:nil nav:nil #+...
Brian Fitzpatrick's user avatar
3 votes
1 answer
1k views

Creating templates in emacs

I need to create a weekly agenda that has the same outline. I currently have a Word template file that I use, but would like to convert it to emacs. I want the emacs "template" to pre-fill the ...
tomcat's user avatar
  • 355
4 votes
1 answer
501 views

Capture template without body

I have an org-formatted file named foo.org that consists only of headings (without body). Notice the absence of blank lines. * one ** a ** b * two ** c * three I want to use capture templates to ...
Ernest A's user avatar
  • 481
2 votes
2 answers
228 views

Looking for an existing function for find-file-not-found-functions to do form style creation

I have the habit when creating larger projects to make files called skeleton.typ with all the standard boilerplate for a file of that type (e.g. copyright notices, licenses, the standard html/head/...
MAP's user avatar
  • 592
1 vote
1 answer
366 views

How to create a file from a template if it does not exist or open existing copy?

Trying to make a function that I can call to create a file from a template or open an existing file. Current attempt is as follows: (defun journal-entry () (interactive) (let ((daily-name (format-...
kevzettler's user avatar
4 votes
2 answers
174 views

Yet another request for Emacs templates

I'd like to find a way to organize and access my (Latex) templates within Emacs and so far, I didn't find a satisfying solution. (This post is related, but doesn't solve my question.) Let's say that ...
Stefan Mesken's user avatar
1 vote
1 answer
1k views

Use `%^{prop}p` `%^{prompt}` together in org-capture-templates

What I want is when the buffer asks me a value for property , I can also replace property name with some alternatives. I tried the following code, but fails (setq org-capture-templates '(("...
yuxuan's user avatar
  • 781