emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* variables to get the export date and other export data
@ 2009-04-14 19:08 Daniel Clemente
  2009-04-15 15:02 ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Clemente @ 2009-04-14 19:08 UTC (permalink / raw)
  To: mailing-list-org-mode


Hi,

  just like [TABLE-OF-CONTENTS] inserts the table of contents, are there other variables which will be translated on export? For instance [EXPORT-DATE] to get the export date, [VERSION] for the Org version, [FILE-NAME] for this file's name, …
  Otherwise, dynamic blocks with LISP code can be used, as suggested in a recent message. Only that variables can make this easier for common variables.

  There are also macros like {{{title}}}, {{{author}}}, but they are static (e.g. {{{date}}} is the date the user wrote, not the date at export time).


--Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: variables to get the export date and other export data
  2009-04-14 19:08 variables to get the export date and other export data Daniel Clemente
@ 2009-04-15 15:02 ` Carsten Dominik
  2009-04-22  8:17   ` Daniel Clemente
  0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2009-04-15 15:02 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: mailing-list-org-mode

If you make me a complete list of what you'd like to have, I
can add them to the macros.  I don't want to add more [NAME],
I don't think it is "strange" enough.

- Carsten


On Apr 14, 2009, at 9:08 PM, Daniel Clemente wrote:

>
> Hi,
>
>  just like [TABLE-OF-CONTENTS] inserts the table of contents, are  
> there other variables which will be translated on export? For  
> instance [EXPORT-DATE] to get the export date, [VERSION] for the Org  
> version, [FILE-NAME] for this file's name, …
>  Otherwise, dynamic blocks with LISP code can be used, as suggested  
> in a recent message. Only that variables can make this easier for  
> common variables.
>
>  There are also macros like {{{title}}}, {{{author}}}, but they are  
> static (e.g. {{{date}}} is the date the user wrote, not the date at  
> export time).
>
>
> --Daniel
>
>
>
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: variables to get the export date and other export data
  2009-04-15 15:02 ` Carsten Dominik
@ 2009-04-22  8:17   ` Daniel Clemente
  2009-05-11 20:46     ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Clemente @ 2009-04-22  8:17 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: mailing-list-org-mode

El dc, abr 15 2009, Carsten Dominik va escriure:
>>  just like [TABLE-OF-CONTENTS] inserts the table of contents, are there other
>> variables which will be translated on export? For  instance [EXPORT-DATE] to
>> get the export date, [VERSION] for the Org  version, [FILE-NAME] for this
>> file's name, …
> If you make me a complete list of what you'd like to have, I
> can add them to the macros. 

  I actually only miss the export date, but after seeing for instance what txt2tags (another markup syntax) provides, I think this will cover most needs:

- export date (that is, current date). So that you can say „Page updated on 22/4/2009“. txt2tags for instance has %%date and %%date(format-string), as in %%date(%d-%m-%Y)
- file modification time; useful for instance if you export *all* pages frequently (then the export date would be the same for all even for unmodified pages)
- input file name; useful to say „See the Org source for this page: blabla.org“. It can also have a format string to select whether you want the extension, the full path, etc.
- output file name; only to say „This is page blabla.html“.
- table of contents


> I don't want to add more [NAME],
> I don't think it is "strange" enough.

  Better use longer words like [EXPORT-FILE-NAME], or more Org-like syntax.



  Is there other metainformation that people need at export time?
  Org version? User name? File attributes?



-- Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: variables to get the export date and other export data
  2009-04-22  8:17   ` Daniel Clemente
@ 2009-05-11 20:46     ` Carsten Dominik
  0 siblings, 0 replies; 4+ messages in thread
From: Carsten Dominik @ 2009-05-11 20:46 UTC (permalink / raw)
  To: Daniel Clemente; +Cc: mailing-list-org-mode


On Apr 22, 2009, at 10:17 AM, Daniel Clemente wrote:

> El dc, abr 15 2009, Carsten Dominik va escriure:
>>> just like [TABLE-OF-CONTENTS] inserts the table of contents, are  
>>> there other
>>> variables which will be translated on export? For  instance  
>>> [EXPORT-DATE] to
>>> get the export date, [VERSION] for the Org  version, [FILE-NAME]  
>>> for this
>>> file's name, …
>> If you make me a complete list of what you'd like to have, I
>> can add them to the macros.
>
>  I actually only miss the export date, but after seeing for instance  
> what txt2tags (another markup syntax) provides, I think this will  
> cover most needs:
>
> - export date (that is, current date). So that you can say „Page  
> updated on 22/4/2009“. txt2tags for instance has %%date and % 
> %date(format-string), as in %%date(%d-%m-%Y)

{{{date(FORMAT)}}}

> - file modification time; useful for instance if you export *all*  
> pages frequently (then the export date would be the same for all  
> even for unmodified pages)

{{{modification-time(FORMAT)}}}

> - input file name; useful to say „See the Org source for this page:  
> blabla.org“. It can also have a format string to select whether you  
> want the extension, the full path, etc.

{{{input-file}}}


> - output file name; only to say „This is page blabla.html“.

I did not do this one.


> - table of contents


as before, [TABLE-OF-CONTENTS]


HTH

- Carsten

>
>
>> I don't want to add more [NAME],
>> I don't think it is "strange" enough.
>
>  Better use longer words like [EXPORT-FILE-NAME], or more Org-like  
> syntax.
>
>
>
>  Is there other metainformation that people need at export time?
>  Org version? User name? File attributes?
>
>
>
> -- Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-11 20:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-14 19:08 variables to get the export date and other export data Daniel Clemente
2009-04-15 15:02 ` Carsten Dominik
2009-04-22  8:17   ` Daniel Clemente
2009-05-11 20:46     ` Carsten Dominik

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).