1

I would like to have a function that pastes a certain heading:

"#+TITLE:\n#+STARTUP: overview"

I tried using insert-buffer-substring:

(insert-buffer-substring "#+TITLE:\n#+STARTUP: overview")

but it's not working.

2

1 Answer 1

1

As @NickD suggested in a comment, you can use function insert.

(insert "#+TITLE:\n#+STARTUP: overview")

C-h f insert-buffer-substring tells you that you need to pass it a buffer as argument. And the rest of what it tells you makes clear that it doesn't at all do what you're looking for.

C-h f insert tells you:

insert is a built-in function in C source code.

(insert &rest ARGS)

Insert the arguments, either strings or characters, at point. ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.