Questions tagged [template]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
25 views

How to align blocks of texts in org mode to be export to latex/pdf?

I am trying to create a template for a simple letter. This template would be saved as a snippet and then I will expand it with a keyword,which is easily done with yas-new-snippet. The problem now is ...
0
votes
0answers
42 views

I don't understand skeleton.el indenting rules

As a fun (?) exercise, I am testing skeleton.el templates for some repeated, boring boilerplate coding tasks. I want to generate something like this: int main () { if () { if() { ...
2
votes
1answer
54 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 (me@someplace.com) # Date: ###...
1
vote
2answers
88 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 ...
3
votes
1answer
122 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 ...
1
vote
1answer
50 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="...
1
vote
1answer
354 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-...
3
votes
2answers
358 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 ...
1
vote
0answers
1k 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 ...
0
votes
0answers
103 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 ...
22
votes
5answers
7k 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 *...
0
votes
0answers
121 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 ...
6
votes
2answers
2k 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 ...
0
votes
1answer
232 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+...
0
votes
1answer
139 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 ...
1
vote
3answers
200 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: \...
5
votes
2answers
4k 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 #+...
3
votes
1answer
733 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 ...
4
votes
1answer
455 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 ...
2
votes
2answers
159 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/...
1
vote
1answer
198 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-...
4
votes
2answers
160 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 ...
1
vote
1answer
731 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 '(("...