- Notifications
You must be signed in to change notification settings - Fork1
takaxp/org-onit
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This package provides automatedorg-clock-in
andorg-clock-out
by addingDoing
tag to a heading of an org mode buffer. While theDoing
tag appears in an org buffer, Emacs Org mode maintains the task clocking.
You can say “I’m on it!”.
Please putorg-onit.el
into yourload-path
.
If you usepackage.el
or other package manager, no necessary to add(require 'org-onit)
to yourinit.el
and just call toggle commandsorg-onit-toggle-doing
ororg-onit-toggle-auto
in an org buffer.
It is recommended to installorg-bookmark-heading because a normal jump by built-inbookmark.el
is not sufficiently accurate for org buffers.org-bookmark-heading provides more precise jumping capability by adding ID property to each org mode heading.org-onit.el
will useorg-bookmark-heading if available but not mandatory.
(with-eval-after-load"org-clock" (setq org-clock-out-remove-zero-time-clockst))
(with-eval-after-load"org" (global-set-key (kbd"C-<f11>")'org-clock-goto) (define-key org-mode-map (kbd"<f11>")'org-onit-toggle-doing) (define-key org-mode-map (kbd"M-<f11>")'org-onit-toggle-auto) (define-key org-mode-map (kbd"S-<f11>")'org-onit-goto-anchor))
You can freely arrangeorg-clock-frame-title-format
. If you installorg-clock-toay.el in your system, then you can show a working time only for today.
(with-eval-after-load"org" (add-to-list'org-tag-faces '("Doing":foreground"#FF0000")) (add-hook'org-cycle-hook#'org-onit-clock-in-when-unfold))(with-eval-after-load"org-clock" (setq org-clock-clocked-in-display'frame-title);; or 'both (setq org-clock-frame-title-format '((:eval (format"%s|%s|%s" (if org-onit--auto-clocking"Auto""") (org-onit-get-sign) org-mode-line-string)))))
If you apply the above recommended keybindings, then just type<f11>
in an org buffer. A tag of a heading having the cursor will be changed toDoing
and automatically start toorg-clock-in
. You can go any buffers and do anything but you can go back to theDoing
tagged heading by just typingC-<f11>
. Typing<f11>
again, thenorg-clock-out
is executed andDoing
tag will disappear. When you typeS-<f11>
, you can go back to the original position you are jumped from.
org-clock-in
will be called when:
- calling
org-onit-toggle-doing
if the task is notDONE
- calling
org-onit-toggle-doing
at any headings if:wakeup
oforg-onit-basic-options
isdoing
orboth
- unfolding a heading if
:unfold
oforg-onit-basic-options
is non-nil
org-clock-out
will be called when:
- calling
org-onit-toggle-doing
- making the task
DONE
or removing todo state
UseM-x org-onit-toggle-auto
. Togglingorg-clock-in
andorg-clock-out
will be done automatically no need to toggleDoing
tag by yourself.
org-clock-in
will be called when:
- visiting a heading if the task is not
DONE
- visiting a heading if
:nostate
oforg-onit-basic-options
isauto
orboth
and the task is notDONE
- making the task not
DONE
org-clock-out
will be called when:
- switching to other headings if the task has a todo state (e.g.
TODO
) - switching to other headings if
:nostate
oforg-onit-basic-options=
isauto
orboth
and the task is notDONE
- making the task
DONE
- calling
org-onit-toggle-doing
- org-onit-wakeup-done (
deprecated
, useorg-onit-basic-options
)- Allow switching to
org-clock-in
byorg-onit-toggle-doing
when the heading is DONE. - Default: nil
- Allow switching to
- org-onit-include-no-state-heading (
deprecated
, useorg-onit-basic-options
)- Allow switching to
org-clock-in
in any headings except headings in TODO whenorg-onit-toggle-auto
is used - Default: nil
- Allow switching to
- org-onit-basic-options
- This variable is buffer-local. Please use
setq-default
orcustom-set-variables
in your init.el. :wakeup
allows switching toorg-clock-in
when the heading is DONE.:nostate
allows switching toorg-clock-in
in any headings except headings in TODO:unfold
allows switching toorg-clock-in
when unfolding a heading- Default: (
:wakeup
nil:nostate
nil:unfold
nil):wakeup
and:nostate
can takedoing
,auto
,both
, andnil
- If
doing
is specified, the option will be used inorg-onit-toggle-doing
- If
auto
is specified, the option will be used inorg-onit-toggle-auto
- If
both
is specified, the option will be used inorg-onit-toggle-doing
andorg-onit-toggle-auto
- If
:unfold
can taket
ornil
- But
:wakeup
and:nostate
are given priority over:unfold
- But
- This variable is buffer-local. Please use
- org-onit-encure-clock-out-when-exit
- Call
org-clock-out
when killing Emacs iforg-clock-persis
is nothistory
ornil
- Default: t
- Call
- org-onit-keep-no-state
- If non-nil, allow clocking in but keep the heading TODO state none
- If nil and
:nostate
oforg-onit-basic-options
is specified as non-nil, then the subtree will be changed to TODO heading state and clock-in - Default: t
- org-onit-update-options
org-onit-basic-options;; (:wakeup nil :nostate nil :unfold nil)(org-onit-update-options '(:nostate doing:unfoldt));; update the local variableorg-onit-basic-options;; (:wakeup nil :nostate doing :unfold t)
- org-onit-switch-task-hook
- org-onit-start-autoclock-hook
- org-onit-stop-autoclock-hook
- org-onit-after-jump-hook
(defunmy-onit-reveal () (org-reveal) (org-cycle-hide-drawers'all) (org-show-entry) (show-children) (org-show-siblings))(add-hook'org-onit-after-jump-hook#'my-onit-reveal)
- cask
- install via brew
brew install cask
- manual install
cd~/hub clone cask/caskexport PATH="$HOME/.cask/bin:$PATH"
- install via brew
Below operation flow is recommended.
make# Install git-hooks in local .gitgit branch [feature-branch]# Create branch named [feature-branch]git checkout [feature-branch]# Checkout branch named [feature-branch]# <edit loop>emacs org-onit.el# Edit something you wantmaketest# Test org-onitgit commit -am"brabra"# Commit (auto-run test before commit)# </edit loop>hub fork# Create fork at GitHubgit push [user] [feature-branch]# Push feature-branch to your forkhub pull-request# Create pull-request
- 1.0.7 (2019-09-30)
- [new]
org-onit-update-options
is added to updateorg-onit-basic-options
- [deprecated]
org-onit-toggle-options
will beorg-onit-basic-options
- [new]
- 1.0.6 (2019-09-29)
- [improved] Make
org-onit-toggle-options
buffer local
- [improved] Make
- 1.0.5 (2019-09-26)
- [new]
org-onit-clock-in-when-unfold
is now public function
- [new]
- 1.0.4 (2019-09-25)
- [new]
org-onit-keep-no-state
is added
- [new]
- 1.0.3 (2019-09-24)
- [improved]
org-onit-use-unfold-as-doing
is integrated toorg-onit-toggle-options
- [deprecated]
org-onit-use-unfold-as-doing
- [improved]
- 1.0.2 (2019-09-12)
- [new]
org-onit-toggle-options
is introduced - [improved]
org-clock-in-switch-to-state
is reflected toorg-onit-todo-state
- [deprecated]
org-onit-wakeup-done
- [deprecated]
org-onit-include-no-state-heading
- [new]
- 1.0.1 (2019-09-01)
- [improved] Rename “todo status” to “todo state”
- [breaking change] rename to
org-onit-include-no-state-heading
- [new] support to clock-out when removing todo state
- 1.0.0 (2019-09-01)
- initial release