emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* sortable columns in html tables
@ 2014-09-29 23:44 David Arroyo Menendez
  2014-09-30 18:11 ` Michael Brand
  0 siblings, 1 reply; 3+ messages in thread
From: David Arroyo Menendez @ 2014-09-29 23:44 UTC (permalink / raw)
  To: emacs-orgmode


Hello,

How can I make sortable columns in tables? I would be useful to edit or
export to html.

Some experiences?

Thanks!

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

* Re: sortable columns in html tables
  2014-09-29 23:44 sortable columns in html tables David Arroyo Menendez
@ 2014-09-30 18:11 ` Michael Brand
  2014-09-30 19:35   ` Cook, Malcolm
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Brand @ 2014-09-30 18:11 UTC (permalink / raw)
  To: David Arroyo Menendez; +Cc: Org Mode

Hi David

On Tue, Sep 30, 2014 at 1:44 AM, David Arroyo Menendez <davidam@gnu.org> wrote:
> How can I make sortable columns in tables? I would be useful to edit or
> export to html.
>
> Some experiences?
>
> Thanks!

As I understand you this pointer might be of interest:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-11/msg00809.html

Michael

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

* Re: sortable columns in html tables
  2014-09-30 18:11 ` Michael Brand
@ 2014-09-30 19:35   ` Cook, Malcolm
  0 siblings, 0 replies; 3+ messages in thread
From: Cook, Malcolm @ 2014-09-30 19:35 UTC (permalink / raw)
  To: 'Michael Brand', 'David Arroyo Menendez'
  Cc: 'Org Mode'

Hi,

The syntax for much of this has changed since that post.

Instead of
#+style:
you will want
#+HTML_HEAD:

And, attaching a class to an exported html table is handled differently too.

Instead of 
	#+attr_html: class="sortable"
you want
	#+attr_html: :class "sortable"

Such declarations also work for exported tables if placed between code blocks that export tables and the result tables (i.e. immediately after the `#+end_src`)

Also, if you want ALL tables to have a class of sortable, you _can_ eval the following

	(plist-put org-html-table-default-attributes :class "sortable")

i.e. by putting it in your emacs init.el 

Or, on a per-buffer basis, which is probably better,  you can put this in your .org file

#+BIND: org-html-table-default-attributes (:border "2" :cellspacing "0" :cellpadding "6" :rules "groups" :frame "hsides"  :class "sortable")

By the way, I don't use sortable, I use dataTable, but the method for getting the class attribute on the html table is the same.

~malcolm_cook

 >-----Original Message-----
 >From: emacs-orgmode-bounces+mec=stowers.org@gnu.org [mailto:emacs-orgmode-bounces+mec=stowers.org@gnu.org] On
 >Behalf Of Michael Brand
 >Sent: Tuesday, September 30, 2014 1:12 PM
 >To: David Arroyo Menendez
 >Cc: Org Mode
 >Subject: Re: [O] sortable columns in html tables
 >
 >Hi David
 >
 >On Tue, Sep 30, 2014 at 1:44 AM, David Arroyo Menendez <davidam@gnu.org> wrote:
 >> How can I make sortable columns in tables? I would be useful to edit or
 >> export to html.
 >>
 >> Some experiences?
 >>
 >> Thanks!
 >
 >As I understand you this pointer might be of interest:
 >http://lists.gnu.org/archive/html/emacs-orgmode/2012-11/msg00809.html
 >
 >Michael


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

end of thread, other threads:[~2014-09-30 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-29 23:44 sortable columns in html tables David Arroyo Menendez
2014-09-30 18:11 ` Michael Brand
2014-09-30 19:35   ` Cook, Malcolm

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