all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug] Text macros don't get replaced
@ 2012-06-20 10:08 Sebastien Vauban
  2012-06-20 10:34 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastien Vauban @ 2012-06-20 10:08 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

I'm using text macros, and want them to be replaced both in the text body, but
as well in the title or date of the document:

--8<---------------cut here---------------start------------->8---
#+MACRO: thesoft ABC
#+MACRO: thedate November 2011

#+TITLE:     Data Sheet: {{{thesoft}}}
#+AUTHOR:    {{{thesoft}}}
#+DATE:      Copyright (c) {{{thedate}}}
--8<---------------cut here---------------end--------------->8---

With the old LaTeX exporter, it works for AUTHOR, but not for TITLE nor DATE.

With the new LaTeX exporter, it does work for TITLE and AUTHOR, but not for
DATE.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [bug] Text macros don't get replaced
  2012-06-20 10:08 [bug] Text macros don't get replaced Sebastien Vauban
@ 2012-06-20 10:34 ` Nicolas Goaziou
  2012-06-21  2:57   ` Mike McLean
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2012-06-20 10:34 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hello,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> I'm using text macros, and want them to be replaced both in the text body, but
> as well in the title or date of the document:
>
> #+MACRO: thesoft ABC
> #+MACRO: thedate November 2011
>
> #+TITLE:     Data Sheet: {{{thesoft}}}
> #+AUTHOR:    {{{thesoft}}}
> #+DATE:      Copyright (c) {{{thedate}}}
>
> With the new LaTeX exporter, it does work for TITLE and AUTHOR, but not for
> DATE.

It should be fixed in master.  Thank you.


Regards,

-- 
Nicolas Goaziou

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

* Re: [bug] Text macros don't get replaced
  2012-06-20 10:34 ` Nicolas Goaziou
@ 2012-06-21  2:57   ` Mike McLean
  2012-06-23  9:01     ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Mike McLean @ 2012-06-21  2:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: public-emacs-orgmode-mXXj517/zsQ, Sebastien Vauban





On Jun 20, 2012, at 6:34 AM, Nicolas Goaziou wrote:

> Hello,
> 
> "Sebastien Vauban"
> <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
> 
>> I'm using text macros, and want them to be replaced both in the text body, but
>> as well in the title or date of the document:
>> 
>> #+MACRO: thesoft ABC
>> #+MACRO: thedate November 2011
>> 
>> #+TITLE:     Data Sheet: {{{thesoft}}}
>> #+AUTHOR:    {{{thesoft}}}
>> #+DATE:      Copyright (c) {{{thedate}}}
>> 
>> With the new LaTeX exporter, it does work for TITLE and AUTHOR, but not for
>> DATE.
> 
> It should be fixed in master.  Thank you.

Any chance of getting them to work in Clocktable and/or Dynamic Block lines? Example:

#+MACRO: when lastweek
#+TITLE: Summary Report for {{{when}}}

* Clock Report for {{{when}}}
#+BEGIN: clocktable :block {{{when}}}

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

* Re: [bug] Text macros don't get replaced
  2012-06-21  2:57   ` Mike McLean
@ 2012-06-23  9:01     ` Nicolas Goaziou
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2012-06-23  9:01 UTC (permalink / raw)
  To: Mike McLean; +Cc: public-emacs-orgmode-mXXj517/zsQ, Sebastien Vauban



Hello,

Mike McLean <mike.mclean@pobox.com> writes:

> Any chance of getting them to work in Clocktable and/or Dynamic Block lines? Example:
>
> #+MACRO: when lastweek
> #+TITLE: Summary Report for {{{when}}}
>
> * Clock Report for {{{when}}}
> #+BEGIN: clocktable :block {{{when}}}

For now, that is not possible since macros can allow happen in parsed
data (and dynamic block arguments are not parsed).

Macros may change, though. I'm pondering if they could go back to
a lower (and less safe) level, i.e. before parsing.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2012-06-23  9:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-20 10:08 [bug] Text macros don't get replaced Sebastien Vauban
2012-06-20 10:34 ` Nicolas Goaziou
2012-06-21  2:57   ` Mike McLean
2012-06-23  9:01     ` Nicolas Goaziou

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.