From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: macros: escaping "," and comments Date: Sat, 14 Aug 2010 11:35:51 +0200 Message-ID: <3B3C09E9-CFCE-4F05-82FB-E09E7AE43C8F@gmail.com> References: <1197F101-8BBB-4FF8-8289-47CB2306842A@nf.mpg.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=59619 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OkD9i-0000EA-4t for emacs-orgmode@gnu.org; Sat, 14 Aug 2010 05:35:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OkD9g-0007iX-Lt for emacs-orgmode@gnu.org; Sat, 14 Aug 2010 05:35:58 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:54424) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OkD9g-0007iQ-G3 for emacs-orgmode@gnu.org; Sat, 14 Aug 2010 05:35:56 -0400 Received: by eyg7 with SMTP id 7so819059eyg.0 for ; Sat, 14 Aug 2010 02:35:55 -0700 (PDT) In-Reply-To: <1197F101-8BBB-4FF8-8289-47CB2306842A@nf.mpg.de> 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: Stefan Vollmar Cc: emacs-orgmode Mailinglist On Aug 13, 2010, at 12:02 AM, Stefan Vollmar wrote: > Hello, > > we are currently changing our institute's web site so that staff =20 > members can have a personal page: they can submit Org-mode files =20 > which are then automatically converted to (rather nice) HTML pages. =20= > One advantage is that this allows us to give staff members a lot of =20= > freedom to create content while keeping a "corporate identity" look =20= > (and getting the director's permission in the first place). > > Our template needs a macro in the org template to create a more =20 > "fancy" summary of personal information with a table, a portrait and =20= > some icons (aside: please note that you can create really complex =20 > HTML code this way if necessary). > > Here is a very simple example: > > #+title: test > #+macro: mhead #+html:
email: $1 phone: $2 td>
> > {{{mhead( > somebody@somewhere.org, > 1-234-2134 > )}}} > > Imagine more lines (job description, fax, homepage, etc) and a more =20= > complex table (hidden in a setup file). Having users provide =20 > information in this way is not ideal, but has worked surprisingly =20 > well (the rest of the template is "proper" Org-mode content). > > When creating the Org templates we ran into these problems with Org-=20= > mode 7.01 and Emacs 23.2.1: > > (1) How can we escape "," in the macro call? Ideally, we would need =20= > something like this: > > {{{mhead( > one entry\, still the same entry, > the second variable... This should work - there was a bug, fixed now. > > (2) It would be nice to use something like this: > > {{{mhead( > # Email > somebody@somewhere.org, > # Phone > 1-234-2134 > )}}} > > However, the "#" lines are currently not ignored (as comments) when =20= > expanding the macro, these kind of comment lines would be helpful =20 > when providing templates in general. Not implemented yet... - Carsten > > (3) if, in the above example, we delete the #+title line before the =20= > macro definition, that macro stops working (the macro definition is =20= > not interpreted as such). It seems there must be at least one line =20 > with arbitraty contents before the macro definition (bug?). > > I think, that (1) (maybe it is already possible - apologies if I =20 > overlooked something) and (2) would be useful features in Org-mode. > > Many thanks in advance for any help with this. > > Warm regards, > Stefan > --=20 > Dr. Stefan Vollmar, Dipl.-Phys. > Head of IT group > Max-Planck-Institut f=FCr neurologische Forschung > Gleuelerstr. 50, 50931 K=F6ln, Germany > Tel.: +49-221-4726-213 FAX +49-221-4726-298 > Tel.: +49-221-478-5713 Mobile: 0160-93874279 > Email: vollmar@nf.mpg.de http://www.nf.mpg.de > > > > > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten