* [PATCH] Correctly align clock information in default time grid
@ 2013-02-04 13:01 Sebastien Vauban
2013-02-04 17:17 ` Bernt Hansen
2013-02-04 22:48 ` Bastien
0 siblings, 2 replies; 4+ messages in thread
From: Sebastien Vauban @ 2013-02-04 13:01 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello,
Here a tiny patch to correctly align clock info in the default time grid.
For example:
--8<---------------cut here---------------start------------->8---
Day-agenda (W06):
2013-02-04 Mon __________________________________________________
8:00......
Clk (1:05) 9:03-10:08 TODO Organize work
10:00......
Clk (0:59) 10:08-11:07 DONE Do work for client A
Clk (1:24) 11:06-12:30 TODO Do other work for client B
12:00......
Clk (-) 13:34...... TODO Send patch to org-mode ML
13:49...... now
14:00......
--8<---------------cut here---------------end--------------->8---
Best regards,
Seb
From ee8632ac6d68aebe1613bf3e190ee5616bfb19ee Mon Sep 17 00:00:00 2001
From: Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
Date: Mon, 4 Feb 2013 13:47:54 +0100
Subject: [PATCH] Respect the 11-char default convention for %s info
* org-agenda.el (org-agenda-get-progress): By respecting the default
11-char convention for "Scheduling/Deadline information" (`%s' in
`org-agenda-prefix-format'), the clocked lines are perfectly aligned
in the time grid.
---
lisp/org-agenda.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 2ce9f20..355a477 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5813,7 +5813,7 @@ please use `org-class' instead."
(cond
(closedp "Closed: ")
(statep (concat "State: (" state ")"))
- (t (concat "Clocked: (" clocked ")")))
+ (t (concat "Clk (" clocked ") ")))
txt level category tags timestr)))
(setq priority 100000)
(org-add-props txt props
@@ -5853,7 +5853,7 @@ See also the user option `org-agenda-clock-consistency-checks'."
'((:background "DarkRed") (:foreground "white"))))
issue face m te ts dt ov)
(goto-char (point-min))
- (while (re-search-forward " Clocked: +(-\\|\\([0-9]+:[0-9]+\\))" nil t)
+ (while (re-search-forward " Clk (-\\|\\([0-9]+:[0-9]+\\)) " nil t)
(setq issue nil face def-face)
(catch 'next
(setq m (org-get-at-bol 'org-marker)
--
1.7.9
--
Sebastien Vauban
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Correctly align clock information in default time grid
2013-02-04 13:01 [PATCH] Correctly align clock information in default time grid Sebastien Vauban
@ 2013-02-04 17:17 ` Bernt Hansen
2013-02-05 19:54 ` Sebastien Vauban
2013-02-04 22:48 ` Bastien
1 sibling, 1 reply; 4+ messages in thread
From: Bernt Hansen @ 2013-02-04 17:17 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
> Hello,
>
> Here a tiny patch to correctly align clock info in the default time grid.
>
> For example:
>
> Day-agenda (W06):
> 2013-02-04 Mon __________________________________________________
> 8:00......
> Clk (1:05) 9:03-10:08 TODO Organize work
> 10:00......
> Clk (0:59) 10:08-11:07 DONE Do work for client A
> Clk (1:24) 11:06-12:30 TODO Do other work for client B
> 12:00......
> Clk (-) 13:34...... TODO Send patch to org-mode ML
> 13:49...... now
> 14:00......
>
> Best regards,
> Seb
Hi Seb,
I'm not sure 'Clk' is more readable than 'Clocked' but it does align
clock entries better. However state change logs suffer from a similar
misalignment. I think a complete fix should correct the alignment for
all of the items.
Personally I don't mind the clock line misalignment - I think it's
easier to read Clocked vs Clk. I think everything should be aligned or
leave it as is.
Regards,
Bernt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Correctly align clock information in default time grid
2013-02-04 17:17 ` Bernt Hansen
@ 2013-02-05 19:54 ` Sebastien Vauban
0 siblings, 0 replies; 4+ messages in thread
From: Sebastien Vauban @ 2013-02-05 19:54 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Bernt and Bastien,
Bernt Hansen wrote:
> "Sebastien Vauban" writes:
>> Here a tiny patch to correctly align clock info in the default time grid.
>>
>> For example:
>>
>> Day-agenda (W06):
>> 2013-02-04 Mon __________________________________________________
>> 8:00......
>> Clk (1:05) 9:03-10:08 TODO Organize work
>> 10:00......
>> Clk (0:59) 10:08-11:07 DONE Do work for client A
>> Clk (1:24) 11:06-12:30 TODO Do other work for client B
>> 12:00......
>> Clk (-) 13:34...... TODO Send patch to org-mode ML
>> 13:49...... now
>> 14:00......
>
> I'm not sure 'Clk' is more readable than 'Clocked' but it does align
> clock entries better. However state change logs suffer from a similar
> misalignment. I think a complete fix should correct the alignment for
> all of the items.
Here is a patch which fixes both string together.
> Personally I don't mind the clock line misalignment - I think it's
> easier to read Clocked vs Clk. I think everything should be aligned or
> leave it as is.
By respecting the rule "11-char wide string" for more elements which are
displayed in the time grid, I think it becomes much more easy to adapt things
to our personal flavor, while still being able to keep things aligned.
For example, here is how the patch looks like with the Org default settings --
well with my `leuven-theme':
http://screencast.com/t/OXBjlIZgkTz
The same patch with the following settings:
--8<---------------cut here---------------start------------->8---
(setq org-agenda-prefix-format
'((agenda . " %-11s%i %?-12t")
(timeline . " % s")
(todo . " %i %-12:c")
(tags . " %i %-12:c")
(search . " %i %-12:c")))
(setq org-agenda-scheduled-leaders
'("Today "
" "))
(setq org-agenda-deadline-leaders
'("Deadline "
"In %d d" ;; or "%d d left"
"%d d ago"))
--8<---------------cut here---------------end--------------->8---
gives a better layout (IMHO):
http://screencast.com/t/KCrAHxCTJo
Best regards,
Seb
From 513702851922a87e1d94adf862f573b7e96c1dd0 Mon Sep 17 00:00:00 2001
From: Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
Date: Tue, 5 Feb 2013 20:46:16 +0100
Subject: [PATCH 2/2] Correctly align clock information and task initial
status in time grid
* org-agenda.el (org-agenda-get-progress): By respecting the default
11-char convention for "Scheduling/Deadline information" (`%s' in
`org-agenda-prefix-format'), the clocked lines and the status changes are
perfectly aligned in the time grid.
---
lisp/org-agenda.el | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 2ce9f20..5d19a39 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5812,8 +5812,8 @@ please use `org-class' instead."
(setq txt (org-agenda-format-item
(cond
(closedp "Closed: ")
- (statep (concat "State: (" state ")"))
- (t (concat "Clocked: (" clocked ")")))
+ (statep (concat "St (" state ") "))
+ (t (concat "Clk (" clocked ") ")))
txt level category tags timestr)))
(setq priority 100000)
(org-add-props txt props
@@ -5853,7 +5853,7 @@ See also the user option `org-agenda-clock-consistency-checks'."
'((:background "DarkRed") (:foreground "white"))))
issue face m te ts dt ov)
(goto-char (point-min))
- (while (re-search-forward " Clocked: +(-\\|\\([0-9]+:[0-9]+\\))" nil t)
+ (while (re-search-forward " Clk (-\\|\\([0-9]+:[0-9]+\\)) " nil t)
(setq issue nil face def-face)
(catch 'next
(setq m (org-get-at-bol 'org-marker)
--
1.7.9
--
Sebastien Vauban
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Correctly align clock information in default time grid
2013-02-04 13:01 [PATCH] Correctly align clock information in default time grid Sebastien Vauban
2013-02-04 17:17 ` Bernt Hansen
@ 2013-02-04 22:48 ` Bastien
1 sibling, 0 replies; 4+ messages in thread
From: Bastien @ 2013-02-04 22:48 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
Hi Sébastien,
"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
> Here a tiny patch to correctly align clock info in the default time
> grid.
For me the clock is shown like this:
Week-agenda (W06):
Monday 4 February 2013 W06
8:00...... ----------------
10:00...... ----------------
General: 10:20-11:00 Clocked: (0:40) DONE Test 1
12:00...... ----------------
General: 13:20-14:00 Clocked: (0:40) DONE Test 2
14:00...... ----------------
16:00...... ----------------
General: 16:20-16:40 Clocked: (0:20) DONE Test 2
18:00...... ----------------
20:00...... ----------------
23:46...... now - - - - - - - - - - - - - - - - - - - - - - - - -
Did you configure any variable to get the clock at the beginning of
the agenda entry?
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-05 19:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-04 13:01 [PATCH] Correctly align clock information in default time grid Sebastien Vauban
2013-02-04 17:17 ` Bernt Hansen
2013-02-05 19:54 ` Sebastien Vauban
2013-02-04 22:48 ` Bastien
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).