From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Collaborating with TODO lists and clocks. Date: Thu, 05 Sep 2013 09:42:12 +0200 Message-ID: <8638pjiujv.fsf@somewhere.org> References: <87li82se2b.fsf@totherme.org> <87obcybgmc.fsf@berkeley.edu> <87txmpoz34.fsf@doc.ic.ac.uk> <87vc743hyw.fsf@berkeley.edu> <877gevwwq5.fsf@konixwork.incubateur.ens-lyon.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Samuel Loury wrote: > I recently encountered the issues of having to collaborate with other > persons on the same task (all of us would need at some point to clock > into this task). > > I thought that changing the value of the variable org-clock-string could > help, but I have not tried it yet. Let me explain why it could help: > > It is for the time being set to "CLOCK:", but imagine that the user A > set it to "CLOCK-A:" and the user B set it to "CLOCK-B:" (in their > respective .emacs files), then after some time a clocked task would then > look like: > > * Do something > CLOCK-A: [2013-09-05 Thu 07:55]--[2013-09-05 Thu 08:46] => 0:51 > CLOCK-A: [2013-09-04 Wed 09:05]--[2013-09-04 Wed 09:41] => 0:36 > CLOCK-B: [2013-09-04 Wed 08:00]--[2013-09-04 Wed 09:03] => 1:03 > > Then the agenda for each user would report only the time spent by > himself. > > The time spent by each participant is clearly separated. > > There are some problems with doing so: > - I don't know yet how to configure a report showing the time spent by > every body, > - I am not sure the clock time sum would work. > - grepping for "CLOCK:" on org sources shows: > --8<---------------cut here---------------start------------->8--- > ./lisp/org-clock.el:782: (while (re-search-forward "CLOCK: \\(\\[.*?\\]\\)$" nil t) > ./lisp/org.el:851: (defcustom org-clock-string "CLOCK:" > ./lisp/org.el:8501: (while (re-search-forward "^[ \t]*CLOCK:.*$" nil t) > ./lisp/org.el:15007: (defconst org-clock-drawer-start-re "^[ \t]*:CLOCK:[ \t]*$" > ./lisp/org.el:15578: (while (looking-at "^[ > \t]*\\(:CLOCK:\\|:LOGBOOK:\\|CLOCK:\\|:END:\\)") > ./lisp/org.el:15579: (if (member (match-string 1) '("CLOCK:" ":END:")) > ./lisp/org.el:17278: (looking-at "^[ \t]*CLOCK:"))) > --8<---------------cut here---------------end--------------->8--- > Those look like "hard coded" "CLOCK:" instead of using > org-clock-string. They would need to be fixed. > > What do you think of this solution? Has anyone already use a solution > like this? > > Best, > > PS: I have tried changing the org-clock-into-drawer variable to be > "CLOCK-A" and "CLOCK-B" so that the task would then look like > * Do something > :CLOCK-A: > CLOCK: [2013-09-05 Thu 07:55]--[2013-09-05 Thu 08:46] => 0:51 > CLOCK: [2013-09-04 Wed 09:05]--[2013-09-04 Wed 09:41] => 0:36 > :END: > :CLOCK-B: > CLOCK: [2013-09-04 Wed 08:00]--[2013-09-04 Wed 09:03] => 1:03 > :END: > But it needs org-drawers to contain the values for each collaborators > for it to work (and then should be maintained) and the folding mechanism > did not seem to work for those special drawers. Having thought about that in the past, I had thought of adding "tags" after clock lines, such as: --8<---------------cut here---------------start------------->8--- CLOCK: [2013-09-05 Thu 07:55]--[2013-09-05 Thu 08:46] => 0:51 :userA: CLOCK: [2013-09-04 Wed 09:05]--[2013-09-04 Wed 09:41] => 0:36 :devB: --8<---------------cut here---------------end--------------->8--- Though, having separate CLOCK drawers would even be better for Git merges, such as (keeping the idea of pseudo-tags): --8<---------------cut here---------------start------------->8--- :CLOCK:userA: CLOCK: [2013-09-05 Thu 07:55]--[2013-09-05 Thu 08:46] => 0:51 CLOCK: [2013-09-04 Wed 09:05]--[2013-09-04 Wed 09:41] => 0:36 :END: :CLOCK:devB: CLOCK: [2013-09-04 Wed 08:00]--[2013-09-04 Wed 09:03] => 1:03 :END: --8<---------------cut here---------------end--------------->8--- But, of course, a lot of development is required to make this become usable: - clocking reports (`R') must be updated with the knowledge of the current user - clock checking functions (`v c') must be enhanced to ignore clocks from other users - etc. Best regards, Seb -- Sebastien Vauban