emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Baoqiu Cui <cbaoqiu@yahoo.com>
To: emacs-orgmode@gnu.org
Subject: Patch for a timestamp exporting bug in org-latex.el
Date: Tue, 14 Apr 2009 22:17:08 -0700	[thread overview]
Message-ID: <byciql6v6ln.fsf@muchbodyking-lm.corp.yahoo.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

Hi Carsten,

It seems that a minor old bug in LaTeX exporter was exposed recently by
your timestamp change.  When exporting a simple Org file that contains
just the following two lines to LaTeX format, I got an error message
saying "Invalid use of `\' in replacement text":

* DONE Test
  CLOSED: [2009-04-14 Tue 20:12]

A patch is attached at the end of this email.  Please let me know if you
see any problem with the fix.

Thanks,
Baoqiu


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: latex-timestamp.diff --]
[-- Type: text/x-patch, Size: 566 bytes --]

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 41f0e24..da80caf 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1096,7 +1096,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
 		    ".*" ; including the time stamp....
 		    )))
     (while (re-search-forward re nil t)
-      (replace-match (format "\\\\texttt{%s}" (match-string 0)) t))))
+      (replace-match (format "\\texttt{%s}" (match-string 0)) t t))))
 
 (defun org-export-latex-fixed-width (opt)
   "When OPT is non-nil convert fixed-width sections to LaTeX."

[-- Attachment #3: 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:[~2009-04-15  5:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-15  5:17 Baoqiu Cui [this message]
2009-04-15  6:34 ` Patch for a timestamp exporting bug in org-latex.el 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=byciql6v6ln.fsf@muchbodyking-lm.corp.yahoo.com \
    --to=cbaoqiu@yahoo.com \
    --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).