Re: [Ebib-users] new feature?
Brought to you by:
joostkremers
From: Joost K. <joo...@fa...> - 2011-03-22 13:15:49
|
On Fri, Mar 18, 2011 at 04:42:35PM +0100, Piter_ wrote: > 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? erm, yeah... after adding the filename to the file field, the database of course needs to be marked as modified... i should really write some decent access functions for interacting with the database... then this wouldn't be a problem. but for now, just change the function below to: (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-set-modified t) (ebib-fill-entry-buffer))) ((default) (beep)))) this only adds the line (ebib-set-modified t), which tells ebib that the database was modified. HTH -- Joost Kremers Life has its moments |