From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baoqiu Cui Subject: Re: Custom docbook stylesheets. Date: Mon, 22 Jun 2009 23:13:30 -0700 Message-ID: References: <9C2D1FA8-9C92-4B8A-8349-A5B767658FC7@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIzGT-0008Ny-27 for emacs-orgmode@gnu.org; Tue, 23 Jun 2009 02:13:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIzGO-0008L6-CT for emacs-orgmode@gnu.org; Tue, 23 Jun 2009 02:13:52 -0400 Received: from [199.232.76.173] (port=47914 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIzGO-0008Ky-6W for emacs-orgmode@gnu.org; Tue, 23 Jun 2009 02:13:48 -0400 Received: from main.gmane.org ([80.91.229.2]:41893 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MIzGN-0003s8-OV for emacs-orgmode@gnu.org; Tue, 23 Jun 2009 02:13:48 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MIzGI-0008In-8I for emacs-orgmode@gnu.org; Tue, 23 Jun 2009 06:13:42 +0000 Received: from nat-dip6.cfw-a-gci.corp.yahoo.com ([209.131.62.115]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Jun 2009 06:13:42 +0000 Received: from cbaoqiu by nat-dip6.cfw-a-gci.corp.yahoo.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Jun 2009 06:13:42 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Dale, Dale Smith writes: > Dale Smith writes: > >>>>> The current org-export-docbook-xslt-proc-command is a format string, >>>>> with a fixed order of arguments (the fo filename and then the input >>>>> docbook filname). Thats probably good enough for most (all?) xslt >>>>> processors, but things may be more limited when it comes to also >>>>> specifying the stylesheet. Do we need to have some kind of special >>>>> markers in the format string for where the different options go? >>>>> Something like $i $o and $s (for in, out, and stysheet)? >>> >>> I thought about doing something similar to make the commands easier to >>> set, but stopped pursuing that after seeing the format string style >>> worked fine. I am not sure if any other Emacs modes/packages have done >>> something like this, i.e. using (semi)named arguments. >> >> Well, it took me a while, but it found it. It's the format-spec >> function. (Actually, http://edward.oconnor.cx/2009/06/format-spec >> clued me in.) >> >> I'll have a go at it today and see if I can send in a patch. > > Ok. This works for me. Docs are not updated. That would push me > over the 10 line limit. ;^) Thanks for working on this patch, which looks very good to me! Yes, I think format-spec is the right way to go, and it does make the command format more flexible. > Now we can easily add other options, like %s for stylesheets or > whatever. Maybe something like %p to set parameters. (As in the > --stringparam option to xsltproc). I like %s (for stylesheets). For %p, I guess we can use it to format a *set* of parameters. > What would be cool is a way to allow the user to *add* custom spec > chars to the default set. (hint hint) Will we make it *too* flexible by doing this? ;-) Thanks again! Baoqiu