Re: ~/.bbdb with multiple emacs instnaces
Ernesto Alfonso <[email protected]>
| Newsgroups | gmane.emacs.bbdb.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, sorry for the vague wording. By "leaves the ~/.bbdb file open" I meant that it leaves the emacs buffer whose underlying file is ~/.bbdb with unsaved changes throughout the session. > It seems dangerous to me to > have multiple emacs sessions updating your ~/.bbdb (or any other file) Yes. But this is what happens when running gnus in two emacs instances simultaneously on the same system. > You could use the variable bbdb-read-only to make sure that only one > emacs session can modify your ~/.bbdb (this variable should be nil > only in one session). This is a workaround that could work for me, although I'd still like my 2nd session to be able to save new contacts. > Or make sure that any changes you make to > your bbdb database are saved immediately into ~/.bbdb (but I'd call > this dangerous...). I don't manually make changes to ~/.bbdb, but the bbdb library keeps the buffer open and locked. It would be nice if bbdb had an option to write out changes immediately instead of leaving the ~/.bbdb buffer open. Thanks, Ernesto "Roland Winkler" <[email protected]> writes: >> Because of gnus limitations, I use one emacs intance per IMAP/SMTP >> server, for example for work and personal email. >> >> It seems that bbdb leaves the ~/.bbdb file open, causing problems >> with locks. Sometimes if I send email from instance A when I've >> previously sent from instance B, I must steal the ~/.bbdb file in >> A. >> >> Is there a bbdb option to help with this problem? > > What do you mean by "leaves the ~/.bbdb file open"? > > Emacs uses file locks when you edit a file but have not yet saved > your changes on disk. So this happens also with ~/.bbdb if you modify > this file, but have not yet saved it. It seems dangerous to me to > have multiple emacs sessions updating your ~/.bbdb (or any other file). > > You could use the variable bbdb-read-only to make sure that only one > emacs session can modify your ~/.bbdb (this variable should be nil > only in one session). Or make sure that any changes you make to > your bbdb database are saved immediately into ~/.bbdb (but I'd call > this dangerous...). > > Otherwise, I'd dig into gnus: I am not using it myself, but I > thought it can do pretty much anything. Are you sure it supports > only one IMAP/SMTP session per emacs session? I am using > old-fashioned VM where multiple such sessions are no problem, I do > this all the time.