Giter Site home page Giter Site logo

org-window-habit's Introduction

org-window-habit README

Overview

org-window-habit is an Emacs package that replaces Org Mode’s habit-tracking functionality. It allows for more complex habit assessment and rescheduling logic, defined in terms of one or more windows in which a specific number of repetitions should be completed. Instead of relying on a simple schedule (i.e. org repeaters), org-window-habit uses a sophisticated and very customizable method to evaluate habit compliance and decide on rescheduling.

Quick Start

Sample Configuration

org-window-habit is not yet on melpa and so must be installed from git. With straight.el, the following should work:

(use-package org-window-habit
  :demand t
  :straight
  (org-window-habit
   :repo "colonelpanic8/org-window-habit"
   :host github
   :files ("org-window-habit.el"))
  :config
  (progn
    (org-window-habit-mode +1)))

Habit Tracking

Define a org heading with a TODO state and a SCHEDULED or DEADLINE with any repeater. The actual length of the repeater does not matter, since a different mechanism will be used to assign new due dates, but it is important (for the time being) that some type of repeater is present. You also need to add :STYLE: habit under :PROPERTIES: to signal that this is a habit entry.

**** TODO [#C] Weights
SCHEDULED: <2023-09-12 Tue 16:30> DEADLINE: <2023-09-12 Tue .+2d>
:PROPERTIES:
:STYLE: habit
:END:

Using Simple Repetitions Requirements

If you only want to define a single window over which the habit will be evaluated you can use :WINDOW_DURATION: :REPETITIONS_REQUIRED: and :OKAY_REPETITIONS_REQUIRED: to set simple conditions for habit assessment.

:WINDOW_DURATION: 1w
:REPETITIONS_REQUIRED: 4
:OKAY_REPETITIONS_REQUIRED: 3

Advanced Habit Specification

Alternatively, you can use the :WINDOW_SPECS: property to define multiple assessment windows for your habit.

:WINDOW_SPECS: ((:duration (:days 4) :repetitions 1) (:duration (:days 6) :repetitions 2))
:ASSESMENT_INTERVAL: (:days 1)
:RESCHEDULE_INTERVAL: 2

Assesment interval

The :ASSESMENT_INTERVAL: parameter defaults to a period of 1 day when not specified. It controls how much the rolling window for :WINDOW_DURATION is advanced for each evaluation of the habit. In other words, it determines the step size by which the rolling window moves forward in time for each habit assessment.

Reschedule interval

The :RESCHEDULE_INTERVAL: parameter defaults to a period of 1 day when not specified. It controls the minimum amount of time that must pass after a completion before a habit can be rescheduled.

org-window-habit's People

Contributors

colonelpanic8 avatar

Stargazers

 avatar Jason Yu avatar  avatar Rafael Silva avatar Edmund Miller avatar Christoph Ladurner avatar Bruno Bigras avatar Joe Higton avatar 🍃 Greg 'Krait' Hab 🍂 avatar  avatar Terje Larsen avatar  avatar Mir Behroz Noor avatar Ieremies Romero avatar  avatar Rafael Nicdao avatar Kevin Brubeck Unhammer avatar Sebastian Wålinder avatar  avatar Jason Zhen avatar egstatsml avatar DarkSun avatar Adam Porter avatar Ethan Moss avatar  avatar Zen Monk Alain M. Lafon avatar Torbjörn Norinder avatar Kat avatar  avatar

Watchers

 avatar  avatar

Forkers

alphapapa

org-window-habit's Issues

wrong-type-argument listp #<org-window-habit org-window-habit-1559db02f770>

 Debugger entered--Lisp error: (wrong-type-argument listp #<org-window-habit org-window-habit-1559da91082a>)                                                                                                                                                                                                                                                           
   org-habit-get-priority(#<org-window-habit org-window-habit-1559da91082a>)
   #f(compiled-function (el) #<bytecode 0x12c7787d6dc7a634>)((headline (:raw-value "<omited>" :begin 672 :end 4721 :pre-blank 0 :contents-begin 754 :contents-end 4720 :robust-begin 859 :robust-end 4718 :level 2 :priority 49 :tags nil :todo-keyword #("TODO" 0 4 (fontified nil)) :todo-type todo :post-blank 1 :foot$
   org-element-cache-map(#f(compiled-function (el) #<bytecode 0x12c7787d6dc7a634>) :next-re "\\<SCHEDULED: *<\\([^>]+\\)>" :fail-re "\\<SCHEDULED: *<\\([^>]+\\)>" :narrow t)
   org-agenda-get-scheduled(nil)
   org-agenda-get-day-entries("<omited>..." (9 18 2023) :deadline :scheduled :timestamp :sexp)
   apply(org-agenda-get-day-entries "<omited>..." (9 18 2023) (:deadline :scheduled :timestamp :sexp))
   org-agenda-list(nil)
   funcall-interactively(org-agenda-list nil)
   call-interactively(org-agenda-list)
   #f(compiled-function () #<bytecode -0x3e9cc84baf3cdaa>)()
   funcall(#f(compiled-function () #<bytecode -0x3e9cc84baf3cdaa>))
   (let ((org-agenda-overriding-header '"") (org-agenda-dim-blocked-tasks 'nil) (org-agenda-use-tag-inheritance 't) (org-agenda-span '1) (org-super-agenda-groups '((:name "Schedule" :time-grid t :order 0) (:name "In Progress" :todo "INPROGRESS") (:name "Scheduled/Due Today" :scheduled today :deadline today) (:discard (:tag "habit" :tag "repeating")) (:name$
   org-agenda-run-series("Super view (work)" (((agenda "" ((org-agenda-overriding-header "") (org-agenda-dim-blocked-tasks nil) (org-agenda-use-tag-inheritance t) (org-agenda-span 1) (org-super-agenda-groups '(... ... ... ... ... ...)))) (alltodo "" ((org-agenda-overriding-header "") (org-agenda-dim-blocked-tasks nil) (org-agenda-use-tag-inheritance t) (or$
   org-agenda(nil)
   funcall-interactively(org-agenda nil)
   command-execute(org-agenda)

This occurs when I enable org-window-habit regardless of whether or not I have TODOs which have org-window-habit properties.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.