This a package with 1 purpose: automatically run the user through dedicated sessions.
a dedicated session consist of 3 stages:
- dumping
- doing
- releasing
dumping
is the process to dump all previous focuses/concerns out of the brain
, in order to be able to concentrate on the upcoming doing stage. This stage ensure that every doing process through the day, or even through a larger time period like month or season, have a similar, and generally good state
doing
is stage where the work are done
.
doing
is seperated into smaller pieces called bar and rest, to maintain the level of focus through a single doing stage.
releasing
is stage to round up the work and free your memory
so you don’t have to think about the session after it’s done and still feel happy about it.
a good state is typically decribed as:
- calm: without anxiety, being able to take the thing at its own speed rather than a “required” speed defined by some social benchmark
- focused: without distraction, being able to set topic and do only relevent stuff in a single session.
- clear mind: with track, being able to track what is done, the process, input, and output information of work done, where to find reference and content of checked reference, matching principle of current situation, meaning of concept, whole/current/next step in the process/machine, .etc.
- healthy: physically feeling well, with body in stance unlikely to cause disease/sore, motivated body emotion(you can jump off to exercie), well hydrated, .etc
in short, a good state is the state where you’re able to do things as what they are, with yourself as who you are
, without “bad” influence of social/physical/mental bias due to either your social environment or personal environment(your habits and what you have done earlier today).
org-ml
and org-element
are used. They are both in melpa, so you can package-install
them.
you can just copy and paste all codes in the repository into your init.el file.
or, you can clone this repository into your site-lisp directory, and add following into your init.el file
(require 'dedicated-session)
(global-set-key (kbd "C-c d s") 'dedicated-session)
(global-set-key (kbd "C-c d t") 'dedicated-session-see-topic)
(global-set-key (kbd "C-c d i") 'dedicated-session-time-statistics)
(global-set-key (kbd "C-c d g") 'dedicated-session-see-stage-in)
(global-set-key (kbd "C-c d C-c") 'dedicated-session-bar-rest-toggle)
(global-set-key (kbd "C-c d q") 'dedicated-session-releasing)
(global-set-key (kbd "C-c d l") 'dedicated-session-log)
(setq 'dedicated-session-prompt-source "path/to/your/prompt/source.org")
(setq 'dedicated-session-journal "path/to/your/journal.org")
currently, all files are kept using org format for readability and editing utility.
where the prompt comes from. The file should included at least:
+--rest methods
| +---drink coffee :dumping:
| +---another rest method :dumping:doing:
| +---picturing put things in memory on the floor :dumping:releasing:
|
+--prompts
+---dumping
+---doing
| +---topic
| +---bar-start
| +---bar-end
| +---rest-start
| +---rest-end
| +---doing-start
| +---doing-end
|
+---releasing
the tags in the rest methods are one of :dumping:doing:releasing:
, signifying in which stage of the session the rest method is available.
prompts, if not set through the prompts
subtree of the file, would use default values in the package.
---Year
+---Jan
|
+---Feb
+--11
|
+--12
+---session 1
| +---Dumping
| | +---time:start and stop
| | +---method:selected from source
| | +---extra log: from the log function
| |
| +---Doing
| | +---topic
| | +---bar 1
| | +---rest 1
| | +---bar 2
| | | +--time: start and stop
| | | +--extra log:from the log function
| | | +--bar summary:from the prompt
| | |
| | +---rest 2
| | +--time: start and stop
| | +--rest method:from list
| | +--extra log:from the log function
| |
| +---Releasing
| . +--time: start and end
| . +--session summary: from prompt, what is done
| . | in this session.
| . +--rest method: from list
| . +--extra log: from the log function
| .
| ....[maybe]Statistics
| +--length of session
| +--length of bar
| +--number of bars
| +--rest time
| +--working time
| +--ratio of working/whole
| +--...
|
+---session 2
----...
where the log of your choices and your notes goes to. in the future, I may modify the mech so you can write your own journal-function to log your journal into whereever you want in whatever format, like your org-roam daily page,.etc.
or, if you have hacked a function like that, you can start the…pull request something. Once I figure out how that thing work, I’ll check and may incorporate that into the package.
in short:
- start dedicated session by calling
dedicated-session
. you’ll enter dumping buffer - press
C-c C-c
to proceed from a dumping buffer. Your first bar would start - call
dedicated-session-doing-bar-rest-toggle
to toggle between bar and rest- if you’re toggling into rest, you’ll enter rest buffer.
C-c C-c
to proceed to next bar. Or, you can kill buffer mannualy and toggle manualy. I may add an alias for toggle, as it’s often used only for entering rest. - automatically toggle: you’ll be prompted to input a bar length.
if you input nothing, bar 1’s length would be used. After you start a bar for
bar-length
minutes, it will automatically call toggle function.
- if you’re toggling into rest, you’ll enter rest buffer.
- call
dedicated-session-releasing
if you want to quit. you’ll enter summary log buffer. finish summary.C-c C-c
. you’ll enter releasing buffer. release.C-c C-c
to quit. - all stages are logged into a .org file you specified in
dedicated-session-journal
- you can log anytime. the log goes into corresponding entry when you logged. log is numbered in session. the number reset after releasing.
When you want to start a dedicated session, do M-x dedicated-session
or C-c d s
if you bind the function to that keybinding, and you’ll enter the dumping buffer, where prompts would show.
you can follow the prompts there, and once you enter the doing stage, you can just do things as how you do them. in this stage
dedicated-session-doing-topic
would show the topic your doing in the minibuffer.dedicated-session-doing-bar-rest-toggle
would be automatically called after you entered the topic.- when you call it during a rest, it will end the rest and start the next bar.
- when you call it during a bar, it will end the bar and start the next rest.
- [not implemented] automatically called after X minuites if the variable
dedicated-session-doing-bar-length
is non-nil and X. if the variable isnil
, then the first recorded bar length would be assign to it.
- [you don’t want to call it by yourself]
dedicated-session-doing-rest-prompt
would show you the rest prompt, but you may want to let it be called by thebar-rest-toggle
function. - [not implemented]
dedicated-session-doing-leave-back-toggle
if you have a accidental leave, it will end the current bar/rest and not starting the next, but freeze to wait you back and call it another time, where the same type bar/rest would be created. dedicated-session-releasing
would end the doing session
after dedicated-session-releasing
is called, you would be directed to a summary log and then the releasing buffer, where you’ll be prompt to do some rest. you can follow the prompt there, and eventually end the dedicated session by ~C-c C-c.
Through out the session, you can call dedicated-session-log
to log in the corresponding part,
- State “DONE” from “TODO” [2022-05-04 Wed 18:23]
- there’s little undo/illegal action prevent machenism, so unexpected thing would happen if you didn’t follow the instructions. Like, if you log and forget about it, the log will be write in the journal with your next finalized log(the next one you pressed
C-c C-c
after finishing)
information here I wrote before start coding. so it might be inaccurate. I’ll fix that later
entry point of the facility. it will:
- start a session(set
dedicated-session-in
tot
) - call
dedicated-session-dumping
after dumping finished, enter next phase like magit commit - call
dedicated-session-doing
(if use elscreen, could create a new screen and do that)
- prompt for input of value of
dedicated-session-topic
- create entry with time and “dedicated session: ” dedicated-session-topic and the entry for dumping
- record the start time with
dedicated-session-record-time
- display prompts from source in a popup buffer
- set
dedicated-session-state
to'dumping
- wait until user input signifying end of dumping(C-c C-c?)
- call
dedicated-session-record-time
- return to
dedicated-session
- set
dedicated-session-state
to'doing
- create entry of doing
- call
dedicated-session-bar-rest-toggle
- will toggle the
dedicated-session-doing-state
to bar/rest, - find the last bar/rest. if there’s none, create one
- call
dedicated-session-record-time
, - if
done?
is ture, meaning it’s called bydedicated-session-releasing
, that the doing stage is done, so no new insert. and return. - otherwise,
- create new rest/bar entry,
- call
dedicated-session-record-time
, - if it’s a bar, message “bar no.X starting”
- if it’s a rest, call
dedicated-session-doing--rest-prompt
- return
- start a new org buffer
- insert content from
dedicated-session-rest-collect
- popup a window, and give it the buffer
- wait for user input to call
dedicated-session-doing-bar-rest-toggle
and return
- go to the source file
- filter rest methods with the
dedicated-session-state
as tags - return the filtered rest methods
manualy called.
- call
dedicated-session-bar-rest-toggle t
, to end the last bar/rest - call
dedicated-session-releasing-free
- open a capture buffer just like magit commit
- prompt for summary log
- after recieving C-c C-c, goto the journal file buffer, create the releasing heading and save the log in journal
- prompt for rest with methods returned by
dedicated-session-rest-collect 'releasing
- after recieving C-c C-c, meaning that the rest ended, set
dedicated-session-state
to nil - message dedicated session of
dedicated-session-topic
ended - set
dedicated-session-doing-topic
nil
this function log notes in the corresponding entry in the journal file
- display a capture buffer
- after recieving C-c C-c, goto journal file buffer, create an entry under the
logs
(if it’s not present, create one) with heading at (current time - start - time), and insert the note under that entry.
- [ ] enable customize journal function
- [ ] add timer feature in doing/bars
- [ ] link behaviour in prompt buffers?