emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Clocktable: Put summary line as table caption
Date: Tue, 02 Oct 2012 22:23:59 +0200	[thread overview]
Message-ID: <80y5jotyg0.fsf@somewhere.org> (raw)
In-Reply-To: 878vbpt8ji.fsf@gmail.com

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

  reply	other threads:[~2012-10-02 20:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80y5jotyg0.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).