From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Attributes on HTML tables? Date: Thu, 11 Apr 2013 12:55:10 +0200 Message-ID: <87hajds5f5.fsf@gmail.com> References: <86bo9rnj6q.fsf@iro.umontreal.ca> <87ppy66eke.fsf@bzg.ath.cx> <878v4uxjp6.fsf@gmail.com> <87mwtavzgv.fsf@gmail.com> <87haje41ns.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQFA9-0005kv-8J for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 06:55:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQF9w-0002hI-5a for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 06:55:29 -0400 In-Reply-To: (Christian Moe's message of "Thu, 11 Apr 2013 10:28:17 +0200") 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Christian Moe Cc: Bastien , emacs-orgmode@gnu.org Hello, Christian Moe writes: > Nicolas Goaziou writes: >> Caveat: `org-html-table-tag' is now named >> `org-html-table-default-attributes' and expect a plist as its value. >> Also, a nil value will remove the property from the attributes. >> >> Could you test it and confirm this is now behaving in a desirable way? > > I've run some tests and confirm it works as I'd like it to. Thanks, I > really like this and I hope others like the plist syntax as well. Great. Thank you again. > Late thought, sorry: If we can have this plist syntax as a general rule, > perhaps we should nevertheless keep the :options tag just as a fallback, > to ease the transition for users with a lot of legacy attr_html lines? > It's easier and less catastrophe-prone to do a quick search/replace from > > : ^#\+attr_html: > > to > > : #+attr_html: :options > > than it is to automatically replace verbatim attribute code with plists, > especially if there are all sorts of html irregularities in there. I prefer not to mix the two methods as it would be fragile (e.g. what happens if an attribute is defined both outside and inside the :options keyword?). > PS. Though if everything is nice and conforming to xhtml, one should be > able to batch convert files from verbatim html attributes to plist syntax with > something like the following -- USE AT OWN RISK, NO WARRANTY IMPLIED: > > : perl -i.bak -pe 's/([a-z]+)=([\"\'])(.*?)\2/:\1 \2/g if /^#\+attr_html/i' *.org Would you mind adding it to Worg section about the migration to Org 8.0? It would be quite useful. Regards, -- Nicolas Goaziou