emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Bernt Hansen <bernt@norang.ca>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] HTML export - Do not add spaces to the data in <pre> sections
Date: Wed, 3 Sep 2008 11:36:57 +0200	[thread overview]
Message-ID: <4F9AE931-E700-4F32-A079-EDC2D451FF98@uva.nl> (raw)
In-Reply-To: <87abflt00u.fsf@gollum.intra.norang.ca>


[-- Attachment #1.1: Type: text/plain, Size: 1522 bytes --]

Hi Bernt,  I am not sure if I understand your patch correctly:

On Aug 10, 2008, at 4:30 PM, Bernt Hansen wrote:

> <pre> sections for HTML export should be clean.  We can use styles
> to indent the text if that is desired.
>
> This allows copying and pasting the text from the HTML document
> so that you get the original data in the
> #+BEGIN_EXAMPLE
> ..
> #+END_EXAMPLE
> block.
> ---
>
> I use <pre>..</pre> sections to save commands I use regularly in my
> system documentation.  I copy and paste data directly from these
> sections and noticed the extra 2 blanks preceeding the data.
>
> This change removes the blanks only for HTML export.  The latex and
> Ascii exports are unchanged.
>
> lisp/org-exp.el |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index 32fa819..98fb4fe 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -2953,7 +2953,7 @@ lang=\"%s\" xml:lang=\"%s\">
>
> 	  ;; Fixed-width, verbatim lines (examples)
> 	  (when (and org-export-with-fixed-width
> -		     (string-match "^[ \t]*:\\(.*\\)" line))
> +		     (string-match "^[ \t]*:  \\(.*\\)" line))

Why are you matching exactly two spaces here?  Ah, I guess I am  
inserting
these when processing the examples....
Maybe it would be better to not insert the spaces, or insert them for  
ascii
export only.  I will do that.  Thanks.

- Carsten

>
> 	    (when (not infixed)
> 	      (setq infixed t)
> 	      (insert "<pre class=\"example\">\n"))
> -- 
> 1.6.0.rc2
>


[-- Attachment #1.2: Type: text/html, Size: 2664 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2008-09-03  9:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-10 14:30 [PATCH] HTML export - Do not add spaces to the data in <pre> sections Bernt Hansen
2008-09-03  9:36 ` Carsten Dominik [this message]
2008-09-03 12:00   ` Bernt Hansen
2008-09-03 12:41     ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F9AE931-E700-4F32-A079-EDC2D451FF98@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).