Re: [Ebib-users] new feature?
Brought to you by:
joostkremers
From: Piter_ <x....@gm...> - 2011-03-03 09:39:03
|
Hi Joost. I have finally tried the function you wrote. Thanks it works. I juss made a minor modification. Because my bibtex keys look like Joost:2011 and i don't want ":" in filename I chage (puthash 'file (concat "{" (car (edb-cur-entry ebib-cur-db)) ".pdf}") ebib-cur-entry-hash) to (puthash 'file (replace-regexp-in-string ":" "" (concat "{" (car (edb-cur-entry ebib-cur-db)) ".pdf}")) ebib-cur-entry-hash) Thanks. On Sun, Oct 17, 2010 at 12:44 PM, Joost Kremers <joo...@fa...> wrote: > Hi Petro, > > Thanks for that clarification. The following function does what you want: > > ============================================================ > > (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: >> Sorry. >> My English was not clear. >> The string Fool1999.pdf has to go into "file" field of the same entry. >> Thanks. >> Petro. >> >> >> On Thu, Oct 14, 2010 at 4:52 PM, Joost Kremers <joo...@fa...> wrote: >> > On Thu, Oct 14, 2010 at 04:06:33PM +0200, Piter_ wrote: >> >> I would like to ask if its possible to implement the following in ebib. >> >> To make a keystroke that compose a filename for file from bibtex index >> >> and pdf extention. >> >> For example if I reference Fool1999 selected uponn pressing it in file >> >> file ill have Fool1999.pdf. >> > >> > I'm not entirely sure I understand what you mean. It's certainly possible to >> > create the string "Fool1999.pdf" on the basis of an entry key "Fool1999", but >> > where should it go? Do you mean something like the push functionality, where an >> > entry key gets pushed to another buffer? >> > >> > Joost >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Beautiful is writing same markup. Internet Explorer 9 supports >> > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >> > Spend less time writing and rewriting code and more time creating great >> > experiences on the web. Be a part of the beta today. >> > http://p.sf.net/sfu/beautyoftheweb >> > _______________________________________________ >> > Ebib-users mailing list >> > Ebi...@li... >> > https://lists.sourceforge.net/lists/listinfo/ebib-users >> > >> >> ------------------------------------------------------------------------------ >> Download new Adobe(R) Flash(R) Builder(TM) 4 >> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly >> Flex(R) Builder(TM)) enable the development of rich applications that run >> across multiple browsers and platforms. Download your free trials today! >> http://p.sf.net/sfu/adobe-dev2dev >> _______________________________________________ >> Ebib-users mailing list >> Ebi...@li... >> https://lists.sourceforge.net/lists/listinfo/ebib-users > > -- > Joost Kremers > Life has its moments > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > _______________________________________________ > Ebib-users mailing list > Ebi...@li... > https://lists.sourceforge.net/lists/listinfo/ebib-users > |