Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8644091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:12:39+00:00 2026-06-12T12:12:39+00:00

So, at work we use flexitime (flex hours, flexi hours…) which is nice but

  • 0

So, at work we use flexitime (flex hours, flexi hours…) which is nice but can be hard to keep track of. I’m currently using org-mode to keep track of my hours (org-clock-(out|in)) but I’d like to extend that to automagically calculate if I’ve worked more than 8 hours (surplus time should be added to my flexitime ‘account’) or less (depending on how long lunch break I took etc), the balance on my flexitime ‘account’ and such.

Does anyone else use Emacs for this?

I’m currently using a very basic setup to track my time:

(defun check-in ()
  (interactive)
  (let (pbuf (current-buffer))
    (find-file (convert-standard-filename "whatnot"))
    (goto-char (point-max))
    (insert "\n")
    (org-insert-heading)
    (org-insert-time-stamp (current-time))
    (org-clock-in)
    (save-buffer)
    (switch-to-buffer pbuf)))

(defun check-out ()
  (interactive)
  (let (pbuf (current-buffer))
    (find-file (convert-standard-filename "whatnot"))
    (goto-char (point-max))
    (org-clock-out)
    (save-buffer)
    (switch-to-buffer pbuf)))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:12:40+00:00Added an answer on June 12, 2026 at 12:12 pm

    Assuming that I understood your problem correctly, I hacked together a quick solution. First, you should ensure that you create only one outline entry per day, if you are checking in and out multiple times. Define the following function that’ll compute the overtime for a given day.

    (defun compute-overtime (duration-string)
      "Computes overtime duration string for the given time DURATION-STRING."
      (let (minutes-in-a-workday
            work-minutes
            overtime-minutes)
        (defconst minutes-in-a-workday 480)
        (setq work-minutes (org-duration-string-to-minutes duration-string)
              overtime-minutes (- work-minutes minutes-in-a-workday))
        (if (< overtime-minutes 0) (setq overtime-minutes 0))
        (org-minutes-to-hh:mm-string overtime-minutes)))
    

    Then, use this in a clock table formula in the file whatnot.

    #+BEGIN: clocktable :maxlevel 1 :emphasize nil :scope file :formula "$3='(compute-overtime $2)::@2$3=string(\"Overtime\")"    
    #+END: clocktable
    

    Hit C-c C-c when you are on the clock table to regenerate it.

    You can get the total overtime by summing the overtimes using another formula. But, I haven’t worked that out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At work we use DataStage which uses dataset (.ds) files. I can view the
In work we use a Global Distribution System for bookings which is very very
At work I use ClearCase and SourceSafe, but have found some time to do
I'm loading a few huge images on my flex/as3 app, but I can't manage
Where I currently work we use a lot of hand made custom web controls
For personal projects I use Git for SCM, but at work we use TFS.
At work we use a common makefile that other makefiles include (via the include
At work we use a branching strategy where all changes start off in a
Where I work we use a set schedule to build our applications. What is
I have a website hosted with godaddy. Basically for my work I use TFS.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.