Questions tagged [auto-insert]

Question about the usage of package autoinsert

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

Auto insert include guard in cpp header when inside projectile project

I am currently learning C++ and I came across include guards to avoid double inclusion. Now I would like to use the google's style convention like this : // project/src/app.hpp #ifndef ...
1
vote
0answers
107 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-...
1
vote
2answers
74 views

How to increase a magic number in a file buffer on each save

I want to change a magic number (or a time stamp) in a file buffer on each save. The position of the magic number in the buffer can be given through a regex with a keyword or similar. Is there any ...
1
vote
1answer
157 views

Autoinsert a python skeleton

I start my python files (.py) with #!/usr/bin/env python3 and sometimes if __name__ == '__main__': somefunc() having done it some hundreds of time manually I decided to automate it in Emacs. (...
0
votes
1answer
157 views

auto-insert mode switch to new file

I managed to insert a template to certain sripts with autocomplete. Example: (auto-insert-mode) (setq auto-insert-query nil) (setq auto-insert-alist '(((ess-mode . "R script") nil "# R ...
1
vote
0answers
37 views

Both set mode and insert in auto-insert-alist lambda

I have the following as a member of auto-insert-alist: (("/home/robin/.local/bin/.*[^/]\\'" . "Shell-Script mode magic number") lambda nil (if (eq major-mode (default-value 'major-...
1
vote
0answers
72 views

Autoinsert inserts template twice

I want to use autoinsert with C and headers, the code from http://www.emacswiki.org/emacs/AutoInsertMode works well so I made my own template for header in an elisp funtion, but the insertion repeat ...
1
vote
1answer
275 views

Why is autoheader crashing with web-mode?

I got a situation here, that I couldn't get resolved with the maintainer of web-mode. So I'm asking here, if anyone knows a good suggestion. Ok, what I have here: GNU Emacs GUI (version 24.4.51.1 (...
3
votes
1answer
432 views

How can I quit entering keywords when I auto-insert with Helm?

When I M-x find-file RET file.el RET and then run M-x auto-insert, I am eventually presented with a list of keywords that Helm will complete for me. Trouble is, I have no idea how to finish the Helm ...
7
votes
1answer
2k views

Best way to make org-mode reload in-buffer settings

I am using auto-insert so that I can get the usual things I use for org mode when opening a new .org file, example: #+AUTHOR: Edgar Aroutiounian #+EMAIL: edgar.factorial@gmail.com #+STARTUP: ...
3
votes
1answer
903 views

auto-insert a skeleton and run a function when creating a new file

auto-insert-alist by default matches files created in .../bin/ directories and enables sh-mode. There are examples on the wiki showing how to use a skeleton to insert some text, but I want to both ...