Re: [Ebib-users] new feature?
Brought to you by:
joostkremers
From: Piter_ <x....@gm...> - 2011-03-18 15:42:44
|
Hi Joost. I have tried the function below and it does make a filename from the key. But I have a problem here. The changes are not saved. Ebib seems to not notice edition of the "file" field. It does not propose to save the database and if I try "s" command, it also does not help. Is anything can be done with it? Thanks. Petro. On Sun, Oct 17, 2010 at 12:44 PM, Joost Kremers <joo...@fa...> wrote: > Hi Petro, > > ============================================================ > > (defun ebib-pdf-file-name () > "Create a pdf file name of the basis of the current entry key. > The file name is inserted in the file field of the current entry." > (interactive) > (ebib-execute-when > ((entries) > (if (gethash 'file ebib-cur-entry-hash) > (beep) > (puthash 'file (concat "{" (car (edb-cur-entry ebib-cur-db)) ".pdf}") ebib-cur-entry-hash) > (ebib-fill-entry-buffer))) > ((default) > (beep)))) > > ============================================================ > > I'm not sure if I'll include this in Ebib, so it's probably easiest for you to > put this into your ~/.emacs. As it is, the function can be called with M-x > ebib-pdf-file-name, but you'll probably want to bind it to a key. You can do so > in ~/.emacs as well, with: > > (ebib-key index "D" ebib-pdf-file-name) > > (Choose any key you want, of course.) Note: the function is meant to be used in > the index buffer (which I assume is what you want). In order for this key > assignment to work, you'll need to load ebib in your ~/.emacs, not autoload it. > So instead of the autoload line as explained in the manual, just put the > following in ~/.emacs: > > (load "path/to/ebib.el") > > You'll need to specify the correct path, of course. > > Best, > > Joost > > > On Fri, Oct 15, 2010 at 12:49:19PM +0200, Piter_ wrote: |