Questions tagged [file-header]
The file-header tag has no usage guidance.
11 questions
1
vote
1
answer
515
views
Insert boilerplate automatically when a new file is created
I have a commonly used c++ boilerplate for competitive coding (looks something like this), I'm looking for some way to insert this boilerplate code which is in a file named competitiveCoding/...
0
votes
2
answers
1k
views
How to use C header files in org-mode source code blocks?
I have a C code block in my org-mode document like the following:
#+begin_src C :exports both
#include "my_header.h"
int main(void)
{
function_from_my_header();
return 0;
}
#+...
1
vote
2
answers
153
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
1
answer
644
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 ...
3
votes
2
answers
87
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
1
answer
72
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
1
answer
52
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
0
answers
29
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
1
answer
257
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
0
answers
166
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 ...
7
votes
1
answer
2k
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 ...