Questions tagged [file-header]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
63 views

Prepend text to files or buffers

Is there a function that allows to prepend text to a list of files / buffers? I tried this: (defun prepend-to-org-files (text) (let* ((path "~/Dropbox/org/database") (regex "...
0
votes
1answer
42 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 ...
2
votes
2answers
42 views

How do I add text to every new buffer that I create?

Suppose I want to put my name and the date at the top of every new buffer that I create. How would I do that? Furthermore, suppose I want to use the name of the new buffer in the text that I want to ...
0
votes
1answer
37 views

header2.el: insert header between second and third row?

I customized my own header and want it to be inserted between the second and the third line of the document. Unfortunately I'm not very used to Lisp, therefore I have a hard time trying to find the ...
3
votes
1answer
40 views

How to have two different headers for two different modes with header2?

How to have two different headers for two different modes with header2? For instance, to have a header like : % ---------- % File-name : % ---------- when I create a .el file and a header like : #...
1
vote
0answers
27 views

Including a header-section to text-file? [duplicate]

I'm occasionally writing fanfiction-stories as plain-text files in emacs. It would be great if emacs could add a "header-section" in the beginning of these documents, for example: Title: Author: ...
0
votes
1answer
128 views

Automatic headers

I'm looking for an extension of emacs that automaticaly generate headers from source like C code. I made a script for this in the past using awk. I put my source path and it generate a header with ...
0
votes
0answers
140 views

header2 . . . how to use [duplicate]

I've just installed header2 from elpa and -- now what? I'm afraid I can't fathom where to begin with this beast. I'd like to make a custom org-mode header. Is there a tutorial somewhere that can get ...
6
votes
1answer
1k views

Inserting/updating source file header comments

How can I insert header comments in source files of arbitrary languages? If the file is newly created, the header should be inserted. If a file already exists, then it should be possible to insert a ...