When I create a new orgmode heading with C-<RET>, orgmode will add a new outline entry at the current hierarchy level. However in my current setup, whenever I push C-<RET> it creates the new entry as well as adding a timestamp on the line below.

So instead of:

** {blank}

I get:

** {blank}
[2017-12-28 Thu 16:23]

I would like to get the entry without the timestamp.

Does anyone know the correct variable or setting to change? According to the manual the correct function is org-insert-heading-respect-content but there is no mention in the manual about timestamps in reference to this function.

Note I am using an orgmode config that I did not write myself--got from a blog post. So I am not sure about everything going on in the config. That is why I am trying to adjust this behavior.

  • What is the value of org-insert-heading-hook? Just use C-h v org-insert-heading-hook<RET>.
    – Tobias
    Dec 29 '17 at 0:56
  • Oh got you. Yes, the current value is set to bh/insert-heading-inactive-timestamp. I am using parts of an org config I copied from a blog post, so there are some parts of it that I am not familiar with. Thanks for help. I removed that line from the config and it fixed the problem.
    – krishnab
    Dec 29 '17 at 1:07
  • 2
    I'm voting to close this question as off-topic because it is not of general interest. If someone has a similar problem with other modes he will most likely not end up here. So this question will not be of any help to anyone. Ask you the question: How should the title of the question be rephrased to be of general interest? "I've got strange behavior with some mode what could be the cause?" Would krishnab have ended up here if he was not the OP?
    – Tobias
    Dec 29 '17 at 4:44
  • @Tobias Hmm, I see what you mean. I can adjust the question a bit. I think the underlying problem is that the orgmode documentation references the org-insert-heading-respect-content when discussing the creation of a new heading. But it seems like the documentation should reference the org-insert-heading-hook in the same place. So if another person has some anomalous behavior when adding a heading (with C-<RET>) then there is no place to find the correct behavior--except a SE post like this. But I can try to adjust the post a bit. Thanks.
    – krishnab
    Dec 29 '17 at 15:52

Thanks to @Tobias for the help. The solution was to actually check the org-insert-heading-hook variable. When I checked this variable in my configuration I found that there was some function that was assigning the timestamp. Once I removed that line, it was fixed.

One odd thing is that the documentation for the variable is not exactly easy to find. it is not part of the main manual, but instead in a different document.

  • Please accept your own answer as soon as possible to mark this question as answered. (I know that there can be some grace period you have to wait.) Thanks in advance,
    – Tobias
    Dec 29 '17 at 22:12
  • Once again. Please, close this question by accepting your own answer. Otherwise this answer is bumped again and again to the se-homepage by the Community bot. If you want to get org-insert-heading-hook included in the org manual you should write a bug-report to emacs-orgmode@gnu.org. Keeping this question open will not help in this respect.
    – Tobias
    Jan 28 '18 at 22:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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