From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Emacs 22 support - use org-string-match-p Date: Fri, 4 Jun 2010 21:03:13 +0200 Message-ID: References: <87d3w8mhaa.fsf@gollum.intra.norang.ca> <1275570657-14876-1-git-send-email-bernt@norang.ca> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=51703 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKcAr-00034c-Nz for emacs-orgmode@gnu.org; Fri, 04 Jun 2010 15:03:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKcAo-0000DP-Og for emacs-orgmode@gnu.org; Fri, 04 Jun 2010 15:03:21 -0400 Received: from mail-ew0-f214.google.com ([209.85.219.214]:43008) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKcAo-0000DE-JA for emacs-orgmode@gnu.org; Fri, 04 Jun 2010 15:03:18 -0400 Received: by ewy6 with SMTP id 6so819440ewy.32 for ; Fri, 04 Jun 2010 12:03:17 -0700 (PDT) In-Reply-To: <1275570657-14876-1-git-send-email-bernt@norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: emacs-orgmode@gnu.org Applied, thanks. - Carsten On Jun 3, 2010, at 3:10 PM, Bernt Hansen wrote: > * contrib/lisp/org-special-blocks.el (org-special-blocks-make- > special-cookies): > Emacs 22 doesn't have string-match-p > * lisp/org-freemind.el (org-freemind-write-mm-buffer): > (org-freemind-get-node-style): > Emacs 22 doesn't have string-match-p > * lisp/org-html.el (org-html-make-link): > Use new org-string-match-p for compatibility > --- > Updated patch using org-string-match-p > This is available at git://git.norang.ca/org-mode.git emacs22 > > -Bernt > > contrib/lisp/org-special-blocks.el | 2 +- > lisp/org-freemind.el | 4 ++-- > lisp/org-html.el | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/contrib/lisp/org-special-blocks.el b/contrib/lisp/org- > special-blocks.el > index af50b30..d97cff3 100644 > --- a/contrib/lisp/org-special-blocks.el > +++ b/contrib/lisp/org-special-blocks.el > @@ -51,7 +51,7 @@ seen. This is run after a few special cases are > taken care of." > (when (or htmlp latexp) > (goto-char (point-min)) > (while (re-search-forward "^#\\+\\(begin\\|end\\)_\\(.*\\)$" nil > t) > - (unless (string-match-p org-special-blocks-ignore-regexp > (match-string 2)) > + (unless (org-string-match-p org-special-blocks-ignore-regexp > (match-string 2)) > (replace-match > (if (equal (downcase (match-string 1)) "begin") > (concat "ORG-" (match-string 2) "-START") > diff --git a/lisp/org-freemind.el b/lisp/org-freemind.el > index 9aabbea..538b404 100644 > --- a/lisp/org-freemind.el > +++ b/lisp/org-freemind.el > @@ -552,7 +552,7 @@ Otherwise give an error say the file exists." > (defun org-freemind-write-mm-buffer (org-buffer mm-buffer node-at- > line) > (with-current-buffer org-buffer > (dolist (node-style org-freemind-node-styles) > - (when (string-match-p (car node-style) buffer-file-name) > + (when (org-string-match-p (car node-style) buffer-file-name) > (setq org-freemind-node-style (cadr node-style)))) > ;;(message "org-freemind-node-style =%s" org-freemind-node-style) > (save-match-data > @@ -725,7 +725,7 @@ Otherwise give an error say the file exists." > (dolist (style-list org-freemind-node-style) > (let ((node-regexp (car style-list))) > (message "node-regexp=%s node-name=%s" node-regexp node-name) > - (when (string-match-p node-regexp node-name) > + (when (org-string-match-p node-regexp node-name) > ;;(setq node-style (org-freemind-do-apply-node-style style- > list)) > (setq node-style (cadr style-list)) > (when node-style > diff --git a/lisp/org-html.el b/lisp/org-html.el > index f7dd1b3..d18350d 100644 > --- a/lisp/org-html.el > +++ b/lisp/org-html.el > @@ -641,7 +641,7 @@ MAY-INLINE-P allows inlining it as an image." > (let > ((str (org-export-html-format-href thefile))) > (if (and type (not (string= "file" type)) > - (string-match "^//" str)) > + (org-string-match-p "^//" str)) > (concat type ":" str) > str))) > > -- > 1.7.1.240.g225c > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten