From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: [Accepted] Check argument is a string before calling string-match Date: Tue, 4 Oct 2011 14:36:53 +0200 (CEST) Message-ID: <20111004123653.A748D583596@u016822.science.uva.nl> References: <1316474402-26292-1-git-send-email-bernt@norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB4Ey-0006uH-OQ for emacs-orgmode@gnu.org; Tue, 04 Oct 2011 08:36:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RB4Ex-0005Rg-78 for emacs-orgmode@gnu.org; Tue, 04 Oct 2011 08:36:56 -0400 Received: from u016822.science.uva.nl ([146.50.39.34]:51253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB4Ew-0005RZ-WB for emacs-orgmode@gnu.org; Tue, 04 Oct 2011 08:36:55 -0400 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 Patch 952 (http://patchwork.newartisans.com/patch/952/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C1316474402-26292-1-git-send-email-bernt%40norang.ca%3E Here is the original message containing the patch: > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Subject: [O] Check argument is a string before calling string-match > Date: Tue, 20 Sep 2011 04:20:02 -0000 > From: Bernt Hansen > X-Patchwork-Id: 952 > Message-Id: <1316474402-26292-1-git-send-email-bernt@norang.ca> > To: emacs-orgmode@gnu.org > Cc: Bernt Hansen > > * lisp/org-html.el (org-export-as-html): Check string-match argument > (org-html-handle-time-stamps): Check string-match argument > > Avoid wrong-type-argument errors during exporting. > > --- > This may or may not be the same error you are getting - but I ran into > this during exporting back in August and it was sitting in my queue. > > Please report if this fixes your issue or not. > > -Bernt > > lisp/org-html.el | 30 ++++++++++++++++-------------- > 1 files changed, 16 insertions(+), 14 deletions(-) > > diff --git a/lisp/org-html.el b/lisp/org-html.el > index fde563b..6492c2f 100644 > --- a/lisp/org-html.el > +++ b/lisp/org-html.el > @@ -1598,7 +1598,8 @@ lang=\"%s\" xml:lang=\"%s\"> > (setq line (org-html-handle-links line opt-plist)) > > ;; TODO items > - (if (and (string-match org-todo-line-regexp line) > + (if (and org-todo-line-regexp > + (string-match org-todo-line-regexp line) > (match-beginning 2)) > > (setq line > @@ -2213,19 +2214,20 @@ for further information." > "Format time stamps in string S, or remove them." > (catch 'exit > (let (r b) > - (while (string-match org-maybe-keyword-time-regexp s) > - (or b (setq b (substring s 0 (match-beginning 0)))) > - (setq r (concat > - r (substring s 0 (match-beginning 0)) > - " @" > - (if (match-end 1) > - (format "@%s @" > - (match-string 1 s))) > - (format " @%s@" > - (substring > - (org-translate-time (match-string 3 s)) 1 -1)) > - "@") > - s (substring s (match-end 0)))) > + (when org-maybe-keyword-time-regexp > + (while (string-match org-maybe-keyword-time-regexp s) > + (or b (setq b (substring s 0 (match-beginning 0)))) > + (setq r (concat > + r (substring s 0 (match-beginning 0)) > + " @" > + (if (match-end 1) > + (format "@%s @" > + (match-string 1 s))) > + (format " @%s@" > + (substring > + (org-translate-time (match-string 3 s)) 1 -1)) > + "@") > + s (substring s (match-end 0))))) > ;; Line break if line started and ended with time stamp stuff > (if (not r) > s >