From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: [PATCH] individual markups for active and inactive time stamps on export Date: Thu, 30 Jun 2011 22:38:48 +0100 Message-ID: <874o373spj.fsf@ucl.ac.uk> References: <87liwj48vu.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcOwq-0000i6-BA for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 17:38:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcOwo-0001uM-2V for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 17:38:56 -0400 Received: from vscane-b.ucl.ac.uk ([144.82.108.141]:43928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcOwn-0001u1-Ix for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 17:38:53 -0400 Received: from 79-67-228-191.dynamic.dsl.as9105.com ([79.67.228.191] helo=localhost) by vscane-b.ucl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1QcOwi-0006TI-Db for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 22:38:48 +0100 In-Reply-To: <87liwj48vu.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Thu, 30 Jun 2011 16:49:25 +0100") 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 --=-=-= Content-Type: text/plain Hello again, okay, I will answer my own post with a possible solution to my feature request earlier today. Attached is a patch that does the job; whether it is elegant enough or not is another question. I've not addressed the documentation at all yet. I will wait to see what the response to this simple patch might be... Thanks, eric * Allow for a different markup for inactive time stamps on latex export --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=org-latex-export-inactive-timestamps-differently.diff Content-Description: Allow for a different markup for inactive time stamps on latex export diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 1baa5f9..694f65b 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -292,6 +292,11 @@ markup defined, the first one in the association list will be used." :group 'org-export-latex :type 'string) +(defcustom org-export-latex-timestamp-inactive-markup "\\textit{%s}" + "A printf format string to be applied to inactive time stamps." + :group 'org-export-latex + :type 'string) + (defcustom org-export-latex-timestamp-keyword-markup "\\texttt{%s}" "A printf format string to be applied to time stamps." :group 'org-export-latex @@ -1613,7 +1618,9 @@ links, keywords, lists, tables, fixed-width" (org-if-unprotected-at (1- (point)) (replace-match (org-export-latex-protect-string - (format org-export-latex-timestamp-markup + (format (if (string= "<" (substring (match-string 0) 0 1)) + org-export-latex-timestamp-markup + org-export-latex-timestamp-inactive-markup) (substring (org-translate-time (match-string 0)) 1 -1))) t t))))) --=-=-= Content-Type: text/plain -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.525.gd6fb5.dirty) --=-=-=--