emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Hopps <chopps@chopps.org>
To: emacs-orgmode@gnu.org
Cc: Christian Hopps <chopps@chopps.org>
Subject: Re: bi-monthly steps.
Date: Thu, 26 Mar 2020 07:33:56 -0400	[thread overview]
Message-ID: <B6716EB5-E2D1-4316-840F-36E53EEE8B01@chopps.org> (raw)
In-Reply-To: <op.0he2y3llrns8nc@odin>

[-- Attachment #1: Type: text/plain, Size: 67 bytes --]

I've attached an updated patch using "semimonth".

Thanks,
Chris.


[-- Attachment #2: 0001-org-clock.el-add-semimonth-step-for-clocktables.patch --]
[-- Type: application/octet-stream, Size: 1760 bytes --]

From 479646d44e11c923b8f64be417e785a175133d13 Mon Sep 17 00:00:00 2001
From: Christian Hopps <chopps@gmail.com>
Date: Fri, 20 Mar 2020 06:58:29 -0400
Subject: [PATCH] org-clock.el: add semimonth step for clocktables

* lisp/org-clock.el (org-clocktable-steps): add a semimonth step for
producing clock tables.

Originally proposed "bimonth" as name; however, bimonthly is
ambiguous, as it can mean 2 different things, semimonthly or every 2
months.
---
 lisp/org-clock.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 345fd9b5a..c902635f9 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2784,6 +2784,7 @@ a number of clock tables."
           (pcase step
             (`day "Daily report: ")
             (`week "Weekly report starting on: ")
+            (`semimonth "Semimonthly report starting on: ")
             (`month "Monthly report starting on: ")
             (`year "Annual report starting on: ")
             (_ (user-error "Unknown `:step' specification: %S" step))))
@@ -2833,6 +2834,9 @@ a number of clock tables."
                           (let ((offset (if (= dow week-start) 7
                                           (mod (- week-start dow) 7))))
                             (list 0 0 org-extend-today-until (+ d offset) m y)))
+                         (`semimonth (list 0 0 0
+                                           (if (< d 16) 16 1)
+                                           (if (< d 16) m (1+ m)) y))
                          (`month (list 0 0 0 month-start (1+ m) y))
                          (`year (list 0 0 org-extend-today-until 1 1 (1+ y)))))))
              (table-begin (line-beginning-position 0))
-- 
2.25.0


  reply	other threads:[~2020-03-26 11:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 11:17 bi-monthly steps Christian Hopps
2020-03-12 18:15 ` Nick Dokos
2020-03-12 22:55   ` Christian Hopps
2020-03-13  8:01     ` Michal Politowski
2020-03-13 12:14       ` Peter Neilson
2020-03-26 11:33         ` Christian Hopps [this message]
2020-03-27  1:12           ` Kyle Meyer
2020-03-27  8:26             ` Christian Hopps
2020-03-13  4:47   ` Peter Neilson
2020-03-13  6:59     ` Eric S Fraga
2020-03-13  7:14       ` Loris Bennett
2020-03-13  9:51         ` semimonthly steps [Re: bi-monthly steps.] Christian Hopps

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B6716EB5-E2D1-4316-840F-36E53EEE8B01@chopps.org \
    --to=chopps@chopps.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).