Thread: [Ebib-users] how to edit the key?
Brought to you by:
joostkremers
From: Mandar M. <man...@gm...> - 2012-08-31 11:40:42
|
Hi, Recently discovered ebib, and it looks great! Since I'm a new user, I'm still using a mix of ebib and editing the raw bib file. I'm wondering if there's any way to edit the key itself via ebib. A quick look in the manual didn't yield anything. This leads me to the next question. Suppose I change the key (or make some other edit) directly in the .bib file. Can I get ebib to reload the data without quitting and restarting? Thanks, mandar. |
From: Joost K. <joo...@fa...> - 2012-08-31 11:51:02
|
Hi Mandar, On Fri, Aug 31 2012, Mandar Mitra <man...@gm...> wrote: > Recently discovered ebib, and it looks great! Thanks. :-) > Since I'm a new user, I'm > still using a mix of ebib and editing the raw bib file. I'm wondering if > there's any way to edit the key itself via ebib. A quick look in the > manual didn't yield anything. `E' does this. I'm not sure if it's mentioned anywhere in the manual, though, except in the list of available keys. > This leads me to the next question. Suppose I change the key (or make > some other edit) directly in the .bib file. Can I get ebib to reload > the data without quitting and restarting? There's no automatic way. Quitting and restarting should be the quickest way if you've set ebib-preload-bib-files, otherwise you can close the database with `c' and open it again with `o'. You'll have to specify the full path then, though, so that's not necessarily quicker. Might be a good idea though, to add some way to reload a .bib file... HTH Joost -- Joost Kremers Life has its moments |
From: Mandar M. <man...@gm...> - 2012-09-01 10:21:33
|
Hi Joost, > `E' does this. I'm not sure if it's mentioned anywhere in the manual, > though, except in the list of available keys. Indeed it is. I should have looked more carefully. Section "Editing the Database", subsection "Adding and Deleting Entries", para 3. > There's no automatic way. Quitting and restarting should be the quickest > way if you've set ebib-preload-bib-files, otherwise you can close the > database with `c' and open it again with `o'. You'll have to specify the > full path then, though, so that's not necessarily quicker. > > Might be a good idea though, to add some way to reload a .bib file... One use case where this might be useful is if I'm working with a collaborator on a paper, and the files are shared (e.g. through Dropbox). If a co-author changes a bib file, it would be nice to be able to reload quickly. For ordinary tex files, emacs prompts me whether I should revert-buffer. Something similar for ebib... If I can put something quick and dirty together, will circulate for feedback. Looking forward to a long and fruitful relationship with ebib :), mandar. |
From: Robbie M. <ro...@ac...> - 2012-09-01 10:42:17
|
Hi Mandar, Joost, and all ------------------------------------------------------------ To: "Discussion of issues relating to Ebib." <ebi...@li...> Subject: Re: [Ebib-users] how to edit the key? Message-ID: <201...@gm...> From: Mandar Mitra <man...@gm...> Date: Sat, 1 Sep 2012 15:56:13 +0530 ------------------------------------------------------------ > If I can put something quick and dirty > together, will circulate for feedback. Would having two 'git' branches help here: master and dev (or development or alpha or unstable). > Looking forward to a long and fruitful > relationship with ebib :), I am also interested in contributing. I've used many reference management systems over the years: custom FoxPro, custom Access, EndNote, bibtex-mode, bibtool, custom Awk (really!). And I find 'ebib' offers a nice mix of simplicity, usability, and extensibility. Full marks to Joost. Robbie --- Robbie Morrison PhD student -- policy-oriented energy system simulation Technical University of Berlin (TU-Berlin), Germany University email (redirected) : mor...@ie... Webmail (preferred) : ro...@ac... [from Webmail client] |
From: Joost K. <joo...@fa...> - 2012-09-01 22:36:25
|
Mandar Mitra <man...@gm...> writes: > One use case where this might be useful is if I'm working with a > collaborator on a paper, and the files are shared (e.g. through > Dropbox). If a co-author changes a bib file, it would be nice to > be able to reload quickly. For ordinary tex files, emacs prompts me > whether I should revert-buffer. Something similar for ebib... Ah, that already goes a step further. ;-) Not just the ability to reload the file, but also a warning when it has changed... Reloading the file is easy to implement, that's just another command. Checking for a file change would require keeping track of the file's state when it's opened, or at least the time when it's opened and then comparing that with the latest modification time when the user edits the file. It's doable, of course, but I'd have to think about the best way to implement it. Actually, it would be very easy if Ebib would just load the .bib file in a buffer and operate on that. Then Emacs would keep track of changes. The thing is that Ebib doesn't do that... It opens the .bib file, reads its contents and stores in in a hash table, and then closes the buffer again. > If I can put something quick and dirty together, will circulate for > feedback. If you come up with something, please share. :-) Best, Joost -- Joost Kremers Life has its moments |
From: Robbie M. <ro...@ac...> - 2012-09-02 20:47:06
|
Hello Joost, Mandar ------------------------------------------------------------ To: "Discussion of issues relating to Ebib." <ebi...@li...> Subject: Re: [Ebib-users] how to edit the key? Message-ID: <87t...@fa...> From: Joost Kremers <joo...@fa...> Date: Sun, 02 Sep 2012 00:36:11 +0200 ------------------------------------------------------------ > Ah, that already goes a step further. ;-) Not just > the ability to reload the file, but also a warning > when it has changed... > > Reloading the file is easy to implement, that's just > another command. > > Checking for a file change would require keeping > track of the file's state when it's opened, or at > least the time when it's opened and then comparing > that with the latest modification time when the user > edits the file. The reload command should report whether any databases have changed or not. That would be useful to know and easy to compute. It should also warn if recent user edits will be overwritten and seek confirmation to proceed. --- The code to track the underlying BibTeX files is much more complicated. It will need: * to be multi-platform * deal with simultaneous editing and with conflicts * run periodically, say every minute Even if 'ebib' offered this functionality, your colleagues could well be editing BibTeX files with straight text editors ('nano' or Notepad) without this oversight. How will they cope with your changes? An alternative approach would be to put your common BibTeX files under 'git' or some other revision control system and let the RCS handle all this. That is exactly what they are designed to do, whether client-server or distributed. My instinct is that tracking should *not* be added for the reason that it is difficult to create a sufficiently robust solution -- moreover false promises will only lead to confusion when not honored. Furthermore, one of the appeals of 'ebib' is that it is lean at only 4k source lines. --- At the very least, a few paragraphs on how this feature is to work and in what use-cases should be penned before the hacking begins. my initial thoughts but I think you get the drift, cheers Robbie --- Robbie Morrison PhD student -- policy-oriented energy system simulation Institute for Energy Engineering (IET) Technical University of Berlin (TU-Berlin), Germany University email (redirected) : mor...@ie... Webmail (preferred) : ro...@ac... [from Webmail client] |
From: Joost K. <joo...@fa...> - 2012-09-01 23:21:40
|
Robbie Morrison <ro...@ac...> writes: > Would having two 'git' branches help here: master > and dev (or development or alpha or unstable). Actually, with git, branching is cheap and easy. So the "normal" thing to do is to just set up a new branch, work on whatever feature one wants to implement, test it, and if it's finished, merge it into master. BTW, with git, the usual way to contribute code is to clone the repo, set up a new topic branch, make the change/addition, and then send the maintainer a pull request. S/he can then pull in your topic branch and examine the code. Github makes this process a bit easier even, because you can simply fork someone else's repository and create new branches in the forked repo. And when you're ready to send a pull request, you just click a button on the website. If you have a github account, that would be my preferred way of collaboration. Otherwise, you can send your patches to me, of course. :-) J. -- Joost Kremers Life has its moments |