On 2002-10-18, Alex Schroeder <[EMAIL PROTECTED]> wrote:
> I always wondered how to do this in Emacs 21. Rather than messing
> with bbdb-gui.el, which I had some difficulties in understanding
> because it uses lots of low-level stuff from vm (which I do not know),
> and is written for XEmacs (which I do not use), I went a different
> route. Integrating this back into bbdb-gui is probably messy and
> would ideally involve some refactoring as well. :(
Alex, thank you. This is really useful code. I think I even know how to
make it a little better.
> When you want to add somebody's face, you must first use `t' to show
> the headers, and then stuff after the X-Face: header.
Use this:
(add-to-list 'bbdb-auto-notes-alist
(list "x-face"
(list (concat "[ \t\n]*\\([^ \t\n]*\\)"
"\\([ \t\n]+\\([^ \t\n]+\\)\\)?"
"\\([ \t\n]+\\([^ \t\n]+\\)\\)?"
"\\([ \t\n]+\\([^ \t\n]+\\)\\)?"
)
'face
"\\1\\3\\5\\7")))
> (defun bbdb/gnus-display-xface ()
> "Search for face properties and display the faces."
> (when (or (gnus-image-type-available-p 'xface)
> (gnus-image-type-available-p 'pbm))
> (save-excursion
> (goto-char (point-min))
> (let ((inhibit-read-only t); edit the BBDB buffer
> (default-enable-multibyte-characters nil); prevents
> corruption pbm faces)
> (while (re-search-forward "^ face: \\(.*\\)" nil t)
> (setq faces (match-string 1))
> (replace-match "" t t nil 1)
> (dolist (data (split-string faces ", "))
^^^^
You could use (get 'face 'field-separator) instead of this.
> It works for me. If you want to experiment with the elisp, here is
> the piece of code I needed to get started.
It even works for me.
> Does anybody have a nice piece of code, that will let me add a face to
> a record when I hit `:' on a message?
See above (-:
Thank you,
--
Andreas Fuchs, <[EMAIL PROTECTED]>, [EMAIL PROTECTED], antifuchs
Was I helpful? Let others know:
http://svcs.affero.net/rm.php?r=antifuchs
-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0003en
_______________________________________________
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/