emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Stefan Vollmar <vollmar@nf.mpg.de>
Cc: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: macros: escaping "," and comments
Date: Sat, 14 Aug 2010 11:35:51 +0200	[thread overview]
Message-ID: <3B3C09E9-CFCE-4F05-82FB-E09E7AE43C8F@gmail.com> (raw)
In-Reply-To: <1197F101-8BBB-4FF8-8289-47CB2306842A@nf.mpg.de>


On Aug 13, 2010, at 12:02 AM, Stefan Vollmar wrote:

> Hello,
>
> we are currently changing our institute's web site so that staff  
> members can have a personal page: they can submit Org-mode files  
> which are then automatically converted to (rather nice) HTML pages.  
> One advantage is that this allows us to give staff members a lot of  
> freedom to create content while keeping a "corporate identity" look  
> (and getting the director's permission in the first place).
>
> Our template needs a macro in the org template to create a more  
> "fancy" summary of personal information with a table, a portrait and  
> some icons (aside: please note that you can create really complex  
> HTML code this way if necessary).
>
> Here is a very simple example:
>
> #+title: test
> #+macro: mhead #+html: <table><tr><td> email: $1</td><td> phone: $2</ 
> td></tr></table>
>
> {{{mhead(
> somebody@somewhere.org,
> 1-234-2134
> )}}}
>
> Imagine more lines (job description, fax, homepage, etc) and a more  
> complex table (hidden in a setup file). Having users provide  
> information in this way is not ideal, but has worked surprisingly  
> well (the rest of the template is "proper" Org-mode content).
>
> When creating the Org templates we ran into these problems with Org- 
> mode 7.01 and Emacs 23.2.1:
>
> (1) How can we escape "," in the macro call? Ideally, we would need  
> 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  
> expanding the macro, these kind of comment lines would be helpful  
> when providing templates in general.

Not implemented yet...

- Carsten

>
> (3) if, in the above example, we delete the #+title line before the  
> macro definition, that macro stops working (the macro definition is  
> not interpreted as such). It seems there must be at least one line  
> with arbitraty contents before the macro definition (bug?).
>
> I think, that (1) (maybe it is already possible - apologies if I  
> overlooked something) and (2) would be useful features in Org-mode.
>
> Many thanks in advance for any help with this.
>
> Warm regards,
> Stefan
> -- 
> Dr. Stefan Vollmar, Dipl.-Phys.
> Head of IT group
> Max-Planck-Institut für neurologische Forschung
> Gleuelerstr. 50, 50931 Köln, 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

      parent reply	other threads:[~2010-08-14  9:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12 22:02 macros: escaping "," and comments Stefan Vollmar
2010-08-14  8:22 ` Shelagh Manton
2010-08-14  9:35 ` Carsten Dominik [this message]

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=3B3C09E9-CFCE-4F05-82FB-E09E7AE43C8F@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=vollmar@nf.mpg.de \
    /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).