emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Clocktable: Put summary line as table caption
@ 2012-10-01 21:20 Sebastien Vauban
  2012-10-02 11:31 ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2012-10-01 21:20 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Looking at the presentation of the clocktable, I find that its "summary" line
should be converted into a caption, as any legend would be for any regular
table.

You can test it, and see its effect, with such a ECM file:

--8<---------------cut here---------------start------------->8---
* Development
  :LOGBOOK:
  CLOCK: [2012-09-28 Fri 10:00]--[2012-09-28 Fri 11:00] =>  1:00
  :END:

** Task 1
   :LOGBOOK:
   CLOCK: [2012-09-28 Fri 11:00]--[2012-09-28 Fri 12:00] =>  1:00
   :END:

** Task 2

*** Task 2a
    :LOGBOOK:
    CLOCK: [2012-09-28 Fri 12:00]--[2012-09-28 Fri 13:00] =>  1:00
    :END:

*** Task 2b
    :LOGBOOK:
    CLOCK: [2012-09-28 Fri 13:00]--[2012-09-28 Fri 14:00] =>  1:00
    :END:

* Clock tables

#+BEGIN: clocktable :maxlevel 1 :scope file
#+CAPTION: Clock summary at [2012-10-01 Mon 23:18]

| Headline    | Time |
|-------------+------|
| Total time  | 4:00 |
|-------------+------|
| Development | 4:00 |
#+END:
--8<---------------cut here---------------end--------------->8---

The following patch does it...

From db65cf37d8d28f492e2a36b2fe69307786eff5ce Mon Sep 17 00:00:00 2001
From: Sebastien Vauban <svauban-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
Date: Mon, 1 Oct 2012 17:03:30 +0200
Subject: [PATCH 2/2] Put the clocktable summary line as a CAPTION

* org-clock.el (org-clocktable-write-default): Insert the summary as a
  standard #+CAPTION keyword for the (clock) table.

TINYCHANGE
---
 lisp/org-clock.el |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index c743605..54c812e 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2339,6 +2339,7 @@ from the dynamic block definition."
      (or header
 	 ;; Format the standard header
 	 (concat
+	  "#+CAPTION: "
 	  (nth 9 lwords) " ["
 	  (substring
 	   (format-time-string (cdr org-time-stamp-formats))
--
1.7.9

--
Sebastien Vauban

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Clocktable: Put summary line as table caption
  2012-10-01 21:20 Clocktable: Put summary line as table caption Sebastien Vauban
@ 2012-10-02 11:31 ` Nicolas Goaziou
  2012-10-02 20:23   ` Sebastien Vauban
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2012-10-02 11:31 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> Hello,
>
> Looking at the presentation of the clocktable, I find that its "summary" line
> should be converted into a caption, as any legend would be for any regular
> table.
>
> You can test it, and see its effect, with such a ECM file:
>
> * Development
>   :LOGBOOK:
>   CLOCK: [2012-09-28 Fri 10:00]--[2012-09-28 Fri 11:00] =>  1:00
>   :END:
>
> ** Task 1
>    :LOGBOOK:
>    CLOCK: [2012-09-28 Fri 11:00]--[2012-09-28 Fri 12:00] =>  1:00
>    :END:
>
> ** Task 2
>
> *** Task 2a
>     :LOGBOOK:
>     CLOCK: [2012-09-28 Fri 12:00]--[2012-09-28 Fri 13:00] =>  1:00
>     :END:
>
> *** Task 2b
>     :LOGBOOK:
>     CLOCK: [2012-09-28 Fri 13:00]--[2012-09-28 Fri 14:00] =>  1:00
>     :END:
>
> * Clock tables
>
> #+BEGIN: clocktable :maxlevel 1 :scope file
> #+CAPTION: Clock summary at [2012-10-01 Mon 23:18]
>
> | Headline    | Time |
> |-------------+------|
> | Total time  | 4:00 |
> |-------------+------|
> | Development | 4:00 |
> #+END:

There shouldn't be any space between the caption an the table.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Clocktable: Put summary line as table caption
  2012-10-02 11:31 ` Nicolas Goaziou
@ 2012-10-02 20:23   ` Sebastien Vauban
  2012-10-02 21:06     ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2012-10-02 20:23 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>> Looking at the presentation of the clocktable, I find that its "summary" line
>> should be converted into a caption, as any legend would be for any regular
>> table.
>>
>> You can see its effect:
>>
>> #+BEGIN: clocktable :maxlevel 1 :scope file
>> #+CAPTION: Clock summary at [2012-10-01 Mon 23:18]
>>
>> | Headline    | Time |
>> |-------------+------|
>> | Total time  | 4:00 |
>> |-------------+------|
>> | Development | 4:00 |
>> #+END:
>
> There shouldn't be any space between the caption an the table.

Here it is:

From 5b990eeb2cd6f75a1292ff90c967019ce69fec98 Mon Sep 17 00:00:00 2001
From: Sebastien Vauban <svauban-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
Date: Tue, 2 Oct 2012 22:20:36 +0200
Subject: [PATCH] Put the clocktable summary line as a CAPTION

* org-clock.el (org-clocktable-write-default): Insert the summary as a
  standard #+CAPTION keyword for the (clock) table.

TINYCHANGE
---
 lisp/org-clock.el |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index fc34bf9..e90c1d6 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -2349,13 +2349,14 @@ from the dynamic block definition."
      (or header
 	 ;; Format the standard header
 	 (concat
+	  "#+CAPTION: "
 	  (nth 9 lwords) " ["
 	  (substring
 	   (format-time-string (cdr org-time-stamp-formats))
 	   1 -1)
 	  "]"
 	  (if block (concat ", for " range-text ".") "")
-	  "\n\n")))
+	  "\n")))

     ;; Insert the narrowing line
     (when (and narrow (integerp narrow) (not narrow-cut-p))
--
1.7.9

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Clocktable: Put summary line as table caption
  2012-10-02 20:23   ` Sebastien Vauban
@ 2012-10-02 21:06     ` Nicolas Goaziou
  2012-10-03  7:23       ` Sebastien Vauban
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2012-10-02 21:06 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> Here it is:

It looks good to me.

My only concern is about export back-ends that do not support captions
(I can't think of any atm). For them, the information will be lost.

On the other hand, adding a defcustom or a dynamic block property to
toggle between captioned and non-captioned table would be overkill.

I will commit it if there is no objection.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Clocktable: Put summary line as table caption
  2012-10-02 21:06     ` Nicolas Goaziou
@ 2012-10-03  7:23       ` Sebastien Vauban
  2012-10-04 12:16         ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2012-10-03  7:23 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>> Here it is:
>
> It looks good to me.

OK.

> My only concern is about export back-ends that do not support captions
> (I can't think of any atm). For them, the information will be lost.

You're right. I also thought of that. But that concern is much more general
than for the clocktables: if any (future) back-end does not support captions
in his DNA, we will have to foresee a workaround in the export _anyway_,
something such as copying the text just before or after the figures, tables,
etc.

> On the other hand, adding a defcustom or a dynamic block property to
> toggle between captioned and non-captioned table would be overkill.

Agreed.

> I will commit it if there is no objection.

None ;-)

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Clocktable: Put summary line as table caption
  2012-10-03  7:23       ` Sebastien Vauban
@ 2012-10-04 12:16         ` Nicolas Goaziou
  2012-10-05  8:31           ` Sebastien Vauban
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2012-10-04 12:16 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> You're right. I also thought of that. But that concern is much more general
> than for the clocktables: if any (future) back-end does not support captions
> in his DNA, we will have to foresee a workaround in the export _anyway_,
> something such as copying the text just before or after the figures, tables,
> etc.

Good point, indeed.

>> I will commit it if there is no objection.
>
> None ;-)

Applied. Thank you.

Note: you don't need to mention "TINY CHANGE" since you signed the FSF
papers already.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Clocktable: Put summary line as table caption
  2012-10-04 12:16         ` Nicolas Goaziou
@ 2012-10-05  8:31           ` Sebastien Vauban
  2012-10-05 11:15             ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2012-10-05  8:31 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Nicolas,

Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>
>> You're right. I also thought of that. But that concern is much more general
>> than for the clocktables: if any (future) back-end does not support
>> captions in his DNA, we will have to foresee a workaround in the export
>> _anyway_, something such as copying the text just before or after the
>> figures, tables, etc.
>
> Good point, indeed.
>
>>> I will commit it if there is no objection.
>>
>> None ;-)
>
> Applied. Thank you.

Thanks.

> Note: you don't need to mention "TINY CHANGE" since you signed the FSF
> papers already.

I would say "TINYCHANGE" (without the space) if the documentation on "how to
contribute to Org" is right.

And, yes, you're right (it's even written in
http://orgmode.org/worg/org-contribute.html), there was no need for me to
write it.

Except that, was the patch exactly of the form you expected (ChangeLog, etc.)
-- to apply it as easily as possible?

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Clocktable: Put summary line as table caption
  2012-10-05  8:31           ` Sebastien Vauban
@ 2012-10-05 11:15             ` Nicolas Goaziou
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2012-10-05 11:15 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> I would say "TINYCHANGE" (without the space) if the documentation on "how to
> contribute to Org" is right.

Yes, that was a typo.

> Except that, was the patch exactly of the form you expected (ChangeLog, etc.)
> -- to apply it as easily as possible?

It was perfect :)


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-05 11:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-01 21:20 Clocktable: Put summary line as table caption Sebastien Vauban
2012-10-02 11:31 ` Nicolas Goaziou
2012-10-02 20:23   ` Sebastien Vauban
2012-10-02 21:06     ` Nicolas Goaziou
2012-10-03  7:23       ` Sebastien Vauban
2012-10-04 12:16         ` Nicolas Goaziou
2012-10-05  8:31           ` Sebastien Vauban
2012-10-05 11:15             ` Nicolas Goaziou

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).