From ffec4f98b123440b7056253c47b9b6ad301db189 Mon Sep 17 00:00:00 2001 From: Joost Kremers Date: Sun, 15 Jun 2008 22:16:22 +0200 Subject: [PATCH] ebib-find-bibtex-entries: bug fix ebib-find-bibtex-entries wouldn't read bibtex entries that have a space between the entry type and the opening parenthesis or brace: @article {entry-key ... Bug reported and fix provided by Rupert Swarbrick. --- src/ChangeLog | 7 +++++++ src/ebib.el | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9a10308..7e3ae99 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2008-06-15 Joost Kremers + + * ebib.el (ebib-read-string): bug fix: ebib would choke on bibtex + entries that have a space after the entry type but before the + opening parenthesis/brace. bug reported and fix provided by Rupert + Swarbrick. + 2008-05-31 Joost Kremers * ebib.el (ebib-index-window-size): "key buffer" in the doc string diff --git a/src/ebib.el b/src/ebib.el index a317a37..9c31dc8 100644 --- a/src/ebib.el +++ b/src/ebib.el @@ -1561,8 +1561,9 @@ is set to T." (goto-char (point-min)) (while (re-search-forward "^@" nil t) ; find the next entry (let ((beg (point))) - (when (looking-at-goto-end (concat ebib-bibtex-identifier "[\(\{]")) - (let ((entry-type (downcase (buffer-substring-no-properties beg (1- (point)))))) + (when (looking-at-goto-end (concat "\\(" ebib-bibtex-identifier "\\)[[:space:]]*[\(\{]") 1) + (let ((entry-type (downcase (buffer-substring-no-properties beg (point))))) + (looking-at-goto-end "[[:space:]]*[\(\{]") (cond ((equal entry-type "string") ; string and preamble must be treated differently (if (ebib-read-string) -- 2.11.4.GIT