From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jonas Steverud Newsgroups: gmane.emacs.help Subject: Re: [BBDB] Entry decay? Date: Fri, 04 Oct 2002 10:18:29 +0200 Organization: Church of Emacs, Missionary Dep. Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1033719738 26108 127.0.0.1 (4 Oct 2002 08:22:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 4 Oct 2002 08:22:18 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17xNiy-0006mw-00 for ; Fri, 04 Oct 2002 10:22:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17xNiP-00077c-00; Fri, 04 Oct 2002 04:21:41 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.54.122.107!newsfeed1.bredband.com!bredband!news01.chello.se!news-peer-europe.sprintlink.net!news.stupi.se!newsfeed.sunet.se!news01.sunet.se!news.chalmers.se!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: licia.dtek.chalmers.se Original-X-Trace: nyheter.chalmers.se 1033719509 18072 129.16.30.88 (4 Oct 2002 08:18:29 GMT) Original-X-Complaints-To: abuse@chalmers.se Original-NNTP-Posting-Date: 4 Oct 2002 08:18:29 GMT Mail-Copies-To: never User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (sparc-sun-solaris2.8) Cancel-Lock: sha1:XroA/n7LbUbYStH10l70+rk6NHc= Original-Xref: shelby.stanford.edu gnu.emacs.help:105700 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2247 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2247 Robert Marshall writes: [...] > So bbdb-expire works with bbdb 'out of the box' rather than what I said! I made a change to the way it works, i don't like the idea of adding a "permanent" field to all entries, it is mor common to have permanent entries then expirable ones in my BBDB so I wrote the following code, which is tested once (and worked): ;; Beginning of code ;; Since I don't want to expire all kinds of records, only those I've ;; marked for expiry, I need to add this function to ;; bbdb-expire-preservation-functions. Only records that contains the ;; bbdb-expire field and it is set to "Yes" (observe case!) is allowed ;; to be deleted. In my BBDB there are more records which are ;; permanent then there are records that are expireable, so doing this ;; with the "permanent" field is more work then using this approch. (defun js-bbdb-expire-not-marked-for-expire-p (RECORD) "If RECORD does contain the bbdb-expire field and it is set to ``Yes'', it is considered to be expireable and the function returns nil, otherwise it returns t. The logic is slightly inversed. Best used in bbdb-expire-preservation-functions." (not (string-equal "Yes" (bbdb-record-getprop RECORD 'bbdb-expire))) ) (add-hook 'bbdb-expire-preservation-functions 'js-bbdb-expire-not-marked-for-expire-p) (bbdb-expire-initialize) ;; End of code -- ( www.dtek.chalmers.se/~d4jonas/ ! Wei Wu Wei ) ( Meaning of U2 Lyrics, Roleplaying ! To Do Without Do )