From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Comma-protection of Org blocks (was: [bug] Problem with Worg (html?) publishing) Date: Fri, 25 Mar 2011 22:00:11 +0100 Message-ID: <80vcz6ykys.fsf_-_@somewhere.org> References: <19834758-735D-4ADE-AA66-8ACF44F2CE46@gmail.com> <87bp105nva.fsf@ucl.ac.uk> <4D8BB89A.70908@gmail.com> <874o6rwjox.fsf@pinto.chemeng.ucl.ac.uk> <4D8CC930.9050201@gmail.com> <871v1v9f5m.fsf_-_@ucl.ac.uk> 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: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Eric (and Eric, and Dan, and ...), Eric S Fraga wrote: > In the org-beamer tutorial (Worg/org-tutorials/org-beamer/tutorial.org), > I have the following: > > ,---- > |=20 > | #+BEGIN_Example > | ,** Two columns > |=20 > | ,*** A block :B_ignoreheading= :BMCOL: > | :PROPERTIES: > | :BEAMER_env: ignoreheading > | :BEAMER_col: 0.4 > | :END: > | - this slide consists of two columns > | - the first (left) column has no heading and consists of text > | - the second (right) column has an image and is enclosed in an > | @example@ block > |=20 > | ,*** A screenshot :BMCOL:B_e= xample: > | :PROPERTIES: > | :BEAMER_col: 0.6 > | :BEAMER_env: example > | :END: > | , #+ATTR_LATEX: width=3D\textwidth > | [[file://../../images/org-beamer/a-simple-slide.png]] > | #+END_Example > `---- > > Note the second last line of the example which sets the latex attribute > for the following image. On export to HTML for publishing on the Worg > website, this line has magically *disappeared*! The ',' is supposed to > protect this line but instead it disappears. This makes me think of a request I briefly discussed with Carsten and Basti= en, the day of Fosdem. The "comma-protection" causes troubles when M-q comes into play. For the sake of clarity -- I hope --, an example (for my Isodoc letters in = Org): * Body #+srcname: body #+begin_src org :results latex ,Ik ben het totaalbedrag van de omzet 2010 vergeten op te nemen. De=C2= =A0ontbrekende ,gegeven voor mijn kleine onderneming is 0,00=C2=A0EUR (nul euro). #+end_src * Composed letter :noe= xport: #+begin_src latex :noweb yes :tangle yes \documentclass[11pt]{isodoc} \begin{document} \letter[language=3Ddutch,to=3D{\firstname~\lastname\\\addressi\\\postco= de~\town\\\country},openingcomma=3D{,}]{% <> } \end{document} #+end_src The above "body" block is converted to LaTeX and its result is tangled into the Isodoc LaTeX letter (here, voluntary kept to an ultra-minimal). The prefix "," is not kept in the process, that's what is expected. But the trouble is if I press M-q, because I add words to the sentences directly in the whole Org buffer: pressing M-q will move all the leading "," everywhere= in the text, and then they will be transported up to the TeX file. Not what I want. The above user mistake (pressing M-q, what puts the leading commas everywhe= re, letting them loose their initial meaning) -- is it really an error? -- would have had no impact (or much much less), would the prefix be a space, for example... Hence, questions: - would it be possible to replace the comma by something more neutral (mayb= e a space, or a non-breaking space for example) for HTML/LaTeX exports? - would it be possible to put the "protecting prefix" only when needed (automatic detection when TAB'ing), or let it be specified by the user? - is there maybe an alternative for the above Org/TeX problem (conversion + tangling)? Best regards, Seb --=20 S=C3=A9bastien Vauban