From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Stefan-W. Hahn" Subject: [PATCH 3/5] org-bibtex.el: Replace double used fieldnames ":key" and ":byte". Date: Sun, 23 Mar 2014 11:16:09 +0100 Message-ID: <1395569771-32421-4-git-send-email-stefan.hahn@s-hahn.de> References: <20140221161702.GS7560@pille.home> <1395569771-32421-1-git-send-email-stefan.hahn@s-hahn.de> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRfSM-0008NN-8h for emacs-orgmode@gnu.org; Sun, 23 Mar 2014 06:16:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRfSG-0008S3-4B for emacs-orgmode@gnu.org; Sun, 23 Mar 2014 06:16:42 -0400 In-Reply-To: <1395569771-32421-1-git-send-email-stefan.hahn@s-hahn.de> 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: Bastien Cc: emacs-orgmode@gnu.org, "Stefan-W. Hahn" * org-bibtex.el (org-bibtex-read-internal): Change property names. The bibtex parser returns =key= for the key of the bibtex entry =type= for the type of the bibtex entry. These both should not be mixed up with the ":key" and ":type" entries of a bibtex item. So they get renamed to ":bibkey" and ":bibtype" respectively. TINY CHANGE Signed-off-by: Stefan-W. Hahn --- lisp/org-bibtex.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el index 4fd1153..b4b707a 100644 --- a/lisp/org-bibtex.el +++ b/lisp/org-bibtex.el @@ -456,7 +456,7 @@ (defun org-bibtex-store-link () (entry (org-bibtex-read-internal))) (org-store-link-props - :key (cdr (assoc :key entry)) + :key (cdr (assoc :bibkey entry)) :author (or (cdr (assoc :author entry)) "[no author]") :editor (or (cdr (assoc :editor entry)) "[no editor]") :title (or (cdr (assoc :title entry)) "[no title]") @@ -473,8 +473,8 @@ (defun org-bibtex-store-link () :annote (or (cdr (assoc :annote entry)) "[no annotation]") :series (or (cdr (assoc :series entry)) "[no series]") :abstract (or (cdr (assoc :abstract entry)) "[no abstract]") - :btype (or (cdr (assoc :type entry)) "[no type]") - :type "bibtex" + :btype (or (cdr (assoc :bibtype entry)) "[no bibtype]") + :type "bibtex" ; hides bibtex entry :type :link link :description org-bibtex-description)))) @@ -614,8 +614,8 @@ (defun org-bibtex-read-internal () (lambda (pair) (cons (let ((field (funcall keyword (car pair)))) (case field - (:=type= :type) - (:=key= :key) + (:=type= :bibtype) + (:=key= :bibkey) (otherwise field))) (funcall clean-space (funcall strip-delim (cdr pair))))) (save-excursion (bibtex-beginning-of-entry) (bibtex-parse-entry))))) @@ -660,12 +660,12 @@ (defun org-bibtex-write () (insert (funcall val :title)) (org-bibtex-put "TITLE" (funcall val :title)) (org-bibtex-put org-bibtex-type-property-name - (downcase (funcall val :type))) + (downcase (funcall val :bibtype))) (dolist (pair entry) (case (car pair) (:title nil) (:type nil) - (:key (org-bibtex-put org-bibtex-key-property (cdr pair))) + (:bibkey (org-bibtex-put org-bibtex-key-property (cdr pair))) (:keywords (if org-bibtex-tags-are-keywords (mapc (lambda (kw) -- 1.8.3.2.733.gf8abaeb