From: Jonas Steverud <d4jonas@dtek.chalmers.se>
Subject: Re: [BBDB] Entry decay?
Date: Fri, 04 Oct 2002 10:18:29 +0200 [thread overview]
Message-ID: <wtnu1k2ty5m.fsf@licia.dtek.chalmers.se> (raw)
In-Reply-To: m1zntvs8t2.fsf@chezmarshall.freeserve.co.uk
Robert Marshall <spam@capuchin.co.uk> 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 )
prev parent reply other threads:[~2002-10-04 8:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-01 8:21 [BBDB] Entry decay? Jonas Steverud
2002-10-01 15:10 ` Sacha Chua
[not found] ` <mailman.1033485128.20141.help-gnu-emacs@gnu.org>
2002-10-02 7:25 ` Jonas Steverud
2002-10-02 11:31 ` Robert Marshall
2002-10-03 11:24 ` Jonas Steverud
2002-10-03 17:59 ` Robert Marshall
2002-10-04 8:18 ` Jonas Steverud [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wtnu1k2ty5m.fsf@licia.dtek.chalmers.se \
--to=d4jonas@dtek.chalmers.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.