Re: [Ebib-users] mastersthesis
Brought to you by:
joostkremers
From: <ts...@ts...> - 2011-09-14 19:45:13
|
Hi Joost, Joost Kremers <joo...@fa...> writes: > Hi Tom, > > I forgot to add a (require 'bibtex) to Ebib, which I've now fixed. If bibtex.el > isn't loaded, autogenerating keys won't work. However... Yes, this fixed the problem on emacs 23.1.95. I pulled the latest ebib, compiled ebib.elc, restarted emacs, opened my test bibliography, hit 'K' in the index and the key changed to one formatted as I expected. Emacs 24 doesn't work for me, though. It still throws the stringp, nil error. I don't consider this much of a test, though. I don't compile emacs 24 here, but occasionally download a nightly build from a web site that offers emacs for OS X. I typically find that a few things I use regularly don't work, so I give up and go back to emacs 23. Thanks very much for adding this functionality. I'm eager to explore the possibility of integrating ebib into the regular workflow of my colleagues. All the best, Tom > > On Wed, Sep 14, 2011 at 06:10:03AM -1000, Thomas S. Dye wrote: >> This doesn't work for me. I pulled from git, removed the old ebib.elc, >> started ebib, added a new entry, returned to the Ebib-index buffer with >> point at the temporary key, and hit 'K'. The key did not change. In >> Emacs 23 two white bars, one at the top and the other at the bottom, >> flashed briefly. In Emacs 24, which I don't use regularly, a white >> rectangle flashed briefly and a message appeared: Wrong type argument: >> stringp, nil. > > ... that is not the error one would expect. (It would say 'Symbol's function > definition is void: bibtex-generate-autokey'.) > > I'm using Emacs 23.2.1 and it works fine. (I haven't tested on Emacs 24, which I > don't have installed). > > Could you replace the definition of ebib-generate-autokey with the following: > > ==================== > > (defun ebib-generate-autokey () > "Automatically generate a key for the current entry. > This function uses the function BIBTEX-GENERATE-AUTOKEY to > generate the key, see that function's documentation for details." > (interactive) > (ebib-execute-when > ((real-db entries) > (let ((new-key > (with-temp-buffer > (ebib-format-entry (ebib-cur-entry-key) ebib-cur-db nil) > (goto-char (point-min)) > (bibtex-generate-autokey)))) > (message "New key: %s" new-key) > (if (member new-key (edb-keys-list ebib-cur-db)) > (error (format "Key `%s' already exists" new-key)) > (ebib-update-keyname new-key)))) > ((default) > (beep)))) > > ==================== > > (Just copy&paste into the *scratch* buffer, position the cursor after the last > parenthesis and do C-x C-e. That'll load the new function definition, there's no > need to edit ebib.el.) > > That should output the new key in the minibuffer when you hit 'K'. That should > at least make clear whether bibtex-generate-autokey has done its work... > > Joost -- T.S. Dye & Colleagues, Archaeologists 735 Bishop St, Suite 315, Honolulu, HI 96813 Tel: 808-529-0866, Fax: 808-529-0884 http://www.tsdye.com |