Re: [Orgmode] my-mini-table(something)

2009-06-19 Thread Carsten Dominik


On Jun 18, 2009, at 3:11 PM, giovanni.rido...@yahoo.it wrote:



--- Gio 18/6/09, Stefan Vollmar voll...@nf.mpg.de ha scritto:

#+MACRO is exactly what I was looking for.

(1) The release notes of 6.27 say:

Macro processing for export has been enhanced:
- You can use arguments in a macro, for example

#+macro hello Greet the $1: Hello $1
which is just what I had been hoping for! This important
change has not yet made it into org.pdf of the 6.27a
distribution.


 really ?

at page 106 of the pdf version, that you can download from the site,
http://orgmode.org/org.pdf

I can read: Macro replacement!


(2) The next logical step is to collect a number of useful
macros in one include file. However, when I use
#+INCLUDE: ./include.org
which contains the MACRO, the macro expansion does not work
(if the same MACRO statements are part of the org-file where
I use them, they work just fine), all other org content is
included as expected. Is this is a bug?


I think this is a not, yet?, implemented feature ;-)

*Macro processing* is intended *for export* (release notes)
so, I think, Carsten considered only the macros in the
current file/buffer.


I guess the right thing would be in get macro definitions also
from a file linked to by #+SETUPFILE.  This does
now (latest git) work.

- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] my-mini-table(something)

2009-06-18 Thread Giovanni Ridolfi

--- Gio 18/6/09, Stefan Vollmar voll...@nf.mpg.de ha scritto:
 
 For one project, I used several statements like this
 (simplified):
 
 #+HTML: tabletrtdimg
 src=./images/icon.png//tdtdcodesomething/code/td/tr/table
 
 #+HTML: tabletrtdimg
 src=./images/icon.png//tdtdcodeother/code/td/tr/table
 
 The result looks exactly the way we have planned it,
 however, ideally one would want to write:
 
 \my-mini-table(something)
 \my-mini-table(other)
 

+ you can use  yasnippet

http://code.google.com/p/yasnippet/
http://doc.norang.ca/org-mode.html#sec-15.1


+ Or macros? manual, chapter 12.1 Markup rules

Macro replacement
-

You can define text snippets with

   #+MACRO: name   replacement text

which can be referenced anywhere in the document (even in code
 examples) with `{{{name}}}'. 


#+MACRO: my-mt-sth  #+HTML: tabletrtdimg 
src=./images/icon.png//tdtdcodesomething/code/td/tr/table


cheers
Giovanni






___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: Re: [Orgmode] my-mini-table(something)

2009-06-18 Thread giovanni . ridolfi

--- Gio 18/6/09, Stefan Vollmar voll...@nf.mpg.de ha scritto:
 #+MACRO is exactly what I was looking for.
 
 (1) The release notes of 6.27 say:
  Macro processing for export has been enhanced: 
  - You can use arguments in a macro, for example 
 #+macro hello Greet the $1: Hello $1
 which is just what I had been hoping for! This important
 change has not yet made it into org.pdf of the 6.27a
 distribution. 

 really ?

at page 106 of the pdf version, that you can download from the site,
http://orgmode.org/org.pdf

I can read: Macro replacement!

 (2) The next logical step is to collect a number of useful
 macros in one include file. However, when I use
 #+INCLUDE: ./include.org
 which contains the MACRO, the macro expansion does not work
 (if the same MACRO statements are part of the org-file where
 I use them, they work just fine), all other org content is
 included as expected. Is this is a bug?

I think this is a not, yet?, implemented feature ;-)

*Macro processing* is intended *for export* (release notes)
so, I think, Carsten considered only the macros in the 
current file/buffer.

cheers,
Giovanni





___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] my-mini-table(something)

2009-06-18 Thread Sebastian Rose

Ahh - I knew this technique existed. But I tried to find it in the
manual (since I never used yet).

Documentation for this is missing. Maybe mention it in the concept index
would help?


Regards

  Sebastian


diff --git a/doc/org.texi b/doc/org.texi
index a8a6105..77584d4 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -8251,9 +8251,11 @@ Toggle the COMMENT keyword at the beginning of an entry.
 
 @node Macro replacement,  , Comment lines, Markup rules
 @subheading Macro replacement
+...@cindex macro replacement
 
 You can define text snippets with
 
+...@cindex #+MACRO:
 @example
 #+MACRO: name   replacement text
 @end example
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode