Is there a built-in way to convert/toggle between GNU Emacs Calc's HMS forms and seconds? I'd also like to easily be able to add numbers as seconds and/or minutes to an existing HMS form.

  • Please specify what you mean by "HMS form". Do you mean a list of numbers? A formatted time string? The question is unclear so far, and so risks being closed.
    – Drew
    Mar 6 '18 at 5:22
  • Depending on what you mean by your question, see the Elisp manual, node Time Parsing or other time-related nodes under node System Interface.
    – Drew
    Mar 6 '18 at 5:24

One way of going from an HMS form to the number of seconds is hinted by a line from the HMS forms page:

Dividing two HMS forms produces a real-valued ratio of the two angles.

So if an HMS form is on the stack

5@ 30' 0"

entering one second to the stack


and dividing by it


gives the number of seconds:


Not exactly a convert but it's only three keystrokes.

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.