From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Different spacing in html output compared to info and pdf Date: Tue, 12 Mar 2013 11:34:11 +0100 Message-ID: <87k3pc52l8.fsf@bzg.ath.cx> References: <87li9t8yea.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFMdH-0003Ow-Tn for emacs-orgmode@gnu.org; Tue, 12 Mar 2013 06:40:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFMdB-0007Wa-Fe for emacs-orgmode@gnu.org; Tue, 12 Mar 2013 06:40:35 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:56959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFMXB-0005KX-Oo for emacs-orgmode@gnu.org; Tue, 12 Mar 2013 06:34:17 -0400 Received: by mail-wg0-f53.google.com with SMTP id fn15so5789354wgb.8 for ; Tue, 12 Mar 2013 03:34:16 -0700 (PDT) In-Reply-To: (Thomas S. Dye's message of "Mon, 11 Mar 2013 12:48:09 -1000") 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: "Thomas S. Dye" Cc: Achim Gratz , emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Thomas, the attached (dirty) patch fixes it. It's clearly not the right approach, though. I hope Nicolas can have a look soon, as the problem affect all uses of snippets in macros. Thanks for reporting this, --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=org-fix-snippet-post-blank.patch Changes in master Modified lisp/ox-html.el diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 9307081..6750ffc 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2024,8 +2024,9 @@ information." "Transcode a EXPORT-SNIPPET object from Org to HTML. CONTENTS is nil. INFO is a plist holding contextual information." - (when (eq (org-export-snippet-backend export-snippet) 'html) - (org-element-property :value export-snippet))) + (if (eq (org-export-snippet-backend export-snippet) 'html) + (org-element-property :value export-snippet) + (if (< 0 (org-element-property :post-blank export-snippet)) " "))) ;;;; Export Block Modified lisp/ox-latex.el diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index fa66bb4..5362edf 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1337,8 +1337,9 @@ CONTENTS is nil. INFO is a plist holding contextual information." (defun org-latex-export-snippet (export-snippet contents info) "Transcode a EXPORT-SNIPPET object from Org to LaTeX. CONTENTS is nil. INFO is a plist holding contextual information." - (when (eq (org-export-snippet-backend export-snippet) 'latex) - (org-element-property :value export-snippet))) + (if (eq (org-export-snippet-backend export-snippet) 'latex) + (org-element-property :value export-snippet) + (if (< 0 (org-element-property :post-blank export-snippet)) " "))) ;;;; Fixed Width --=-=-= Content-Type: text/plain -- Bastien --=-=-=--