Questions tagged [template]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
36 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
  • 301
0 votes
0 answers
18 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
110 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
41 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
  • 589
0 votes
0 answers
17 views

Function to paste in current buffer a document structure (template)

I would like to have different structures or skeletons for different articles in different Orgmode documents, e.g., article-AA.org would have certain header options for latex, then it would have a #+...
Adelita's user avatar
  • 155
0 votes
1 answer
45 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
  • 421
0 votes
0 answers
40 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
  • 15
0 votes
0 answers
36 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
253 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
  • 301
0 votes
1 answer
136 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
32 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
191 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
25 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,324
2 votes
1 answer
125 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
239 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
241 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
190 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
601 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,937
4 votes
2 answers
640 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
  • 573
0 votes
0 answers
143 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
31 votes
5 answers
11k 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,407
0 votes
0 answers
164 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
  • 741
0 votes
1 answer
317 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
175 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
218 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
  • 573
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
992 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
499 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
  • 471
2 votes
2 answers
213 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
  • 582
1 vote
1 answer
343 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
170 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
979 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