1

From where is the current date as known by org-mode taken? Do I need to perhaps adjust some TimeZone settings? Or is the date determined by the date my Emacs session was started. I close emacs pretty rarely.

Some more info:

After a restart, org-date-from-calendar give me

No buffer named *Calendar*

However if I first do org-time-stamp which will pop up a Calendar buffer to let me select a date, and then later use org-date-from-calendar we're back in business and the date is current.

So it seems that the Calendar buffer needs to be initialized an also refreshed somehow.

1

I don't think you'd ordinarily call org-date-from-calendar directly. It returns the date under point in a calendar buffer. But it doesn't actually show you the calendar, so calling it without one of the helper functions associated is going to be confusing.

Probably easier is to use org-timestamp (C-c .)or org-timestamp-inactive (C-c !), which do show you the calendar so you can see what you're selecting.

  • I have org-date-from-calendar in some Capture templates where I don't want to have to interactively choose a date. What you're saying is inline with what I've seen from some more investigation and I've updated the question a bit. – Metropolis Feb 1 '17 at 20:57
  • I don't think org-date-from-calendar is going to be useful in a capture template - it's for interactive use, and in a program there's really no way to know what date it will return. – Tyler Feb 1 '17 at 20:59
  • 1
    Went through and replaced all that with %t and %u depending on if I want active or inactive timestamps. Seems to do what I expect. Accepted you answer. – Metropolis Feb 1 '17 at 21:01

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.