From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leonard Randall Subject: Re: Bug: Error with org-bibtex export with tags when using custom bibtypes [8.2.5h (8.2.5h-82-gd91d4b-elpaplus @ /Users/leonardaveryrandall/.emacs.d/elpa/org-plus-contrib-20140324/)] Date: Sat, 19 Apr 2014 14:51:10 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=089e0149c9f80b3e3d04f7658f93 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WbVfk-0006it-VA for emacs-orgmode@gnu.org; Sat, 19 Apr 2014 09:51:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WbVfk-0004eg-12 for emacs-orgmode@gnu.org; Sat, 19 Apr 2014 09:51:12 -0400 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: emacs-orgmode@gnu.org, Bastien --089e0149c9f80b3e3d04f7658f93 Content-Type: multipart/alternative; boundary=089e0149c9f80b3e3404f7658f91 --089e0149c9f80b3e3404f7658f91 Content-Type: text/plain; charset=UTF-8 Hi Bastien et. al, I figured out how to fix the bug i reported awhile ago. The problem was that when making the keyword field for entries without keywords defined in the `:PROPERTIES:' drawer, org-bibtex uses `bibtex-make-field' from `bibtex.el'. This function sends up an error if there are no fields defined for the type of bib entry you are calling it on. In order to make it work on non-standard bib types you would have to define the fields associated with these types in `bibtex-entry-alist'. One way to deal with this would be to mention this in the appropriate docstrings. However this would leave org-bibtex somewhat unstable and dependent on variables outside of `org'. I think a better solution is to make the keyword field without calling `bibtex-make-field'. This can be done with a couple simple regexp functions. Here is the patch that I came up with. Let me know what you think. All best, Leonard --089e0149c9f80b3e3404f7658f91 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Bastien et. al,
I figured out how to fix the bug i = reported awhile ago. The problem was that when making the keyword field for= entries without keywords defined in the `:PROPERTIES:' drawer, =C2=A0o= rg-bibtex uses `bibtex-make-field' from `bibtex.el'. This function = sends up an error if there are no fields defined for the type of bib entry = you are calling it on. In order to make it work on non-standard bib types y= ou would have to define the fields associated with these types in `bibtex-e= ntry-alist'.=C2=A0
One way to deal with this would be to mention this in the appropriate = docstrings. However this would leave org-bibtex somewhat unstable and depen= dent on variables outside of `org'. =C2=A0I think a better solution is = to make the keyword field without calling `bibtex-make-field'. This can= be done with a couple simple regexp functions.

Here is the patch that I came up with. Let me know what= you think.
All best,
Leonard
--089e0149c9f80b3e3404f7658f91-- --089e0149c9f80b3e3d04f7658f93 Content-Type: application/octet-stream; name="org-bibtex.patch" Content-Disposition: attachment; filename="org-bibtex.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hu6ypr6m0 ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLWJpYnRleC5lbCBiL2xpc3Avb3JnLWJpYnRleC5lbAppbmRl eCA4MmVlY2RiLi5hYmNmMGI0IDEwMDY0NAotLS0gYS9saXNwL29yZy1iaWJ0ZXguZWwKKysrIGIv bGlzcC9vcmctYmlidGV4LmVsCkBAIC0zODUsNyArMzg1LDkgQEAgYW5kIGBvcmctZXhjbHVkZS10 YWdzLWZyb20taW5oZXJpdGVuY2UnLiIKIAkgICAgKGJpYnRleC1iZWdpbm5pbmctb2YtZW50cnkp CiAJICAgIChpZiAocmUtc2VhcmNoLWZvcndhcmQgImtleXdvcmRzLio9Lip7XFwoLipcXCl9IiBu aWwgdCkKIAkJKHByb2duIChnb3RvLWNoYXIgKG1hdGNoLWVuZCAxKSkgKGluc2VydCAiLCAiKSkK LQkgICAgICAoYmlidGV4LW1ha2UtZmllbGQgImtleXdvcmRzIiB0IHQpKQorCSAgICAgIChwcm9n biAocmUtc2VhcmNoLWZvcndhcmQgIixcXChcblxcKSIgbmlsIHQpIAorCQkgIChpbnNlcnQgIiAg a2V5d29yZHM9e30sXG4iKSkKKwkgICAgICAocmUtc2VhcmNoLWJhY2t3YXJkICJ9LCIgbmlsIHQp KQogCSAgICAoaW5zZXJ0IChtYXBjb25jYXQgIydpZGVudGl0eSB0YWdzICIsICIpKSkKIAkgIChi dWZmZXItc3RyaW5nKSkpKSkpCiAK --089e0149c9f80b3e3d04f7658f93--