From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-exp-bibtex.el patch for zotero-generated citekeys Date: Thu, 6 Oct 2011 10:11:32 +0200 Message-ID: <05536ED6-CAC9-458D-9280-CA69B764C817@gmail.com> References: Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBj3J-0005Gp-FN for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 04:11:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBj3I-0002V7-C2 for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 04:11:37 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:59590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBj3I-0002Uu-7W for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 04:11:36 -0400 Received: by eye13 with SMTP id 13so2728415eye.0 for ; Thu, 06 Oct 2011 01:11:35 -0700 (PDT) In-Reply-To: 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: Nik Putnam Cc: emacs-orgmode@gnu.org This patch has now been accepted. - Carsten On Sep 12, 2011, at 10:26 PM, Nik Putnam wrote: > Dear Taru and orgmode community, > > Org-mode export to HTML is a really useful thing, and I love the > bibtex integration. > > I had a problem exporting from org-mode to HTML, with bibtex. I was > able to fix it with a change to a regular expression > org-exp-bibtex.el. The diff is shown below. > > (My bibtex citekeys were auto-created by zotero, and use underscores. > Some even have dashes.) > > I thought this might be useful to others as well. > > Thanks, > > Nik > > --- a/contrib/lisp/org-exp-bibtex.el > +++ b/contrib/lisp/org-exp-bibtex.el > @@ -102,8 +102,9 @@ > (save-match-data > (insert-file-contents (concat file ".html")) > (goto-char (point-min)) > - (while (re-search-forward "a > name=\"\\(\\w+\\)\">\\(\\w+\\)" nil t) > - (setq oebp-cite-plist (cons (cons (match-string 1) > (match-string 2)) oebp-cite-plist))) > + (while (re-search-forward "a > name=\"\\([a-z0-9A-Z_\\-]+\\)\">\\(\\w+\\)" nil t) > + (setq oebp-cite-plist (cons (cons (match-string 1) > (match-string 2)) oebp-cite-plist)) > + ) > (goto-char (point-min)) > (while (re-search-forward "
" nil t) > (replace-match "
" t t)) > - Carsten