emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <cdominik@newartisans.com>
To: emacs-orgmode@gnu.org
Subject: [Accepted] Check argument is a string before calling string-match
Date: Tue,  4 Oct 2011 14:36:53 +0200 (CEST)	[thread overview]
Message-ID: <20111004123653.A748D583596@u016822.science.uva.nl> (raw)
In-Reply-To: 1316474402-26292-1-git-send-email-bernt@norang.ca

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 <bernt@norang.ca>
> X-Patchwork-Id: 952
> Message-Id: <1316474402-26292-1-git-send-email-bernt@norang.ca>
> To: emacs-orgmode@gnu.org
> Cc: Bernt Hansen <bernt@norang.ca>
> 
> * 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))
> -		 " @<span class=\"timestamp-wrapper\">"
> -		 (if (match-end 1)
> -		     (format "@<span class=\"timestamp-kwd\">%s @</span>"
> -			     (match-string 1 s)))
> -		 (format " @<span class=\"timestamp\">%s@</span>"
> -			 (substring
> -			  (org-translate-time (match-string 3 s)) 1 -1))
> -		 "@</span>")
> -	      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))
> +		   " @<span class=\"timestamp-wrapper\">"
> +		   (if (match-end 1)
> +		       (format "@<span class=\"timestamp-kwd\">%s @</span>"
> +			       (match-string 1 s)))
> +		   (format " @<span class=\"timestamp\">%s@</span>"
> +			   (substring
> +			    (org-translate-time (match-string 3 s)) 1 -1))
> +		   "@</span>")
> +		s (substring s (match-end 0)))))
>        ;; Line break if line started and ended with time stamp stuff
>        (if (not r)
>  	  s
> 

  reply	other threads:[~2011-10-04 12:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-16 17:50 Problems with Org-Mode export Michael Hannon
2011-09-16 20:04 ` Michael Hannon
2011-09-17  4:59 ` David Maus
2011-09-19 21:17   ` Michael Hannon
2011-09-19 23:20     ` [PATCH] Check argument is a string before calling string-match Bernt Hansen
2011-10-04 12:36       ` Carsten Dominik [this message]
2011-09-20 19:31 ` Problems with Org-Mode export Michael Hannon
2011-09-20 20:29   ` Nick Dokos
2011-09-21  1:09     ` Michael Hannon
2011-09-21 14:37       ` Nick Dokos
2011-09-21 19:10         ` Michael Hannon

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=20111004123653.A748D583596@u016822.science.uva.nl \
    --to=cdominik@newartisans.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).