From mboxrd@z Thu Jan 1 00:00:00 1970 From: pinard@iro.umontreal.ca (=?utf-8?Q?Fran=C3=A7ois?= Pinard) Subject: ATTR_HTML for a clickable image, howto? Date: Sun, 01 Apr 2012 17:27:00 -0400 Message-ID: <86pqbrywgr.fsf@iro.umontreal.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SESIj-0004Pj-4N for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 17:27:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SESIh-0001fN-Gr for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 17:27:04 -0400 Received: from 206-248-137-202.dsl.teksavvy.com ([206.248.137.202]:59585 helo=mercure.progiciels-bpi.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SESIh-0001dy-BJ for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 17:27:03 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, Org mode friends. I just got a slight difficulty for which some of you may have an advice. My source looks like this: --8<---------------cut here---------------start------------->8--- #+ATTR_HTML: align=3D"right" [[file:2011-06-04-gazou-passeport.png][file:2011-06-04-gazou-passeport-peti= t.jpg]] --8<---------------cut here---------------end--------------->8--- and once converted to HTML, yields (reformatted for legibility): --8<---------------cut here---------------start------------->8--- 3D"2011-06-04-gazou-passeport-petit.jpg"/ --8<---------------cut here---------------end--------------->8--- The ATTR_HTML details got applied to the tag while I wanted them to be on the tag. If I hand-edit the result so it is: --8<---------------cut here---------------start------------->8--- 3D"2011-06-04-gazou-passeport-petit.jpg" --8<---------------cut here---------------end--------------->8--- then I get the display I wanted. Is there a way for having #+ATTR_HTML to be applied to the inner tag instead of the outer one? Fran=C3=A7ois From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: ATTR_HTML for a clickable image, howto? Date: Mon, 02 Apr 2012 10:14:21 +0200 Message-ID: <87r4w63602.fsf@gnu.org> References: <86pqbrywgr.fsf@iro.umontreal.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEcNx-00062o-Im for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 04:13:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEcNv-00079c-Ov for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 04:13:09 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:54011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEcNv-00079P-F8 for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 04:13:07 -0400 Received: by wibhj13 with SMTP id hj13so1907202wib.12 for ; Mon, 02 Apr 2012 01:13:05 -0700 (PDT) In-Reply-To: <86pqbrywgr.fsf@iro.umontreal.ca> (=?iso-8859-1?Q?=22Fran=E7o?= =?iso-8859-1?Q?is?= Pinard"'s message of "Sun, 01 Apr 2012 17:27:00 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?iso-8859-1?Q?Fran=E7ois?= Pinard Cc: emacs-orgmode@gnu.org Hi François, pinard@iro.umontreal.ca (François Pinard) writes: > then I get the display I wanted. Is there a way for having #+ATTR_HTML > to be applied to the inner tag instead of the outer one? Not -- it would not make sense. I suggest you fix your css instead. Best, -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: ATTR_HTML for a clickable image, howto? Date: Mon, 02 Apr 2012 12:34:06 +0200 Message-ID: <4F79809E.6010406@christianmoe.com> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEeaL-0008No-8V for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 06:34:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEeaE-0007uO-MD for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 06:34:04 -0400 Received: from b1.hitrost.net ([91.185.211.67]:34706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEeaE-0007oH-FU for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 06:33:58 -0400 In-Reply-To: <87r4w63602.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: =?ISO-8859-1?Q?Fran=E7ois_Pinard?= , emacs-orgmode@gnu.org François's problem is probably best fixed with CSS as you suggest. But it might be nice to be able to set an ALT attribute on an image used as a link. That doesn't look like it's currently possible with Org link syntax and ATTR_HTML. Just pointing it out, not making a feature request -- should I need to use image links, I'm fine with solving this with verbatim HTML. Yours, Christian On 4/2/12 10:14 AM, Bastien wrote: > Hi François, > > pinard@iro.umontreal.ca (François Pinard) writes: > >> then I get the display I wanted. Is there a way for having #+ATTR_HTML >> to be applied to the inner tag instead of the outer one? > > Not -- it would not make sense. > > I suggest you fix your css instead. > > Best, > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: ATTR_HTML for a clickable image, howto? Date: Mon, 02 Apr 2012 17:06:34 +0200 Message-ID: <8762dixjet.fsf@gnu.org> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <4F79809E.6010406@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEioy-0006RB-3A for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 11:05:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEioq-0002fk-Ju for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 11:05:27 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:59675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEioq-0002fK-Bf for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 11:05:20 -0400 Received: by wgbds1 with SMTP id ds1so2487408wgb.0 for ; Mon, 02 Apr 2012 08:05:18 -0700 (PDT) In-Reply-To: <4F79809E.6010406@christianmoe.com> (Christian Moe's message of "Mon, 02 Apr 2012 12:34:06 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: mail@christianmoe.com Cc: =?iso-8859-1?Q?Fran=E7ois?= Pinard , emacs-orgmode@gnu.org Hi Christian, Christian Moe writes: > François's problem is probably best fixed with CSS as you suggest. > > But it might be nice to be able to set an ALT attribute on an image used as > a link. That doesn't look like it's currently possible with Org link syntax > and ATTR_HTML. Agreed -- this is where Nicolas' new export engine will help, with a more comprehensive syntax for each element. > Just pointing it out, not making a feature request -- should I need to use > image links, I'm fine with solving this with verbatim HTML. Sure. Thanks for insisting on this anyway! Best, -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: ATTR_HTML for a clickable image, howto? Date: Mon, 2 Apr 2012 14:30:20 -0700 Message-ID: References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <4F79809E.6010406@christianmoe.com> <8762dixjet.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEopU-0004UL-Tj for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 17:30:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEopT-0007ES-5u for emacs-orgmode@gnu.org; Mon, 02 Apr 2012 17:30:24 -0400 In-Reply-To: <8762dixjet.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: =?UTF-8?Q?Fran=C3=A7ois_Pinard?= , emacs-orgmode@gnu.org, mail@christianmoe.com On 2012-04-02, Bastien wrote: > Agreed -- this is where Nicolas' new export engine will help, > with a more comprehensive syntax for each element. Is there a description of this part someplace? Do you mean new syntax or better semantics for existing syntax? While the new exporter has advantages, I hope the old exporter will still be available for a long time. I will need it for various purposes, including speed -- I use it for an exact word counter that works flawlessly -- and some design differences from the new exporter. (Also the new exporter does not currently work on 22.) -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: ATTR_HTML for a clickable image, howto? Date: Tue, 03 Apr 2012 07:42:06 +0200 Message-ID: <87ehs5s769.fsf@gnu.org> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <4F79809E.6010406@christianmoe.com> <8762dixjet.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEwUA-0005VY-Vv for emacs-orgmode@gnu.org; Tue, 03 Apr 2012 01:40:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEwU9-0001AO-7r for emacs-orgmode@gnu.org; Tue, 03 Apr 2012 01:40:54 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:52787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEwU8-0001A9-UV for emacs-orgmode@gnu.org; Tue, 03 Apr 2012 01:40:53 -0400 Received: by wgbdr1 with SMTP id dr1so2484717wgb.30 for ; Mon, 02 Apr 2012 22:40:51 -0700 (PDT) In-Reply-To: (Samuel Wales's message of "Mon, 2 Apr 2012 14:30:20 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: =?iso-8859-1?Q?Fran=E7ois?= Pinard , emacs-orgmode@gnu.org, mail@christianmoe.com Hi Samuel, Samuel Wales writes: > On 2012-04-02, Bastien wrote: >> Agreed -- this is where Nicolas' new export engine will help, >> with a more comprehensive syntax for each element. > > Is there a description of this part someplace? The reference document for the new org-export.el lives here: http://orgmode.org/worg/dev/org-export-reference.html > Do you mean new syntax > or better semantics for existing syntax? I mean "a better description of all possible properties for any syntactic element." It should be clear by just skimming through the link above. > While the new exporter has advantages, I hope the old exporter will > still be available for a long time. I will need it for various > purposes, including speed -- I use it for an exact word counter that > works flawlessly -- and some design differences from the new exporter. > (Also the new exporter does not currently work on 22.) Good to know. We will try to keep things as backward compatible as possible. There is no plan to destroy existing code anyway. Thanks, -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: pinard@iro.umontreal.ca (=?utf-8?Q?Fran=C3=A7ois?= Pinard) Subject: Re: ATTR_HTML for a clickable image, howto? Date: Thu, 05 Apr 2012 11:02:55 -0400 Message-ID: <86vclekyqo.fsf@iro.umontreal.ca> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFoDQ-0005dx-8a for emacs-orgmode@gnu.org; Thu, 05 Apr 2012 11:03:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFoDE-0003aj-Jt for emacs-orgmode@gnu.org; Thu, 05 Apr 2012 11:03:09 -0400 Received: from 206-248-137-202.dsl.teksavvy.com ([206.248.137.202]:65043 helo=mercure.progiciels-bpi.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFoDE-0003aF-BQ for emacs-orgmode@gnu.org; Thu, 05 Apr 2012 11:03:00 -0400 In-Reply-To: <87r4w63602.fsf@gnu.org> (Bastien's message of "Mon, 02 Apr 2012 10:14:21 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org Bastien writes: >> then I get the display I wanted. Is there a way for having #+ATTR_HTML >> to be applied to the inner tag instead of the outer one? > Not -- it would not make sense. Hello, Bastien. I understand what you mean by saying it does not make sense with the current mechanics. Yet, from a user perspective, it surely makes sense hoping that Org offers a way for adding attributes to either part of a link, as links are kind of indivisible (so far that I know). > I suggest you fix your css instead. My knowledge of CSS is rudimentary. I'm not aware that CSS (the version widely available, not the incoming one) has enough matching capabilities to spot wrong HTML, remove attributes on some elements and add them on other elements. Is that really possible? Should I dive and study CSS more? Without matching, CSS would not help much, as the correction is needed in three dozen cases at most, and not blindly for all images. I could ponder using XSL or something else to post-process the HTML generated by Org, so circumventing the limitation. This would be adding an unwelcome layer of complexity. I like to perceive Org as a tool which much simplify my life! :-). Fran=C3=A7ois From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: ATTR_HTML for a clickable image, howto? Date: Thu, 5 Apr 2012 16:34:38 -0700 Message-ID: References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <4F79809E.6010406@christianmoe.com> <8762dixjet.fsf@gnu.org> <87ehs5s769.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFwCS-00028w-8c for emacs-orgmode@gnu.org; Thu, 05 Apr 2012 19:34:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFwCQ-00058U-IA for emacs-orgmode@gnu.org; Thu, 05 Apr 2012 19:34:43 -0400 In-Reply-To: <87ehs5s769.fsf@gnu.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: =?UTF-8?Q?Fran=C3=A7ois_Pinard?= , emacs-orgmode@gnu.org, mail@christianmoe.com On 2012-04-02, Bastien wrote: > I mean "a better description of all possible properties for any > syntactic element." It should be clear by just skimming through > the link above. Makes sense. > Good to know. We will try to keep things as backward compatible as > possible. There is no plan to destroy existing code anyway. Very good news. Thanks. -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: ATTR_HTML for a clickable image, howto? Date: Fri, 06 Apr 2012 10:52:41 +0200 Message-ID: <4F7EAED9.2040804@christianmoe.com> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SG4uD-0004Oq-Rc for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 04:52:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SG4u9-0000YI-1u for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 04:52:29 -0400 In-Reply-To: <86vclekyqo.fsf@iro.umontreal.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?UTF-8?B?RnJhbsOnb2lzIFBpbmFyZA==?= Cc: emacs-orgmode@gnu.org Hi, On 4/5/12 5:02 PM, François Pinard wrote: > I understand what you mean by saying it does not make sense with the > current mechanics. Yet, from a user perspective, it surely makes sense > hoping that Org offers a way for adding attributes to either part of a > link, as links are kind of indivisible (so far that I know). On reflection, there might be a case for making the exporter smart enough not to place #+ATTR_HTML attributes such as ALT, WIDTH and HEIGHT (or even ALIGN, though see below) in the element, where they have no place, but instead pass them through to the clickable image, where they obviously belong. >> I suggest you fix your css instead. > > My knowledge of CSS is rudimentary. I'm not aware that CSS (the version > widely available, not the incoming one) has enough matching capabilities > to spot wrong HTML, remove attributes on some elements and add them on > other elements. Is that really possible? Should I dive and study CSS > more? Without matching, CSS would not help much, as the correction is > needed in three dozen cases at most, and not blindly for all images. No, CSS doesn't move attributes around. But the ALIGN attribute has long been deprecated in favor of CSS. All the CSS needed to right-align all images that are children of a link anchor is: a img {float: right;} (There are other, more complex ways to control horizontal alignment in CSS.) To set this on a per-document basis in Org, use: #+STYLE: If you need more fine-grained control, you could use e.g.: a.rightaligned img {float: right;} where "rightaligned" is an arbitrary name, you could call the class "alignright" or "right" or "rt" or whatever. Then you could set the "rightaligned" class on all links you want right-aligned: #+ATTR_HTML: class="rightaligned" [[./targetimage.png][./linkimage.png]] Note that it's still the element that gets the class. In this case, the CSS applies to all child elements of elements. For this particular purpose, though, that CSS may be overkill; looks to me like you get the same visual result by just styling directly. So here's the whole CSS for right-aligning any block element on which you can set the CLASS to "rightaligned" with ATTR_HTML: .rightaligned {float: right;} > I could ponder using XSL or something else to post-process the HTML > generated by Org, so circumventing the limitation. This would be adding > an unwelcome layer of complexity. I like to perceive Org as a tool > which much simplify my life! :-). Any problem you can solve with a single line of simple CSS, you can probably solve with a deprecated tag, several lines of complicated XSL, and a postprocessing hook in Org to issue a shell command to an XSLT processor... But why would you? If you like Org for its simplicity, you will love CSS. Yours, Christian From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: ATTR_HTML for a clickable image, howto? Date: Fri, 06 Apr 2012 11:02:12 +0200 Message-ID: <87aa2pi67f.fsf@altern.org> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SG52d-0006k5-IO for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 05:01:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SG52V-0002iu-20 for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 05:01:11 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:45340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SG52U-0002ie-OR for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 05:01:02 -0400 Received: by wibhj13 with SMTP id hj13so287364wib.12 for ; Fri, 06 Apr 2012 02:00:58 -0700 (PDT) In-Reply-To: <86vclekyqo.fsf@iro.umontreal.ca> (=?iso-8859-1?Q?=22Fran=E7o?= =?iso-8859-1?Q?is?= Pinard"'s message of "Thu, 05 Apr 2012 11:02:55 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?iso-8859-1?Q?Fran=E7ois?= Pinard Cc: emacs-orgmode@gnu.org Hi François, pinard@iro.umontreal.ca (François Pinard) writes: > I understand what you mean by saying it does not make sense with the > current mechanics. Yet, from a user perspective, it surely makes sense > hoping that Org offers a way for adding attributes to either part of a > link, as links are kind of indivisible (so far that I know). Agreed. But remember we are in kind of a transition from the current exporter to the new ones, so efforts on fixing problems with the current one are less pressing than trying to move to the new ones. >> I suggest you fix your css instead. > > My knowledge of CSS is rudimentary. I'm not aware that CSS (the version > widely available, not the incoming one) has enough matching capabilities > to spot wrong HTML, remove attributes on some elements and add them on > other elements. Is that really possible? #+ATTR_HTML: align="right" id="my_css_id_for_this_anchor" [[file:2011-06-04-gazou-passeport.png][file:2011-06-04-gazou-passeport-petit.jpg]] Then in your css: a.my_css_id_for_this_anchor > img {...} > Should I dive and study CSS more? Everyone should, no ? :) > Without matching, CSS would not help much, as the correction is > needed in three dozen cases at most, and not blindly for all images. See above. HTH, -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: ATTR_HTML for a clickable image, howto? Date: Fri, 06 Apr 2012 11:29:58 +0200 Message-ID: <4F7EB796.2010703@christianmoe.com> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SG5Tn-0006d7-RO for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 05:29:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SG5Te-0003Ya-1a for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 05:29:15 -0400 Received: from b1.hitrost.net ([91.185.211.67]:48764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SG5Td-0003Xz-Rp for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 05:29:05 -0400 In-Reply-To: <4F7EAED9.2040804@christianmoe.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: mail@christianmoe.com Cc: =?UTF-8?B?RnJhbsOnb2lzIFBpbmFyZA==?= , emacs-orgmode@gnu.org On 4/6/12 10:52 AM, Christian Moe wrote: > All the CSS needed to right-align all images that are children of a > link anchor is: > > a img {float: right;} Correction: that's "descendants" of a link anchor, not just "children". If you need to limit this to images that are direct children of link anchors, use the selector a > img {...} (Don't think that comes up much in practice, but if you have text links with inline images, e.g. fancy bullets or dvipng'd latex formulas, the code I posted first would not be what you wanted.) Christian From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: ATTR_HTML for a clickable image, howto? Date: Fri, 6 Apr 2012 11:41:28 -0700 Message-ID: References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGE6G-0003zl-Ln for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 14:41:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SGE6E-0001qw-Sm for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 14:41:32 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:45373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGE6E-0001qo-Lx for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 14:41:30 -0400 Received: by iajr24 with SMTP id r24so4303648iaj.0 for ; Fri, 06 Apr 2012 11:41:29 -0700 (PDT) In-Reply-To: <4F7EAED9.2040804@christianmoe.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: mail@christianmoe.com Cc: =?UTF-8?Q?Fran=C3=A7ois_Pinard?= , emacs-orgmode@gnu.org Christian and others, Will CSS solutions described in this thread work if you always export subtrees (not entire .org files) and never include style files? If so, how do you go about using them in Org? Is there a less awkward way than using an HTML block with a div with style=? This is awkward as you have to do it for every such block: #+HTML:
It would be great to have a generic style of some sort, specify the scoped Org elements with neat syntax (maybe like #+myblock_begin:) instead of HTML blocks, and to be able to export it for subtrees (not entire .org files!) in a completely self-contained way with no need to include any file. An example use case is Blogger, where you /could/ try to change the CSS for your template, but it is far better to have your post be entirely self-contained with all the style information you need. Maybe this question deserves its own thread? Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: ATTR_HTML for a clickable image, howto? Date: Fri, 6 Apr 2012 11:45:11 -0700 Message-ID: References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGE9r-0005bt-DO for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 14:45:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SGE9p-0002ob-PM for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 14:45:14 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:47362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGE9p-0002oQ-EQ for emacs-orgmode@gnu.org; Fri, 06 Apr 2012 14:45:13 -0400 Received: by iajr24 with SMTP id r24so4308373iaj.0 for ; Fri, 06 Apr 2012 11:45:11 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: mail@christianmoe.com Cc: =?UTF-8?Q?Fran=C3=A7ois_Pinard?= , emacs-orgmode@gnu.org On 2012-04-06, Samuel Wales wrote: > It would be great to have a generic style of some sort, specify the > scoped Org elements with neat syntax (maybe like #+myblock_begin:) Oops, if we did it this way it would be like #+begin_mycolor ... #+end_mycolor of course. But again, entirely self-contained. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: ATTR_HTML for a clickable image, howto? Date: Sat, 07 Apr 2012 15:15:08 +0200 Message-ID: <4F803DDC.20808@christianmoe.com> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGVTX-0005p0-JT for emacs-orgmode@gnu.org; Sat, 07 Apr 2012 09:14:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SGVTV-0000LO-PQ for emacs-orgmode@gnu.org; Sat, 07 Apr 2012 09:14:43 -0400 Received: from b1.hitrost.net ([91.185.211.67]:52366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGVTV-00088c-F6 for emacs-orgmode@gnu.org; Sat, 07 Apr 2012 09:14:41 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: =?UTF-8?B?RnJhbsOnb2lzIFBpbmFyZA==?= , emacs-orgmode@gnu.org Hi, Samuel, On 4/6/12 8:41 PM, Samuel Wales wrote: > Christian and others, > > Will CSS solutions described in this thread work if you always export > subtrees (not entire .org files) and never include style files? Yes, CSS styles apply to exported subtrees as well, whether from the default stylesheet, linked external stylesheets, or #+STYLE headers. But this applies to the static html files as exported by Org. If I understand your drift, you're thinking about using it in a content management system (CMS) like Blogger. A CMS will typically store only the content of your document and substitute its own template for the HEAD section where style information goes. Then these solutions won't work without modifying CSS in your CMS. > If so, how do you go about using them in Org? Is there a less awkward > way than using an HTML block with a div with style=? > This is awkward as you have to do it for every such block: > > #+HTML:
You can edit the CSS template of your CMS to take advantage of the classes and ids Org applies to its HTML exports. - You can also apply your own classes to subtrees using the :HTML_CONTAINER_CLASS: property, and style individual subtrees by id from :CUSTOM_ID:. - You can use #+ATTR_HTML to add class, id or style attributes to /some/ elements, and my understanding is that the new exporter that is in the works will help do this more systematically. - You can enclose blocks in custom block classes (
) with org-special-blocks (#+BEGIN_FOO), or with verbatim HTML. See the Org manual: - 12.5.9, "CSS support" Locally applying CSS to elements with the STYLE attribute, the very lowest level of the cascade, should be the last resort. > It would be great to have a generic style of some sort, specify the > scoped Org elements with neat syntax (maybe like [you meant to say:] #+begin_mycolor ... #+end_mycolor > instead of HTML blocks, and to be able to export it for subtrees (not > entire .org files!) in a completely self-contained way with no need to > include any file. Well, if you still want to apply local CSS formatting, but without writing verbatim HTML all the time, it gets a little more involved. Org-special-blocks doesn't help here as it only sets a class attribute for style sheets to select, it does not set the style attribute. Still: - You can simplify repeated use with macros. See the manual, section 11.6. Use the @ notation (section 12.5.3) for literal html tags within the macros. E.g.: #+MACRO: mycolor @$1@ {{{mycolor(Here I'd like some black text on an orange background.)}}} - You could probably also use Eric Schulte's contributed org-exp-blocks.el, but you'd need to write some code, and it might be overkill for this purpose. > An example use case is Blogger, where you /could/ try to change the > CSS for your template, but it is far better to have your post be > entirely self-contained with all the style information you need. Depends on your use case, I guess, but I think it would nearly always be a better, simpler, cleaner solution to modify your Blogger CSS. Yours, Christian From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: ATTR_HTML for a clickable image, howto? Date: Tue, 10 Apr 2012 16:53:43 -0700 Message-ID: References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHl0X-0007aA-Nk for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 20:01:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHl0V-00086I-BY for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 20:01:57 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:42443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHksb-0005Yg-HV for emacs-orgmode@gnu.org; Tue, 10 Apr 2012 19:53:45 -0400 Received: by mail-iy0-f169.google.com with SMTP id r24so541805iaj.0 for ; Tue, 10 Apr 2012 16:53:43 -0700 (PDT) In-Reply-To: <4F803DDC.20808@christianmoe.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: mail@christianmoe.com Cc: =?UTF-8?Q?Fran=C3=A7ois_Pinard?= , emacs-orgmode@gnu.org Hi Christian, Thanks for your reply. I left implicit the question of whether this can solve OP's problem also, but believe it is potentially related. However, if I understood CSS well enough to ask the question precisely, I'd have the answer. So bear with me. More below: On 2012-04-07, Christian Moe wrote: >> Will CSS solutions described in this thread work if you always export >> subtrees (not entire .org files) and never include style files? > > Yes, CSS styles apply to exported subtrees as well, whether from the > default stylesheet, linked external stylesheets, or #+STYLE headers. Hmm, I think I should have specified further. I mean org-export-region-as-html. The raw HTML without any head section, files, stylesheets, or anything else. So for example, could the OP and I use styles that are specified with div style= wrapping the entire output? Seems a simple addition to the exporter or even a defadvice, but I don't know if it would work as I don't know what the CSS would look like well enough to try it. The critical thing is to avoid all dependency on anything external like a stylesheet. The goal is to keep all information in your file under Org control, including style. > But this applies to the static html files as exported by Org. If I > understand your drift, you're thinking about using it in a content > management system (CMS) like Blogger. A CMS will typically store only > the content of your document and substitute its own template for the > HEAD section where style information goes. Then these solutions won't > work without modifying CSS in your CMS. Not even with wrapping the entire output in a div? > You can edit the CSS template of your CMS to take advantage of the > classes and ids Org applies to its HTML exports. The idea is to avoid a dependency like that if possible. > - You can use #+ATTR_HTML to add class, id or style attributes to > /some/ elements, and my understanding is that the new exporter that is > in the works will help do this more systematically. Wondering if you can control this under my additional requirements using inheritance from higher-level constructs like a div wrapper around the whole export. > - You can enclose blocks in custom block classes (
) > with org-special-blocks (#+BEGIN_FOO), or with verbatim HTML. Yes, this is where I was leading. But it's no good for my purposes if you can't use CSS directly in your Org file without any header or external files. > Locally applying CSS to elements with the STYLE attribute, the very > lowest level of the cascade, should be the last resort. Right. :) > - You can simplify repeated use with macros. See the manual, section > 11.6. Use the @ notation (section 12.5.3) for literal html tags within > the macros. E.g.: > > #+MACRO: mycolor @$1@ I've tried macros for image specification, but ran into a variety of issues getting it to work well. > {{{mycolor(Here I'd like some black text on an orange background.)}}} For paragraphs and sections and quotes and so on, the #+ blocks would work better. Not sure if {{{}}} would nest? Or be noticeable. That seems much better for spans of text, not so much for standalone images and sections with more than one paragraph, lists, etc. > - You could probably also use Eric Schulte's contributed > org-exp-blocks.el, but you'd need to write some code, and it might be > overkill for this purpose. I was wondering if this would be useful too. > Depends on your use case, I guess, but I think it would nearly always > be a better, simpler, cleaner solution to modify your Blogger CSS. OK. But my desire not to depend on the cloud is large enough that I have to go back to the raw HTML method. I want this to work no matter who I give the HTML file (singular) to. Assuming it's possible -- if not I will just keep using raw HTML. This is not a critical issue, but I thought it could expand the OP's conversation to include a general solution for everybody if it works. Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: ATTR_HTML for a clickable image, howto? Date: Wed, 11 Apr 2012 10:11:57 +0200 Message-ID: <4F853CCD.4020601@christianmoe.com> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHseB-00063S-Mj for emacs-orgmode@gnu.org; Wed, 11 Apr 2012 04:11:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHse5-0007hX-AG for emacs-orgmode@gnu.org; Wed, 11 Apr 2012 04:11:23 -0400 Received: from b1.hitrost.net ([91.185.211.67]:49255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHse5-0007dg-0H for emacs-orgmode@gnu.org; Wed, 11 Apr 2012 04:11:17 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales , Org Mode Hi again, On 4/11/12 1:53 AM, Samuel Wales wrote: >>> Will CSS solutions described in this thread work if you always export >>> subtrees (not entire .org files) and never include style files? >> >> Yes, CSS styles apply to exported subtrees as well, whether from the >> default stylesheet, linked external stylesheets, or #+STYLE headers. > > Hmm, I think I should have specified further. I mean > org-export-region-as-html. The raw HTML without any head section, > files, stylesheets, or anything else. Are those two separate questions, perhaps? I tried with org-export-as-region, and I still got the full HEAD section. So the solutions I posted to François should still work with that function. However, they would not work when the exported HTML is stripped of the HEAD section. > > So for example, could the OP and I use styles that are specified with > div style= wrapping the entire output? Seems a simple addition to the > exporter or even a defadvice, but I don't know if it would work as I > don't know what the CSS would look like well enough to try it. No doubt there's some way you could wrap everything inside the section in a
, but any CSS in its STYLE attribute would apply to that div element as a whole, i.e. to all the contents, not selectively to bits and parts inside it. That's probably not what you want. > > The critical thing is to avoid all dependency on anything external > like a stylesheet. The goal is to keep all information in your file > under Org control, including style. Maybe it's the wrong goal. :-) But if that's what you want to do, the current options for doing local STYLE= formatting that I can think of are the same as for setting classes or ids: 1. #+attr_html on some elements, and 2. verbatim HTML with #+HTML or with the `@' notation; repeated use of which could be simplified with (a mix of) 3. macros; 4. org-exp-blocks.el; 5. custom link types (didn't mention that yet, see: http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-10-3); or even 6. Babel src and call commands (very exotic for the purpose of formatting a bit of html). Beyond that, we'd need something like the extensible syntax you have proposed previously. Personally, I'm looking forward to Nicolas Gouaziou's exporter, which I believe will handle ATTR commands in a more systematic way. >> (...) Then these solutions won't >> work without modifying CSS in your CMS. > > Not even with wrapping the entire output in a div? I don't think so. >> You can edit the CSS template of your CMS to take advantage of the >> classes and ids Org applies to its HTML exports. > > The idea is to avoid a dependency like that if possible. OK. Even so, though, the CMS will probably apply its own stylesheet by default, and there's a small but non-zero chance it will interact with your local formatting in ways you don't want; e.g., the orange text background you specify clashes horribly with off-peach surroundings... So you may end up having to edit stylesheets anyway. >> - You can use #+ATTR_HTML to add class, id or style attributes to >> /some/ elements, and my understanding is that the new exporter that is >> in the works will help do this more systematically. > > Wondering if you can control this under my additional requirements > using inheritance from higher-level constructs like a div wrapper > around the whole export. Not quite sure what you have in mind, but I don't think so. >> - You can enclose blocks in custom block classes (
) >> with org-special-blocks (#+BEGIN_FOO), or with verbatim HTML. > > Yes, this is where I was leading. But it's no good for my purposes if > you can't use CSS directly in your Org file without any header or > external files. No, not if you can't or won't control what stylesheets will be applied. >> [...] >> - You can simplify repeated use with macros. [...] > For paragraphs and sections and quotes and so on, the #+ blocks would > work better. Not sure if {{{}}} would nest? Yes, macros will nest. (As opposed to custom links.) E.g.: #+MACRO: mycolor @$1@ #+MACRO: blue @$1@ #+MACRO: red @$1@ {{{mycolor(This is a single paragraph where I'd like text on an orange background\, {{{blue(except where I want a blue blackground and some {{{red(red)}}} in between)}}}.)}}} > Or be noticeable. That > seems much better for spans of text, not so much for standalone images > and sections with more than one paragraph, lists, etc. You may be right. I have had success adding a block-level element (DIV) with a macro, but I had to take special care to close the preceding P tag to get valid xhtml. That's why in the example I gave, I used the macro to wrap the whole text content of the block in a SPAN, rather than a DIV. There are other drawbacks, such as needing to backslash-escape any commas (as in the above example). And extensive use of macros looks terribly messy in Org source, though the same is likely true for any other extensive use of means to local formatting. Yours, Christian From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: ATTR_HTML for a clickable image, howto? Date: Fri, 11 May 2012 17:43:07 -0700 Message-ID: References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ST0QT-0002eE-Em for emacs-orgmode@gnu.org; Fri, 11 May 2012 20:43:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ST0QR-0003oX-Az for emacs-orgmode@gnu.org; Fri, 11 May 2012 20:43:13 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:58293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ST0QR-0003oC-2e for emacs-orgmode@gnu.org; Fri, 11 May 2012 20:43:11 -0400 Received: by obbwd18 with SMTP id wd18so4928743obb.0 for ; Fri, 11 May 2012 17:43:08 -0700 (PDT) In-Reply-To: <4F853CCD.4020601@christianmoe.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: mail@christianmoe.com Cc: Org Mode Hi Christian, Thanks for your thoughtful comments. I have a better understanding of it now. Here is more as a sort of summary for searchers. On 2012-04-11, Christian Moe wrote: > Are those two separate questions, perhaps? I tried with > org-export-as-region, and I still got the full HEAD section. So the I mean this: "If prefix arg body-only is set, omit file header, footer, and table of contents, and only produce the region of converted text, useful for cut-and-paste operations." (from the docstring). Blogger (and many other places online) already has a HEAD section, and my understanding is that you can't have 2 HEAD sections. (I presume there does not exist a "HEAD-APPEND" section in the HTML standard.) So letting Org produce the HEAD section seems to be not possible here. > No doubt there's some way you could wrap everything inside the > section in a
, but any CSS in its STYLE attribute would apply to > that div element as a whole, i.e. to all the contents, not selectively > to bits and parts inside it. That's probably not what you want. To summarize, it appears as if you can't use full CSS (like "whatever { whatever: whatever; }") as a wrapper at all in the body section, so you need a HEAD section or a separate CSS file to be able to style specific types of elements the way it is normally done. The rough Lisp analogy seems to be that you cannot use let to bind a variable that is used in various places, but you can use setq (in a section that can only be used once) or load. That's the answer I was looking for. I looked it up more and it seems to be the case. Thanks. > 4. org-exp-blocks.el; I don't understand this enough yet to know how much effort would be required. Good to know you think it might work. Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Fran=C3=A7ois_Pinard?= Subject: Re: ATTR_HTML for a clickable image, howto? Date: Sat, 19 May 2012 20:39:01 -0400 Message-ID: <86vcjrr8ii.fsf@mercure.progiciels-bpi.ca> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVuAs-0005mx-5u for emacs-orgmode@gnu.org; Sat, 19 May 2012 20:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVuAq-0008UB-Bk for emacs-orgmode@gnu.org; Sat, 19 May 2012 20:39:05 -0400 Received: from 206-248-137-202.dsl.teksavvy.com ([206.248.137.202]:60554 helo=mercure.progiciels-bpi.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVuAq-0008Tw-5w for emacs-orgmode@gnu.org; Sat, 19 May 2012 20:39:04 -0400 In-Reply-To: <4F803DDC.20808@christianmoe.com> (Christian Moe's message of "Sat, 07 Apr 2012 15:15:08 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Christian Moe writes: > - You can simplify repeated use with macros. See the manual, section=20 > 11.6. Use the @ notation (section 12.5.3) for literal html tags within=20 > the macros. E.g.: > #+MACRO: mycolor @ #f4a460">$1@ > {{{mycolor(Here I'd like some black text on an orange background.)}}} Hi, Christian, and everybody. Just curious... Would the mere need of the comma in a text ruin the idea? Commas are pretty common, aren't they? Can they be quoted? Fran=C3=A7ois P.S. Proper quoting in Org is a bit of a mystery to me. How does one quote one or more =3D within =3D's, or * within *'s, etc.? Backslashes sometimes help, sometimes go through. I never was in control, and whenever I have an unusual need in that area, may feel miserable. :-) From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Fran=C3=A7ois_Pinard?= Subject: Macros [was: Re: ATTR_HTML for a clickable image, howto?] Date: Sat, 19 May 2012 21:00:58 -0400 Message-ID: <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVuW5-0000Ic-Kr for emacs-orgmode@gnu.org; Sat, 19 May 2012 21:01:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SVuW4-0003lr-3Z for emacs-orgmode@gnu.org; Sat, 19 May 2012 21:01:01 -0400 Received: from 206-248-137-202.dsl.teksavvy.com ([206.248.137.202]:60677 helo=mercure.progiciels-bpi.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SVuW3-0003l6-U0 for emacs-orgmode@gnu.org; Sat, 19 May 2012 21:01:00 -0400 In-Reply-To: <4F853CCD.4020601@christianmoe.com> (Christian Moe's message of "Wed, 11 Apr 2012 10:11:57 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Christian Moe writes: > There are other drawbacks [to macros], such as needing to > backslash-escape any commas (as in the above example). Oh, thanks! This (partly) replies to the message I sent a few minutes ago. Before sending that message, I checked in the Org manual, and the manual is silent about the possibility of such escaping. The manual is also silent about nesting, which has been mentioned elsewhere in this thread. The examples in the manual do not hint either about whether newlines are allowed or not in macro arguments. In fact, the manual section "Macro replacement" says very little, so when I initially read it, I guessed that macros are only usable in very simple cases. However, the last statement says that macros can be used to construct "complex HTML code". Yet, the definition method at the beginning suggests that macro definitions have to fit on one line, and this seriously limits the complexity of what we can do with them. So, on initial reading, I just decided I understood nothing about them :-). If macros are there to stay in Org, it might be worth documenting a more complete specification about how to define and use them. Fran=C3=A7ois From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Macros [was: Re: ATTR_HTML for a clickable image, howto?] Date: Sun, 20 May 2012 10:02:05 +0200 Message-ID: <87txzbcmbm.fsf@gmail.com> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW18T-0007jz-Vg for emacs-orgmode@gnu.org; Sun, 20 May 2012 04:05:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SW18S-000555-69 for emacs-orgmode@gnu.org; Sun, 20 May 2012 04:05:05 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:51753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW18R-00053H-TK for emacs-orgmode@gnu.org; Sun, 20 May 2012 04:05:04 -0400 Received: by wefh52 with SMTP id h52so3374273wef.0 for ; Sun, 20 May 2012 01:05:01 -0700 (PDT) In-Reply-To: <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> (=?utf-8?Q?=22F?= =?utf-8?Q?ran=C3=A7ois?= Pinard"'s message of "Sat, 19 May 2012 21:00:58 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?Fran=C3=A7ois?= Pinard Cc: emacs-orgmode@gnu.org Hello, Fran=C3=A7ois Pinard writes: > The examples in the manual do not hint either about whether newlines > are allowed or not in macro arguments. They are not. > In fact, the manual section "Macro replacement" says very little, so > when I initially read it, I guessed that macros are only usable in very > simple cases. However, the last statement says that macros can be used > to construct "complex HTML code". Yet, the definition method at the > beginning suggests that macro definitions have to fit on one line, and > this seriously limits the complexity of what we can do with them. So, > on initial reading, I just decided I understood nothing about > them :-). They can build complex code since you can eval a sexp in a macro: --8<---------------cut here---------------start------------->8--- #+TITLE: Macro test #+MACRO: test2 recursive $1 #+MACRO: test A {{{test2(inner)}}} macro, $1. #+MACRO: html-builder (eval (+ $1 $2)) {{{test(and an outer one)}}} Some complex macro {{{html-builder(1,2)}}}. --8<---------------cut here---------------end--------------->8--- > If macros are there to stay in Org, it might be worth documenting a more > complete specification about how to define and use them. They are useful. Though, for "complex code", I think Babel should be the way to go. Regards, --=20 Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yagnesh Raghava Yakkala Subject: Re: Macros [was: Re: ATTR_HTML for a clickable image, howto?] Date: Sun, 20 May 2012 17:34:49 +0900 Message-ID: <87pq9zz1w6.fsf@okhotsk19.lowtem.hokudai.ac.jp> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> <87txzbcmbm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW1ag-0003BF-T6 for emacs-orgmode@gnu.org; Sun, 20 May 2012 04:34:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SW1aa-0001bP-Jw for emacs-orgmode@gnu.org; Sun, 20 May 2012 04:34:14 -0400 Received: from plane.gmane.org ([80.91.229.3]:52681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW1aa-0001bA-17 for emacs-orgmode@gnu.org; Sun, 20 May 2012 04:34:08 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SW1aX-0006KS-Jv for emacs-orgmode@gnu.org; Sun, 20 May 2012 10:34:05 +0200 Received: from okhotsk19.lowtem.hokudai.ac.jp ([133.87.217.175]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 May 2012 10:34:05 +0200 Received: from yagnesh by okhotsk19.lowtem.hokudai.ac.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 May 2012 10:34:05 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello Nicolas, Nicolas Goaziou writes: > #+TITLE: Macro test > #+MACRO: test2 recursive $1 > #+MACRO: test A {{{test2(inner)}}} macro, $1. > #+MACRO: html-builder (eval (+ $1 $2)) > > > {{{test(and an outer one)}}} > > Some complex macro {{{html-builder(1,2)}}}. out of curiosity I tried to export above snippet. it is working nice except= for new exporter latex option. (org-export-dispatch and d option) here is the back trace: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (void-variable \1) (+ \1 \2) (eval (+ \1 \2)) eval((eval (+ \1 \2))) (setq value (eval (read value))) (progn (setq value (eval (read value)))) (if (string-match "\\`(eval\\>" value) (progn (setq value (eval (read val= ue))))) (when (string-match "\\`(eval\\>" value) (setq value (eval (read value)))) (let* ((key (org-element-property :key macro)) (args (org-element-propert= y :args macro)) (value (org-export-data (plist-get info (intern (format ":m= acro-%s" key))) info))) (let ((s 0) n) (while (string-match "\\$\\([0-9]+\\= )" value s) (setq s (1+ (match-beginning 0)) n (string-to-number (match-str= ing 1 value))) (and (>=3D (length args) n) (setq value (replace-match (nth = (1- n) args) t t value))))) (when (string-match "\\`(eval\\>" value) (setq = value (eval (read value)))) (format "%s" (or value ""))) org-export-expand-macro((macro (:key "html-builder" :value "{{{html-build= er(1,2)}}}" :args ("1" "2") :begin 185 :end 208 :post-blank 0)) (:author "Y= agnesh Raghava Yakkala" :creator "Generated by Org mode 7.8.10 in Emacs 24.= 1.50.5." :date "\\today" :description nil :email "yagnesh@okhotsk19.lowtem.= hokudai.ac.jp" :exclude-tags ("noexport") :headline-levels 3 :keywords nil = :language "en" :preserve-breaks nil :section-numbers t :select-tags ("expor= t") :time-stamp-file t :title ("Macro test") :with-archived-trees headline = :with-author t :with-clocks nil :with-creator comment :with-drawers t :with= -email nil :with-emphasize t :with-entities t :with-fixed-width t :with-foo= tnotes t :with-plannings nil ...)) org-e-latex-macro((macro (:key "html-builder" :value "{{{html-builder(1,2= )}}}" :args ("1" "2") :begin 185 :end 208 :post-blank 0)) nil (:author "Yag= nesh Raghava Yakkala" :creator "Generated by Org mode 7.8.10 in Emacs 24.1.= 50.5." :date "\\today" :description nil :email "yagnesh@okhotsk19.lowtem.ho= kudai.ac.jp" :exclude-tags ("noexport") :headline-levels 3 :keywords nil :l= anguage "en" :preserve-breaks nil :section-numbers t :select-tags ("export"= ) :time-stamp-file t :title ("Macro test") :with-archived-trees headline :w= ith-author t :with-clocks nil :with-creator comment :with-drawers t :with-e= mail nil :with-emphasize t :with-entities t :with-fixed-width t :with-footn= otes t :with-plannings nil ...)) funcall(org-e-latex-macro (macro (:key "html-builder" :value "{{{html-bui= lder(1,2)}}}" :args ("1" "2") :begin 185 :end 208 :post-blank 0)) nil (:aut= hor "Yagnesh Raghava Yakkala" :creator "Generated by Org mode 7.8.10 in Ema= cs 24.1.50.5." :date "\\today" :description nil :email "yagnesh@okhotsk19.l= owtem.hokudai.ac.jp" :exclude-tags ("noexport") :headline-levels 3 :keyword= s nil :language "en" :preserve-breaks nil :section-numbers t :select-tags (= "export") :time-stamp-file t :title ("Macro test") :with-archived-trees hea= dline :with-author t :with-clocks nil :with-creator comment :with-drawers t= :with-email nil :with-emphasize t :with-entities t :with-fixed-width t :wi= th-footnotes t :with-plannings nil ...)) (and (fboundp transcoder) (funcall transcoder data nil info)) (let ((transcoder (org-export-transcoder data info))) (and (fboundp trans= coder) (funcall transcoder data nil info))) (cond ((member data (plist-get info :ignore-list)) nil) ((eq type (quote = plain-text)) (org-export-filter-apply-functions (plist-get info :filter-pla= in-text) (let ((transcoder (org-export-transcoder data info))) (if transcod= er (funcall transcoder data info) data)) info)) ((not (org-export-interpret= -p data info)) (org-export-data (org-export-expand data (mapconcat (lambda = (blob) (org-export-data blob info)) (org-element-contents data) "")) info))= ((not type) (mapconcat (lambda (obj) (org-export-data obj info)) data ""))= ((or (not (org-element-contents data)) (and (eq type (quote headline)) (eq= (plist-get info :with-archived-trees) (quote headline)) (org-element-prope= rty :archivedp data))) (let ((transcoder (org-export-transcoder data info))= ) (and (fboundp transcoder) (funcall transcoder data nil info)))) (t (let (= (transcoder (org-export-transcoder data info))) (when transcoder (let* ((gr= eaterp (memq type org-element-greater-elements)) (objectp (and ... ...)) (c= ontents (mapconcat ... ... ""))) (funcall transcoder data (if greaterp (org= -element-normalize-string contents) contents) info)))))) (let* ((type (org-element-type data)) (results (cond ((member data (plist= -get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-fil= ter-apply-functions (plist-get info :filter-plain-text) (let (...) (if tran= scoder ... data)) info)) ((not (org-export-interpret-p data info)) (org-exp= ort-data (org-export-expand data (mapconcat ... ... "")) info)) ((not type)= (mapconcat (lambda (obj) (org-export-data obj info)) data "")) ((or (not (= org-element-contents data)) (and (eq type ...) (eq ... ...) (org-element-pr= operty :archivedp data))) (let ((transcoder ...)) (and (fboundp transcoder)= (funcall transcoder data nil info)))) (t (let ((transcoder ...)) (when tra= nscoder (let* ... ...))))))) (cond ((not results) nil) ((memq type (quote (= org-data plain-text nil))) results) (t (let ((results (org-export-filter-ap= ply-functions (plist-get info ...) (let ... ...) info))) results)))) org-export-data((macro (:key "html-builder" :value "{{{html-builder(1,2)}= }}" :args ("1" "2") :begin 185 :end 208 :post-blank 0)) (:author "Yagnesh R= aghava Yakkala" :creator "Generated by Org mode 7.8.10 in Emacs 24.1.50.5."= :date "\\today" :description nil :email "yagnesh@okhotsk19.lowtem.hokudai.= ac.jp" :exclude-tags ("noexport") :headline-levels 3 :keywords nil :languag= e "en" :preserve-breaks nil :section-numbers t :select-tags ("export") :tim= e-stamp-file t :title ("Macro test") :with-archived-trees headline :with-au= thor t :with-clocks nil :with-creator comment :with-drawers t :with-email n= il :with-emphasize t :with-entities t :with-fixed-width t :with-footnotes t= :with-plannings nil ...)) (lambda (element) (org-export-data element info))((macro (:key "html-buil= der" :value "{{{html-builder(1,2)}}}" :args ("1" "2") :begin 185 :end 208 := post-blank 0))) mapconcat((lambda (element) (org-export-data element info)) ("Some comple= x macro " (macro (:key "html-builder" :value "{{{html-builder(1,2)}}}" :arg= s ("1" "2") :begin 185 :end 208 :post-blank 0)) ".") "") (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and = (not greaterp) (memq type org-element-recursive-objects))) (contents (mapco= ncat (lambda (element) (org-export-data element info)) (org-element-content= s (if (or greaterp objectp) data (org-element-normalize-contents data (when= ... ...)))) ""))) (funcall transcoder data (if greaterp (org-element-norma= lize-string contents) contents) info)) (progn (let* ((greaterp (memq type org-element-greater-elements)) (object= p (and (not greaterp) (memq type org-element-recursive-objects))) (contents= (mapconcat (lambda (element) (org-export-data element info)) (org-element-= contents (if (or greaterp objectp) data (org-element-normalize-contents dat= a ...))) ""))) (funcall transcoder data (if greaterp (org-element-normalize= -string contents) contents) info))) (if transcoder (progn (let* ((greaterp (memq type org-element-greater-ele= ments)) (objectp (and (not greaterp) (memq type org-element-recursive-objec= ts))) (contents (mapconcat (lambda (element) (org-export-data element info)= ) (org-element-contents (if ... data ...)) ""))) (funcall transcoder data (= if greaterp (org-element-normalize-string contents) contents) info)))) (when transcoder (let* ((greaterp (memq type org-element-greater-elements= )) (objectp (and (not greaterp) (memq type org-element-recursive-objects)))= (contents (mapconcat (lambda (element) (org-export-data element info)) (or= g-element-contents (if (or greaterp objectp) data (org-element-normalize-co= ntents data ...))) ""))) (funcall transcoder data (if greaterp (org-element= -normalize-string contents) contents) info))) (let ((transcoder (org-export-transcoder data info))) (when transcoder (l= et* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not= greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat= (lambda (element) (org-export-data element info)) (org-element-contents (i= f ... data ...)) ""))) (funcall transcoder data (if greaterp (org-element-n= ormalize-string contents) contents) info)))) (cond ((member data (plist-get info :ignore-list)) nil) ((eq type (quote = plain-text)) (org-export-filter-apply-functions (plist-get info :filter-pla= in-text) (let ((transcoder (org-export-transcoder data info))) (if transcod= er (funcall transcoder data info) data)) info)) ((not (org-export-interpret= -p data info)) (org-export-data (org-export-expand data (mapconcat (lambda = (blob) (org-export-data blob info)) (org-element-contents data) "")) info))= ((not type) (mapconcat (lambda (obj) (org-export-data obj info)) data ""))= ((or (not (org-element-contents data)) (and (eq type (quote headline)) (eq= (plist-get info :with-archived-trees) (quote headline)) (org-element-prope= rty :archivedp data))) (let ((transcoder (org-export-transcoder data info))= ) (and (fboundp transcoder) (funcall transcoder data nil info)))) (t (let (= (transcoder (org-export-transcoder data info))) (when transcoder (let* ((gr= eaterp (memq type org-element-greater-elements)) (objectp (and ... ...)) (c= ontents (mapconcat ... ... ""))) (funcall transcoder data (if greaterp (org= -element-normalize-string contents) contents) info)))))) (let* ((type (org-element-type data)) (results (cond ((member data (plist= -get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-fil= ter-apply-functions (plist-get info :filter-plain-text) (let (...) (if tran= scoder ... data)) info)) ((not (org-export-interpret-p data info)) (org-exp= ort-data (org-export-expand data (mapconcat ... ... "")) info)) ((not type)= (mapconcat (lambda (obj) (org-export-data obj info)) data "")) ((or (not (= org-element-contents data)) (and (eq type ...) (eq ... ...) (org-element-pr= operty :archivedp data))) (let ((transcoder ...)) (and (fboundp transcoder)= (funcall transcoder data nil info)))) (t (let ((transcoder ...)) (when tra= nscoder (let* ... ...))))))) (cond ((not results) nil) ((memq type (quote (= org-data plain-text nil))) results) (t (let ((results (org-export-filter-ap= ply-functions (plist-get info ...) (let ... ...) info))) results)))) org-export-data((paragraph (:begin 166 :end 210 :contents-begin 166 :cont= ents-end 209 :post-blank 0) "Some complex macro " (macro (:key "html-builde= r" :value "{{{html-builder(1,2)}}}" :args ("1" "2") :begin 185 :end 208 :po= st-blank 0)) ".") (:author "Yagnesh Raghava Yakkala" :creator "Generated by= Org mode 7.8.10 in Emacs 24.1.50.5." :date "\\today" :description nil :ema= il "yagnesh@okhotsk19.lowtem.hokudai.ac.jp" :exclude-tags ("noexport") :hea= dline-levels 3 :keywords nil :language "en" :preserve-breaks nil :section-n= umbers t :select-tags ("export") :time-stamp-file t :title ("Macro test") := with-archived-trees headline :with-author t :with-clocks nil :with-creator = comment :with-drawers t :with-email nil :with-emphasize t :with-entities t = :with-fixed-width t :with-footnotes t :with-plannings nil ...)) (lambda (element) (org-export-data element info))((paragraph (:begin 166 = :end 210 :contents-begin 166 :contents-end 209 :post-blank 0) "Some complex= macro " (macro (:key "html-builder" :value "{{{html-builder(1,2)}}}" :args= ("1" "2") :begin 185 :end 208 :post-blank 0)) ".")) mapconcat((lambda (element) (org-export-data element info)) ((keyword (:k= ey "TITLE" :value "Macro test" :begin 1 :end 21 :post-blank 0)) (keyword (:= key "MACRO" :value "test2 recursive $1" :begin 21 :end 49 :post-blank 0)) (= keyword (:key "MACRO" :value "test A {{{test2(inner)}}} macro, $1." :begin = 49 :end 95 :post-blank 0)) (keyword (:key "MACRO" :value "html-builder (eva= l (+ $1 $2))" :begin 95 :end 136 :post-blank 2)) (paragraph (:begin 136 :en= d 166 :contents-begin 136 :contents-end 164 :post-blank 1) (macro (:key "te= st" :value "{{{test(and an outer one)}}}" :args ("and an outer one") :begin= 136 :end 164 :post-blank 0))) (paragraph (:begin 166 :end 210 :contents-be= gin 166 :contents-end 209 :post-blank 0) "Some complex macro " (macro (:key= "html-builder" :value "{{{html-builder(1,2)}}}" :args ("1" "2") :begin 185= :end 208 :post-blank 0)) ".")) "") (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and = (not greaterp) (memq type org-element-recursive-objects))) (contents (mapco= ncat (lambda (element) (org-export-data element info)) (org-element-content= s (if (or greaterp objectp) data (org-element-normalize-contents data (when= ... ...)))) ""))) (funcall transcoder data (if greaterp (org-element-norma= lize-string contents) contents) info)) (progn (let* ((greaterp (memq type org-element-greater-elements)) (object= p (and (not greaterp) (memq type org-element-recursive-objects))) (contents= (mapconcat (lambda (element) (org-export-data element info)) (org-element-= contents (if (or greaterp objectp) data (org-element-normalize-contents dat= a ...))) ""))) (funcall transcoder data (if greaterp (org-element-normalize= -string contents) contents) info))) (if transcoder (progn (let* ((greaterp (memq type org-element-greater-ele= ments)) (objectp (and (not greaterp) (memq type org-element-recursive-objec= ts))) (contents (mapconcat (lambda (element) (org-export-data element info)= ) (org-element-contents (if ... data ...)) ""))) (funcall transcoder data (= if greaterp (org-element-normalize-string contents) contents) info)))) (when transcoder (let* ((greaterp (memq type org-element-greater-elements= )) (objectp (and (not greaterp) (memq type org-element-recursive-objects)))= (contents (mapconcat (lambda (element) (org-export-data element info)) (or= g-element-contents (if (or greaterp objectp) data (org-element-normalize-co= ntents data ...))) ""))) (funcall transcoder data (if greaterp (org-element= -normalize-string contents) contents) info))) (let ((transcoder (org-export-transcoder data info))) (when transcoder (l= et* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not= greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat= (lambda (element) (org-export-data element info)) (org-element-contents (i= f ... data ...)) ""))) (funcall transcoder data (if greaterp (org-element-n= ormalize-string contents) contents) info)))) (cond ((member data (plist-get info :ignore-list)) nil) ((eq type (quote = plain-text)) (org-export-filter-apply-functions (plist-get info :filter-pla= in-text) (let ((transcoder (org-export-transcoder data info))) (if transcod= er (funcall transcoder data info) data)) info)) ((not (org-export-interpret= -p data info)) (org-export-data (org-export-expand data (mapconcat (lambda = (blob) (org-export-data blob info)) (org-element-contents data) "")) info))= ((not type) (mapconcat (lambda (obj) (org-export-data obj info)) data ""))= ((or (not (org-element-contents data)) (and (eq type (quote headline)) (eq= (plist-get info :with-archived-trees) (quote headline)) (org-element-prope= rty :archivedp data))) (let ((transcoder (org-export-transcoder data info))= ) (and (fboundp transcoder) (funcall transcoder data nil info)))) (t (let (= (transcoder (org-export-transcoder data info))) (when transcoder (let* ((gr= eaterp (memq type org-element-greater-elements)) (objectp (and ... ...)) (c= ontents (mapconcat ... ... ""))) (funcall transcoder data (if greaterp (org= -element-normalize-string contents) contents) info)))))) (let* ((type (org-element-type data)) (results (cond ((member data (plist= -get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-fil= ter-apply-functions (plist-get info :filter-plain-text) (let (...) (if tran= scoder ... data)) info)) ((not (org-export-interpret-p data info)) (org-exp= ort-data (org-export-expand data (mapconcat ... ... "")) info)) ((not type)= (mapconcat (lambda (obj) (org-export-data obj info)) data "")) ((or (not (= org-element-contents data)) (and (eq type ...) (eq ... ...) (org-element-pr= operty :archivedp data))) (let ((transcoder ...)) (and (fboundp transcoder)= (funcall transcoder data nil info)))) (t (let ((transcoder ...)) (when tra= nscoder (let* ... ...))))))) (cond ((not results) nil) ((memq type (quote (= org-data plain-text nil))) results) (t (let ((results (org-export-filter-ap= ply-functions (plist-get info ...) (let ... ...) info))) results)))) org-export-data((section (:begin 1 :end 210 :contents-begin 1 :contents-e= nd 210 :post-blank 0) (keyword (:key "TITLE" :value "Macro test" :begin 1 := end 21 :post-blank 0)) (keyword (:key "MACRO" :value "test2 recursive $1" := begin 21 :end 49 :post-blank 0)) (keyword (:key "MACRO" :value "test A {{{t= est2(inner)}}} macro, $1." :begin 49 :end 95 :post-blank 0)) (keyword (:key= "MACRO" :value "html-builder (eval (+ $1 $2))" :begin 95 :end 136 :post-bl= ank 2)) (paragraph (:begin 136 :end 166 :contents-begin 136 :contents-end 1= 64 :post-blank 1) (macro (:key "test" :value "{{{test(and an outer one)}}}"= :args ("and an outer one") :begin 136 :end 164 :post-blank 0))) (paragraph= (:begin 166 :end 210 :contents-begin 166 :contents-end 209 :post-blank 0) = "Some complex macro " (macro (:key "html-builder" :value "{{{html-builder(1= ,2)}}}" :args ("1" "2") :begin 185 :end 208 :post-blank 0)) ".")) (:author = "Yagnesh Raghava Yakkala" :creator "Generated by Org mode 7.8.10 in Emacs 2= 4.1.50.5." :date "\\today" :description nil :email "yagnesh@okhotsk19.lowte= m.hokudai.ac.jp" :exclude-tags ("noexport") :headline-levels 3 :keywords ni= l :language "en" :preserve-breaks nil :section-numbers t :select-tags ("exp= ort") :time-stamp-file t :title ("Macro test") :with-archived-trees headlin= e :with-author t :with-clocks nil :with-creator comment :with-drawers t :wi= th-email nil :with-emphasize t :with-entities t :with-fixed-width t :with-f= ootnotes t :with-plannings nil ...)) (lambda (element) (org-export-data element info))((section (:begin 1 :end= 210 :contents-begin 1 :contents-end 210 :post-blank 0) (keyword (:key "TIT= LE" :value "Macro test" :begin 1 :end 21 :post-blank 0)) (keyword (:key "MA= CRO" :value "test2 recursive $1" :begin 21 :end 49 :post-blank 0)) (keyword= (:key "MACRO" :value "test A {{{test2(inner)}}} macro, $1." :begin 49 :end= 95 :post-blank 0)) (keyword (:key "MACRO" :value "html-builder (eval (+ $1= $2))" :begin 95 :end 136 :post-blank 2)) (paragraph (:begin 136 :end 166 := contents-begin 136 :contents-end 164 :post-blank 1) (macro (:key "test" :va= lue "{{{test(and an outer one)}}}" :args ("and an outer one") :begin 136 :e= nd 164 :post-blank 0))) (paragraph (:begin 166 :end 210 :contents-begin 166= :contents-end 209 :post-blank 0) "Some complex macro " (macro (:key "html-= builder" :value "{{{html-builder(1,2)}}}" :args ("1" "2") :begin 185 :end 2= 08 :post-blank 0)) "."))) mapconcat((lambda (element) (org-export-data element info)) ((section (:b= egin 1 :end 210 :contents-begin 1 :contents-end 210 :post-blank 0) (keyword= (:key "TITLE" :value "Macro test" :begin 1 :end 21 :post-blank 0)) (keywor= d (:key "MACRO" :value "test2 recursive $1" :begin 21 :end 49 :post-blank 0= )) (keyword (:key "MACRO" :value "test A {{{test2(inner)}}} macro, $1." :be= gin 49 :end 95 :post-blank 0)) (keyword (:key "MACRO" :value "html-builder = (eval (+ $1 $2))" :begin 95 :end 136 :post-blank 2)) (paragraph (:begin 136= :end 166 :contents-begin 136 :contents-end 164 :post-blank 1) (macro (:key= "test" :value "{{{test(and an outer one)}}}" :args ("and an outer one") :b= egin 136 :end 164 :post-blank 0))) (paragraph (:begin 166 :end 210 :content= s-begin 166 :contents-end 209 :post-blank 0) "Some complex macro " (macro (= :key "html-builder" :value "{{{html-builder(1,2)}}}" :args ("1" "2") :begin= 185 :end 208 :post-blank 0)) "."))) "") (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and = (not greaterp) (memq type org-element-recursive-objects))) (contents (mapco= ncat (lambda (element) (org-export-data element info)) (org-element-content= s (if (or greaterp objectp) data (org-element-normalize-contents data (when= ... ...)))) ""))) (funcall transcoder data (if greaterp (org-element-norma= lize-string contents) contents) info)) (progn (let* ((greaterp (memq type org-element-greater-elements)) (object= p (and (not greaterp) (memq type org-element-recursive-objects))) (contents= (mapconcat (lambda (element) (org-export-data element info)) (org-element-= contents (if (or greaterp objectp) data (org-element-normalize-contents dat= a ...))) ""))) (funcall transcoder data (if greaterp (org-element-normalize= -string contents) contents) info))) (if transcoder (progn (let* ((greaterp (memq type org-element-greater-ele= ments)) (objectp (and (not greaterp) (memq type org-element-recursive-objec= ts))) (contents (mapconcat (lambda (element) (org-export-data element info)= ) (org-element-contents (if ... data ...)) ""))) (funcall transcoder data (= if greaterp (org-element-normalize-string contents) contents) info)))) (when transcoder (let* ((greaterp (memq type org-element-greater-elements= )) (objectp (and (not greaterp) (memq type org-element-recursive-objects)))= (contents (mapconcat (lambda (element) (org-export-data element info)) (or= g-element-contents (if (or greaterp objectp) data (org-element-normalize-co= ntents data ...))) ""))) (funcall transcoder data (if greaterp (org-element= -normalize-string contents) contents) info))) (let ((transcoder (org-export-transcoder data info))) (when transcoder (l= et* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not= greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat= (lambda (element) (org-export-data element info)) (org-element-contents (i= f ... data ...)) ""))) (funcall transcoder data (if greaterp (org-element-n= ormalize-string contents) contents) info)))) (cond ((member data (plist-get info :ignore-list)) nil) ((eq type (quote = plain-text)) (org-export-filter-apply-functions (plist-get info :filter-pla= in-text) (let ((transcoder (org-export-transcoder data info))) (if transcod= er (funcall transcoder data info) data)) info)) ((not (org-export-interpret= -p data info)) (org-export-data (org-export-expand data (mapconcat (lambda = (blob) (org-export-data blob info)) (org-element-contents data) "")) info))= ((not type) (mapconcat (lambda (obj) (org-export-data obj info)) data ""))= ((or (not (org-element-contents data)) (and (eq type (quote headline)) (eq= (plist-get info :with-archived-trees) (quote headline)) (org-element-prope= rty :archivedp data))) (let ((transcoder (org-export-transcoder data info))= ) (and (fboundp transcoder) (funcall transcoder data nil info)))) (t (let (= (transcoder (org-export-transcoder data info))) (when transcoder (let* ((gr= eaterp (memq type org-element-greater-elements)) (objectp (and ... ...)) (c= ontents (mapconcat ... ... ""))) (funcall transcoder data (if greaterp (org= -element-normalize-string contents) contents) info)))))) (let* ((type (org-element-type data)) (results (cond ((member data (plist= -get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-fil= ter-apply-functions (plist-get info :filter-plain-text) (let (...) (if tran= scoder ... data)) info)) ((not (org-export-interpret-p data info)) (org-exp= ort-data (org-export-expand data (mapconcat ... ... "")) info)) ((not type)= (mapconcat (lambda (obj) (org-export-data obj info)) data "")) ((or (not (= org-element-contents data)) (and (eq type ...) (eq ... ...) (org-element-pr= operty :archivedp data))) (let ((transcoder ...)) (and (fboundp transcoder)= (funcall transcoder data nil info)))) (t (let ((transcoder ...)) (when tra= nscoder (let* ... ...))))))) (cond ((not results) nil) ((memq type (quote (= org-data plain-text nil))) results) (t (let ((results (org-export-filter-ap= ply-functions (plist-get info ...) (let ... ...) info))) results)))) org-export-data((org-data nil (section (:begin 1 :end 210 :contents-begin= 1 :contents-end 210 :post-blank 0) (keyword (:key "TITLE" :value "Macro te= st" :begin 1 :end 21 :post-blank 0)) (keyword (:key "MACRO" :value "test2 r= ecursive $1" :begin 21 :end 49 :post-blank 0)) (keyword (:key "MACRO" :valu= e "test A {{{test2(inner)}}} macro, $1." :begin 49 :end 95 :post-blank 0)) = (keyword (:key "MACRO" :value "html-builder (eval (+ $1 $2))" :begin 95 :en= d 136 :post-blank 2)) (paragraph (:begin 136 :end 166 :contents-begin 136 := contents-end 164 :post-blank 1) (macro (:key "test" :value "{{{test(and an = outer one)}}}" :args ("and an outer one") :begin 136 :end 164 :post-blank 0= ))) (paragraph (:begin 166 :end 210 :contents-begin 166 :contents-end 209 := post-blank 0) "Some complex macro " (macro (:key "html-builder" :value "{{{= html-builder(1,2)}}}" :args ("1" "2") :begin 185 :end 208 :post-blank 0)) "= ."))) (:author "Yagnesh Raghava Yakkala" :creator "Generated by Org mode 7.= 8.10 in Emacs 24.1.50.5." :date "\\today" :description nil :email "yagnesh@= okhotsk19.lowtem.hokudai.ac.jp" :exclude-tags ("noexport") :headline-levels= 3 :keywords nil :language "en" :preserve-breaks nil :section-numbers t :se= lect-tags ("export") :time-stamp-file t :title ("Macro test") :with-archive= d-trees headline :with-author t :with-clocks nil :with-creator comment :wit= h-drawers t :with-email nil :with-emphasize t :with-entities t :with-fixed-= width t :with-footnotes t :with-plannings nil ...)) (org-element-normalize-string (org-export-data tree info)) (let* ((body (org-element-normalize-string (org-export-data tree info))) = (template (intern (format "org-%s-template" backend))) (output (org-export-= filter-apply-functions (plist-get info :filter-final-output) (if (or (not (= fboundp template)) body-only) body (funcall template body info)) info))) (w= hen org-export-copy-to-kill-ring (org-kill-new output)) output) (let ((info (org-export-install-filters (org-export-store-footnote-defini= tions (org-export-get-environment backend subtreep ext-plist)))) (tree (let= ((buf (or (buffer-file-name ...) (current-buffer)))) (org-export-with-curr= ent-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let (= ...) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-ex= port-current-backend backend)) (run-hooks (quote org-export-before-parsing-= hook))) (org-element-parse-buffer nil visible-only))))) (setq tree (org-exp= ort-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) = (setq info (org-combine-plists info (org-export-collect-tree-properties tre= e info))) (let* ((body (org-element-normalize-string (org-export-data tree = info))) (template (intern (format "org-%s-template" backend))) (output (org= -export-filter-apply-functions (plist-get info :filter-final-output) (if (o= r (not ...) body-only) body (funcall template body info)) info))) (when org= -export-copy-to-kill-ring (org-kill-new output)) output)) (save-restriction (cond ((org-region-active-p) (narrow-to-region (region-= beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (poi= nt-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let ((inf= o (org-export-install-filters (org-export-store-footnote-definitions (org-e= xport-get-environment backend subtreep ext-plist)))) (tree (let ((buf (or .= .. ...))) (org-export-with-current-buffer-copy (unless noexpand (org-export= -expand-include-keyword) (let ... ...)) (goto-char (point-min)) (let (...) = (run-hooks ...)) (org-element-parse-buffer nil visible-only))))) (setq tree= (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tre= e info)) (setq info (org-combine-plists info (org-export-collect-tree-prope= rties tree info))) (let* ((body (org-element-normalize-string (org-export-d= ata tree info))) (template (intern (format "org-%s-template" backend))) (ou= tput (org-export-filter-apply-functions (plist-get info :filter-final-outpu= t) (if (or ... body-only) body (funcall template body info)) info))) (when = org-export-copy-to-kill-ring (org-kill-new output)) output))) (save-excursion (save-restriction (cond ((org-region-active-p) (narrow-to= -region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree)= (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-ma= x)))) (let ((info (org-export-install-filters (org-export-store-footnote-de= finitions (org-export-get-environment backend subtreep ext-plist)))) (tree = (let ((buf ...)) (org-export-with-current-buffer-copy (unless noexpand ... = ...) (goto-char ...) (let ... ...) (org-element-parse-buffer nil visible-on= ly))))) (setq tree (org-export-filter-apply-functions (plist-get info :filt= er-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-= collect-tree-properties tree info))) (let* ((body (org-element-normalize-st= ring (org-export-data tree info))) (template (intern (format "org-%s-templa= te" backend))) (output (org-export-filter-apply-functions (plist-get info := filter-final-output) (if ... body ...) info))) (when org-export-copy-to-kil= l-ring (org-kill-new output)) output)))) org-export-as(e-latex nil nil nil nil nil) (let ((out (org-export-as backend subtreep visible-only body-only ext-pli= st noexpand))) (with-temp-buffer (insert out) (let ((coding-system-for-writ= e org-export-coding-system)) (write-file file)))) org-export-to-file(e-latex "/tmp/org-scratch.tex" nil nil nil nil) (let ((outfile (org-export-output-file-name ".tex" subtreep pub-dir))) (o= rg-export-to-file (quote e-latex) outfile subtreep visible-only body-only e= xt-plist)) org-e-latex-export-to-latex(nil nil nil nil nil) (org-e-latex-compile (org-e-latex-export-to-latex subtreep visible-only b= ody-only ext-plist pub-dir)) org-e-latex-export-to-pdf(nil nil nil) (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (m= emq (quote visible) optns) (memq (quote body) optns))) (cond ((eql --cl-var-- (quote 113)) nil) ((member* --cl-var-- (quote (65 = 78 85))) (let ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII = Export*" (memq (quote subtree) optns) (memq (quote visible) optns) (memq (q= uote body) optns) (\` (:ascii-charset ...))))) (with-current-buffer outbuf = (text-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffe= r-other-window outbuf)))) ((member* --cl-var-- (quote (97 110 117))) (org-e= -ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) o= ptns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key (97 .= ..) (110 ...) (t ...))))))) ((eql --cl-var-- (quote 76)) (let ((outbuf (org= -export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq (quote subtr= ee) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with-= current-buffer outbuf (latex-mode)) (when org-export-show-temporary-export-= buffer (switch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 10= 8)) (org-e-latex-export-to-latex (memq (quote subtree) optns) (memq (quote = visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 112)) (= org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible= ) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 100)) (org-ope= n-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote= visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 72)) = (let ((outbuf (org-export-to-buffer (quote e-html) "*Org E-HTML Export*" (m= emq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) = optns)))) (with-current-buffer outbuf (if (featurep (quote nxhtml-mode)) (n= xhtml-mode) (nxml-mode))) (when org-export-show-temporary-export-buffer (sw= itch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 104)) (org-e= -html-export-to-html (memq (quote subtree) optns) (memq (quote visible) opt= ns) (memq (quote body) optns))) ((eql --cl-var-- (quote 98)) (org-open-file= (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visib= le) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 111)) (org-= e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optn= s) (memq (quote body) optns))) ((eql --cl-var-- (quote 79)) (org-open-file = (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible)= optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 70)) (org-e-pu= blish-current-file (memq (quote force) optns))) ((eql --cl-var-- (quote 80)= ) (org-e-publish-current-project (memq (quote force) optns))) ((eql --cl-va= r-- (quote 88)) (let ((project (assoc (org-icompleting-read "Publish projec= t: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org= -e-publish project (memq (quote force) optns)))) ((eql --cl-var-- (quote 69= )) (org-e-publish-all (memq (quote force) optns))) (t (error "No command as= sociated with key %s" (char-to-string raw-key)))) (let ((--cl-var-- (if (< raw-key 27) (+ raw-key 96) raw-key))) (cond ((eq= l --cl-var-- (quote 113)) nil) ((member* --cl-var-- (quote (65 78 85))) (le= t ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (me= mq ... optns) (memq ... optns) (memq ... optns) (\` ...)))) (with-current-b= uffer outbuf (text-mode)) (when org-export-show-temporary-export-buffer (sw= itch-to-buffer-other-window outbuf)))) ((member* --cl-var-- (quote (97 110 = 117))) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quo= te visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case = raw-key ... ... ...)))))) ((eql --cl-var-- (quote 76)) (let ((outbuf (org-e= xport-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq ... optns) (me= mq ... optns) (memq ... optns)))) (with-current-buffer outbuf (latex-mode))= (when org-export-show-temporary-export-buffer (switch-to-buffer-other-wind= ow outbuf)))) ((eql --cl-var-- (quote 108)) (org-e-latex-export-to-latex (m= emq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) = optns))) ((eql --cl-var-- (quote 112)) (org-e-latex-export-to-pdf (memq (qu= ote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))= ) ((eql --cl-var-- (quote 100)) (org-open-file (org-e-latex-export-to-pdf (= memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body)= optns)))) ((eql --cl-var-- (quote 72)) (let ((outbuf (org-export-to-buffer= (quote e-html) "*Org E-HTML Export*" (memq ... optns) (memq ... optns) (me= mq ... optns)))) (with-current-buffer outbuf (if (featurep (quote nxhtml-mo= de)) (nxhtml-mode) (nxml-mode))) (when org-export-show-temporary-export-buf= fer (switch-to-buffer-other-window outbuf)))) ((eql --cl-var-- (quote 104))= (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visib= le) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 98)) (org-op= en-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quot= e visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 111)= ) (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visibl= e) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 79)) (org-ope= n-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote v= isible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 70)) (o= rg-e-publish-current-file (memq (quote force) optns))) ((eql --cl-var-- (qu= ote 80)) (org-e-publish-current-project (memq (quote force) optns))) ((eql = --cl-var-- (quote 88)) (let ((project (assoc (org-icompleting-read "Publish= project: " org-e-publish-project-alist nil t) org-e-publish-project-alist)= )) (org-e-publish project (memq (quote force) optns)))) ((eql --cl-var-- (q= uote 69)) (org-e-publish-all (memq (quote force) optns))) (t (error "No com= mand associated with key %s" (char-to-string raw-key))))) (case (if (< raw-key 27) (+ raw-key 96) raw-key) (113 nil) ((65 78 85) (l= et ((outbuf (org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (m= emq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) = optns) (\` (:ascii-charset ...))))) (with-current-buffer outbuf (text-mode)= ) (when org-export-show-temporary-export-buffer (switch-to-buffer-other-win= dow outbuf)))) ((97 110 117) (org-e-ascii-export-to-ascii (memq (quote subt= ree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:as= cii-charset (\, (case raw-key (97 ...) (110 ...) (t ...))))))) (76 (let ((o= utbuf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq (q= uote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)= ))) (with-current-buffer outbuf (latex-mode)) (when org-export-show-tempora= ry-export-buffer (switch-to-buffer-other-window outbuf)))) (108 (org-e-late= x-export-to-latex (memq (quote subtree) optns) (memq (quote visible) optns)= (memq (quote body) optns))) (112 (org-e-latex-export-to-pdf (memq (quote s= ubtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (10= 0 (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (m= emq (quote visible) optns) (memq (quote body) optns)))) (72 (let ((outbuf (= org-export-to-buffer (quote e-html) "*Org E-HTML Export*" (memq (quote subt= ree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (with= -current-buffer outbuf (if (featurep (quote nxhtml-mode)) (nxhtml-mode) (nx= ml-mode))) (when org-export-show-temporary-export-buffer (switch-to-buffer-= other-window outbuf)))) (104 (org-e-html-export-to-html (memq (quote subtre= e) optns) (memq (quote visible) optns) (memq (quote body) optns))) (98 (org= -open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (q= uote visible) optns) (memq (quote body) optns)))) (111 (org-e-odt-export-to= -odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote= body) optns))) (79 (org-open-file (org-e-odt-export-to-odt (memq (quote su= btree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (70= (org-e-publish-current-file (memq (quote force) optns))) (80 (org-e-publis= h-current-project (memq (quote force) optns))) (88 (let ((project (assoc (o= rg-icompleting-read "Publish project: " org-e-publish-project-alist nil t) = org-e-publish-project-alist))) (org-e-publish project (memq (quote force) o= ptns)))) (69 (org-e-publish-all (memq (quote force) optns))) (t (error "No = command associated with key %s" (char-to-string raw-key)))) (let* ((input (org-export-dispatch-ui (if (listp org-export-initial-scope= ) org-export-initial-scope (list org-export-initial-scope)) org-export-disp= atch-use-expert-ui)) (raw-key (car input)) (optns (cdr input))) (case (if (= < raw-key 27) (+ raw-key 96) raw-key) (113 nil) ((65 78 85) (let ((outbuf (= org-export-to-buffer (quote e-ascii) "*Org E-ASCII Export*" (memq ... optns= ) (memq ... optns) (memq ... optns) (\` ...)))) (with-current-buffer outbuf= (text-mode)) (when org-export-show-temporary-export-buffer (switch-to-buff= er-other-window outbuf)))) ((97 110 117) (org-e-ascii-export-to-ascii (memq= (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) opt= ns) (\` (:ascii-charset (\, (case raw-key ... ... ...)))))) (76 (let ((outb= uf (org-export-to-buffer (quote e-latex) "*Org E-LaTeX Export*" (memq ... o= ptns) (memq ... optns) (memq ... optns)))) (with-current-buffer outbuf (lat= ex-mode)) (when org-export-show-temporary-export-buffer (switch-to-buffer-o= ther-window outbuf)))) (108 (org-e-latex-export-to-latex (memq (quote subtr= ee) optns) (memq (quote visible) optns) (memq (quote body) optns))) (112 (o= rg-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible)= optns) (memq (quote body) optns))) (100 (org-open-file (org-e-latex-export= -to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (qu= ote body) optns)))) (72 (let ((outbuf (org-export-to-buffer (quote e-html) = "*Org E-HTML Export*" (memq ... optns) (memq ... optns) (memq ... optns))))= (with-current-buffer outbuf (if (featurep (quote nxhtml-mode)) (nxhtml-mod= e) (nxml-mode))) (when org-export-show-temporary-export-buffer (switch-to-b= uffer-other-window outbuf)))) (104 (org-e-html-export-to-html (memq (quote = subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (9= 8 (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (m= emq (quote visible) optns) (memq (quote body) optns)))) (111 (org-e-odt-exp= ort-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq = (quote body) optns))) (79 (org-open-file (org-e-odt-export-to-odt (memq (qu= ote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))= )) (70 (org-e-publish-current-file (memq (quote force) optns))) (80 (org-e-= publish-current-project (memq (quote force) optns))) (88 (let ((project (as= soc (org-icompleting-read "Publish project: " org-e-publish-project-alist n= il t) org-e-publish-project-alist))) (org-e-publish project (memq (quote fo= rce) optns)))) (69 (org-e-publish-all (memq (quote force) optns))) (t (erro= r "No command associated with key %s" (char-to-string raw-key))))) org-export-dispatch() call-interactively(org-export-dispatch record nil) command-execute(org-export-dispatch record) execute-extended-command(nil "org-export-dispatch") call-interactively(execute-extended-command nil nil) --8<---------------cut here---------------end--------------->8--- org version: pulled a while ago. Org-mode version 7.8.10 (release_7.8.10-574-g57cfa6 @ /home/yagnesh/.emacs.= d/el-get/org-mode/lisp/) --=20 =E0=B0=8E=E0=B0=82=E0=B0=A6=E0=B0=B0=E0=B1=8B =E0=B0=AE=E0=B0=B9=E0=B0=BE= =E0=B0=A8=E0=B1=81=E0=B0=AD=E0=B0=BE=E0=B0=B5=E0=B1=81=E0=B0=B2=E0=B1=81 = =E0=B0=85=E0=B0=82=E0=B0=A6=E0=B0=B0=E0=B0=BF=E0=B0=95=E0=B0=BF =E0=B0=B5= =E0=B0=82=E0=B0=A6=E0=B0=A8=E0=B0=AE=E0=B1=81=E0=B0=B2=E0=B1=81 YYR From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Macros [was: Re: ATTR_HTML for a clickable image, howto?] Date: Sun, 20 May 2012 12:24:04 +0200 Message-ID: <87likncfqz.fsf@gmail.com> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> <87txzbcmbm.fsf@gmail.com> <87pq9zz1w6.fsf@okhotsk19.lowtem.hokudai.ac.jp> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW3Lt-0002uD-5q for emacs-orgmode@gnu.org; Sun, 20 May 2012 06:27:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SW3Lr-00041T-DY for emacs-orgmode@gnu.org; Sun, 20 May 2012 06:27:04 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:35625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW3Lr-00041M-48 for emacs-orgmode@gnu.org; Sun, 20 May 2012 06:27:03 -0400 Received: by wibhm14 with SMTP id hm14so1136036wib.12 for ; Sun, 20 May 2012 03:27:01 -0700 (PDT) In-Reply-To: <87pq9zz1w6.fsf@okhotsk19.lowtem.hokudai.ac.jp> (Yagnesh Raghava Yakkala's message of "Sun, 20 May 2012 17:34:49 +0900") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Yagnesh Raghava Yakkala Cc: emacs-orgmode@gnu.org Hello, Yagnesh Raghava Yakkala writes: > Nicolas Goaziou writes: >> #+TITLE: Macro test >> #+MACRO: test2 recursive $1 >> #+MACRO: test A {{{test2(inner)}}} macro, $1. >> #+MACRO: html-builder (eval (+ $1 $2)) >> >> >> {{{test(and an outer one)}}} >> >> Some complex macro {{{html-builder(1,2)}}}. > > > out of curiosity I tried to export above snippet. it is working nice except for > new exporter latex option. (org-export-dispatch and d option) You're right. I was protecting dollar signs before replacing arguments. This should be fixed in master. Thank you for the report. Regards, -- Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Macros [was: Re: ATTR_HTML for a clickable image, howto?] Date: Wed, 23 May 2012 01:23:01 +0200 Message-ID: <87d35vztpm.fsf@gnu.org> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWyP6-0007XW-CC for emacs-orgmode@gnu.org; Tue, 22 May 2012 19:22:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWyP4-00035z-N8 for emacs-orgmode@gnu.org; Tue, 22 May 2012 19:22:11 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:36200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWyP4-00035f-ES for emacs-orgmode@gnu.org; Tue, 22 May 2012 19:22:10 -0400 Received: by wgbds1 with SMTP id ds1so4935518wgb.30 for ; Tue, 22 May 2012 16:22:08 -0700 (PDT) In-Reply-To: <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> (=?iso-8859-1?Q?=22Fran=E7ois?= Pinard"'s message of "Sat, 19 May 2012 21:00:58 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?iso-8859-1?Q?Fran=E7ois?= Pinard Cc: emacs-orgmode@gnu.org Hi François, François Pinard writes: > This (partly) replies to the message I sent a few minutes ago. Before > sending that message, I checked in the Org manual, and the manual is > silent about the possibility of such escaping. > > The manual is also silent about nesting, which has been mentioned > elsewhere in this thread. The examples in the manual do not hint either > about whether newlines are allowed or not in macro arguments. Please contribute by sending patches or more readable hints on what should be fixed... > If macros are there to stay in Org, it might be worth documenting a more > complete specification about how to define and use them. Macros are here to stay. Please also remember the manual cannot cover everything -- Worg can efficiently cover topics like this one. Thanks for your help! -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Macros [was: Re: ATTR_HTML for a clickable image, howto?] Date: Thu, 05 Jul 2012 16:40:51 +0200 Message-ID: <87wr2ijmoc.fsf@gnu.org> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmnE7-0001Lw-EC for emacs-orgmode@gnu.org; Thu, 05 Jul 2012 10:40:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmnE5-0007fh-HG for emacs-orgmode@gnu.org; Thu, 05 Jul 2012 10:40:14 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:61032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmnE5-0007fI-9D for emacs-orgmode@gnu.org; Thu, 05 Jul 2012 10:40:13 -0400 Received: by werl57 with SMTP id l57so780604wer.0 for ; Thu, 05 Jul 2012 07:40:11 -0700 (PDT) In-Reply-To: <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> (=?iso-8859-1?Q?=22Fran=E7ois?= Pinard"'s message of "Sat, 19 May 2012 21:00:58 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?iso-8859-1?Q?Fran=E7ois?= Pinard Cc: emacs-orgmode@gnu.org Hi, François Pinard writes: > If macros are there to stay in Org, it might be worth documenting a more > complete specification about how to define and use them. I'd welcome some improvement of the manual wrt macros -- any taker? Thanks, -- Bastien From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Macros [was: Re: ATTR_HTML for a clickable image, howto?] Date: Thu, 05 Jul 2012 17:09:08 +0200 Message-ID: <8762a2s0rv.fsf@gmail.com> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> <87wr2ijmoc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmnjO-0008MK-3C for emacs-orgmode@gnu.org; Thu, 05 Jul 2012 11:12:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmnjH-0000am-VN for emacs-orgmode@gnu.org; Thu, 05 Jul 2012 11:12:33 -0400 In-Reply-To: <87wr2ijmoc.fsf@gnu.org> (Bastien's message of "Thu, 05 Jul 2012 16:40:51 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: =?utf-8?Q?Fran=C3=A7ois?= Pinard , emacs-orgmode@gnu.org Hello, Bastien writes: > Fran=C3=A7ois Pinard writes: > >> If macros are there to stay in Org, it might be worth documenting a more >> complete specification about how to define and use them. > > I'd welcome some improvement of the manual wrt macros -- any taker? Before documenting anything, we should first define them clearly. That is, we can define them through documentation, but we shouldn't write documentation by looking at their current implementation. Should macros be allowed anywhere (which means that the user can shoot himself in the foot) or should their expansion happen in a protected environment (thus limiting their power)? In the first case, can macros generate inline Babel code, that will be executed before export? In the second case, what types of elements are allowed in the protected environment? Also, do we want to allow multiples macros definitions to stack up? I.e. #+MACRO: a-macro First line of the macro. #+MACRO: a-macro Second line of the macro. If so, do we allow blank lines in them, meaning they can break document structure even more? Can the macros be nested? Since macros arguments are comma-separated, how do one insert commas within an argument? Are newline characters allowed in arguments? If not, what else is forbidden there? There are probably other questions, but it should be a good start for a correct implementation. Regards, --=20 Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Macros [was: Re: ATTR_HTML for a clickable image, howto?] Date: Thu, 05 Jul 2012 17:51:32 +0200 Message-ID: <803956gq9n.fsf@somewhere.org> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> <87wr2ijmoc.fsf@gnu.org> <8762a2s0rv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Nicolas, Nicolas Goaziou wrote: > Bastien writes: >> Fran=C3=A7ois Pinard writes: >>> If macros are there to stay in Org, it might be worth documenting a more >>> complete specification about how to define and use them. >> >> I'd welcome some improvement of the manual wrt macros -- any taker? > > Before documenting anything, we should first define them clearly. I think you're right here, seen the latest threads on this. > That is, we can define them through documentation, but we shouldn't write > documentation by looking at their current implementation. > > Should macros be allowed anywhere (which means that the user can shoot > himself in the foot) or should their expansion happen in a protected > environment (thus limiting their power)? If I had to choose, I would opt for the first case... > In the first case, can macros generate inline Babel code, that will be > executed before export? ... where macros would be pre-processed "=C3=A0 la M4" (or C preprocessing): replacing some keyword with some other expression. > In the second case, what types of elements are allowed in the protected > environment? > > Also, do we want to allow multiples macros definitions to stack up? I.e. > > #+MACRO: a-macro First line of the macro. > #+MACRO: a-macro Second line of the macro. > > If so, do we allow blank lines in them, meaning they can break document > structure even more? > > Can the macros be nested? > > Since macros arguments are comma-separated, how do one insert commas > within an argument? > > Are newline characters allowed in arguments? If not, what else is > forbidden there? > > There are probably other questions, but it should be a good start for > a correct implementation. An extra question is: the "replacing expression" of a macro, must it be pure text, or can it be anything (such as code that will be interpreted, in a further pass, by some back-end)? Best regards, Seb --=20 Sebastien Vauban From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Macros [was: Re: ATTR_HTML for a clickable image, howto?] Date: Thu, 05 Jul 2012 22:44:46 +0200 Message-ID: <871ukqrl8h.fsf@gmail.com> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> <87wr2ijmoc.fsf@gnu.org> <8762a2s0rv.fsf@gmail.com> <803956gq9n.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmsyT-0003Bb-HP for emacs-orgmode@gnu.org; Thu, 05 Jul 2012 16:48:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmsyR-0001cp-LD for emacs-orgmode@gnu.org; Thu, 05 Jul 2012 16:48:29 -0400 Received: from plane.gmane.org ([80.91.229.3]:47373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmsyR-0001cA-59 for emacs-orgmode@gnu.org; Thu, 05 Jul 2012 16:48:27 -0400 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SmsyI-0006Jf-Kn for emacs-orgmode@gnu.org; Thu, 05 Jul 2012 22:48:18 +0200 In-Reply-To: <803956gq9n.fsf@somewhere.org> (Sebastien Vauban's message of "Thu, 05 Jul 2012 17:51:32 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org Hello, "Sebastien Vauban" writes: > Hi Nicolas, > > Nicolas Goaziou wrote: >> Bastien writes: >>> Fran=C3=A7ois Pinard w= rites: >>>> If macros are there to stay in Org, it might be worth documenting a mo= re >>>> complete specification about how to define and use them. >>> >>> I'd welcome some improvement of the manual wrt macros -- any taker? >> >> Before documenting anything, we should first define them clearly. > > I think you're right here, seen the latest threads on this. > >> That is, we can define them through documentation, but we shouldn't write >> documentation by looking at their current implementation. >> >> Should macros be allowed anywhere (which means that the user can shoot >> himself in the foot) or should their expansion happen in a protected >> environment (thus limiting their power)? > > If I had to choose, I would opt for the first case... > >> In the first case, can macros generate inline Babel code, that will be >> executed before export? > > ... where macros would be pre-processed "=C3=A0 la M4" (or C preprocessin= g): > replacing some keyword with some other expression. > >> In the second case, what types of elements are allowed in the protected >> environment? >> >> Also, do we want to allow multiples macros definitions to stack up? I.e. >> >> #+MACRO: a-macro First line of the macro. >> #+MACRO: a-macro Second line of the macro. >> >> If so, do we allow blank lines in them, meaning they can break document >> structure even more? >> >> Can the macros be nested? >> >> Since macros arguments are comma-separated, how do one insert commas >> within an argument? >> >> Are newline characters allowed in arguments? If not, what else is >> forbidden there? >> >> There are probably other questions, but it should be a good start for >> a correct implementation. > > An extra question is: the "replacing expression" of a macro, must it be p= ure > text, or can it be anything (such as code that will be interpreted, in a > further pass, by some back-end)? The first option implies that the expression are inserted in the Org buffer before being parsed. This is mostly what happens in the current exporter. Regards, --=20 Nicolas Goaziou From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Macros [was: Re: ATTR_HTML for a clickable image, howto?] Date: Sun, 05 Aug 2012 11:19:36 +0200 Message-ID: <87sjc1ae6v.fsf@gnu.org> References: <86pqbrywgr.fsf@iro.umontreal.ca> <87r4w63602.fsf@gnu.org> <86vclekyqo.fsf@iro.umontreal.ca> <4F7EAED9.2040804@christianmoe.com> <4F803DDC.20808@christianmoe.com> <4F853CCD.4020601@christianmoe.com> <86r4ufr7hx.fsf_-_@mercure.progiciels-bpi.ca> <87wr2ijmoc.fsf@gnu.org> <8762a2s0rv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxwzK-0007q6-Mz for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 05:19:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxwzJ-0001k5-U4 for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 05:19:06 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:47509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxwzJ-0001k0-MP for emacs-orgmode@gnu.org; Sun, 05 Aug 2012 05:19:05 -0400 Received: by wgbez12 with SMTP id ez12so1338521wgb.30 for ; Sun, 05 Aug 2012 02:19:05 -0700 (PDT) In-Reply-To: <8762a2s0rv.fsf@gmail.com> (Nicolas Goaziou's message of "Thu, 05 Jul 2012 17:09:08 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: =?iso-8859-1?Q?Fran=E7ois?= Pinard , emacs-orgmode@gnu.org Hi Nicolas, Nicolas Goaziou writes: >> I'd welcome some improvement of the manual wrt macros -- any taker? > > Before documenting anything, we should first define them clearly. FWIW, I don't forget this important thread. Let's revive it after the release of Org 7.9, when we will think of moving org-export.el into core. -- Bastien