Re: [Ebib-users] mastersthesis
Brought to you by:
joostkremers
From: Joost K. <joo...@fa...> - 2011-09-14 18:19:27
|
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... 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 -- Joost Kremers Life has its moments |