improved vCard export

2005-03-02 Thread Alex Schroeder
I think I didn't post it on this mailing list...
http://www.emacswiki.org/cgi-bin/wiki/BbdbExporters
For my Apple Addressbook I added some UTF-16 magic and
a few small fixes to bbdb-vcard-export.el
http://www.emacswiki.org/elisp/bbdb-vcard-export.el
Does anybody know the original author?
Does anybody feel like adding this file to BBDB?
As for myself, I've ended up not using Apple's Mail and switched to
Thunderbird for the moment.  And for that I used bbdb-rf with some
extra code I sent to the bbdb-rf author...  :)
Alex.

---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: improved vCard export

2005-03-02 Thread Alex Schroeder
Ronan Waide schrieb:
On March 1, [EMAIL PROTECTED] said:
 

I think I didn't post it on this mailing list...
http://www.emacswiki.org/cgi-bin/wiki/BbdbExporters
For my Apple Addressbook I added some UTF-16 magic and
a few small fixes to bbdb-vcard-export.el
http://www.emacswiki.org/elisp/bbdb-vcard-export.el
Does anybody know the original author?
   

;; Author: Jim Hourihan [EMAIL PROTECTED]
Waider. Seems pretty clear!
 

I didn't mail him because the Emacs Lisp List cites 
http://www.panix.com/~jimh/bbdb-vcard-export.el as the source of the 
program, but there's no site at that address.  I therefore assumed that 
the mail address would not work, either.

Alex.
---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: if not t and not nil

2004-11-06 Thread Alex Schroeder
Dan Jacobson [EMAIL PROTECTED] writes:

 Just curious, reading the docstring of bbdb-offer-save: If t,   If
 nil   If not t and not nil , wouldn't it be safer, in the
 first place, but not now, to use an exact value for the last, not a
 wildcard?

Yes I think you are right.

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fifth law:
OOO  Never accept more work than you can handle in one night of hacking.


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: export to .txt, .html

2004-11-06 Thread Alex Schroeder
Dan Jacobson [EMAIL PROTECTED] writes:

 P.S. ELIDEP is not explained here:
  bbdb is an interactive compiled Lisp function in `bbdb-com'.
  (bbdb STRING ELIDEP)

  Display all entries in the BBDB matching the regexp STRING
  in either the name(s), company, network address, or notes.

When you use C-u M-x bbdb RET dan RET you will get the matching
entries in elided form -- one line per entry.  It works by
temporarily switching bbdb-display-layout, but I must confess I didn't
quite understand how it picked the layout to use instead.

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fifth law:
OOO  Never accept more work than you can handle in one night of hacking.


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: output format

2004-11-06 Thread Alex Schroeder
Jochen Kpper [EMAIL PROTECTED] writes:

 Alex Schroeder [EMAIL PROTECTED] writes:

 When you use C-u M-x bbdb RET dan RET you will get the matching
 entries in elided form -- one line per entry. It works by
 temporarily switching bbdb-display-layout, but I must confess I
 didn't quite understand how it picked the layout to use instead.

 AFAICT it simply uses the one-line format.

Ok, I looked at it again.

Bbdb sets bbdb-display-layout to (bbdb-grovel-elide-arg elidep).  When
using C-u, elidep is set to (4).  In bbdb-grovel-elide-arg I see:

  (list 'if arg
(list 'not (list 'eq arg 0))
'bbdb-display-layout))

So this returns (not (eq '(4) 0)) which is t.  Bbdb then calls
bbdb-display-records with bbdb-display-layout bound to t.  Eventually
this calls bbdb-format-record with the record and t as arguments.

And the docstring of bbdb-format-record says:

layout can be a symbol describing a layout in
`bbdb-display-layout-alist'.  For compatibility reasons, layout
can also be nil or t, where t stands for the one-line, and nil for
the multi-line layout.

Ah!  That is what I was missing.

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fifth law:
OOO  Never accept more work than you can handle in one night of hacking.


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88alloc_id065op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: export to .txt, .html

2004-11-05 Thread Alex Schroeder
Dan Jacobson [EMAIL PROTECTED] writes:

 You might want to document the proper way.

I just do M-x bbdb and search for .  That gives me all the records in
a buffer.  C-x h selects the buffer, M-w copies it, and then I can
yank it elsewhere.  I also added two more entries to
bbdb-display-layout-alist to control the layout.  I like this approach
so much in fact that I have abandoned the tex way.  Plus no hassle
with non-Latin-1 characters.

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fifth law:
OOO  Never accept more work than you can handle in one night of hacking.


---
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588alloc_id=12065op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-insert-new-field should check first, Info

2004-10-08 Thread Alex Schroeder
Dan Jacobson [EMAIL PROTECTED] writes:

 bbdb-insert-new-field: there already are notes!
 Well you could have told me earlier.

Indeed.  Never noticed until now.

 Also there is no bug reporting item in that index.

That's true.  I'll add something.  The section Known Bugs doesn't tell
us anything, either.

 Also when one goes to the top bbdb info page, and hits 'u', one sees
  in.sid.i.ous aj   \in-'sid-e-*s\
 [L insidiosus, fr. insidiae ambush, fr. insidere to sit in, sit on,

Looks like an Easter Egg to me!

 Also there should be a bbdb-report-bbdb-bug command.

Yeah, the name is a little different...  M-x bbdb-submit-bug-report

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fifth law:
OOO  Never accept more work than you can handle in one night of hacking.


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-insert-new-field should check first, Info

2004-10-08 Thread Alex Schroeder
What do you think of the following patch?


*** bbdb.texinfo06 Aug 2003 11:06:01 +0200  1.51
--- bbdb.texinfo09 Oct 2004 00:27:01 +0200  
***
*** 1046,1051 
--- 1046,1052 
  @ref{Gnus Prep}.  For usage details, see @ref{Gnus Features}. The field used
  can be changed by changing the value of @code{bbdb/gnus-score-field}.
  @item mail-alias
+ @cindex mail-alias definition
  Value used instead of @code{name} for completion.  @xref{Mail Sending
  Interfaces}.
  @item mail-name
***
*** 1659,1666 
--- 1660,1670 
  people that you want to CC the message to, and then execute this command
  to add them to the list.
  
+ @unnumberedsubsec Mailing Lists and Mail Aliases
+ 
  @cindex Mailing lists
  @cindex Mail Aliases
+ @cindex mail-alias usage
  @findex bbdb-define-all-aliases
  @findex bbdb-add-or-remove-mail-alias
  @findex define-mail-alias
***
*** 3659,3676 
  
  @end enumerate
  
! It is commonly known that there are no bugs in the @b{BBDB}. Bugs found
! in defiance of this rule should be submitted to the @code{bbdb-info}
! mailing list (@pxref{Mailing Lists}).  To assist the developers, please
! include the version numbers of the various programs used when the bug
! occurred.  An example report follows.
! 
! @example
! BBDB Version:
! Emacs/XEmacs Version:
! Mail/News reader (Gnus, VM, etc) used:
! Bug Description:
! @end example
  
  @node TODO List, EOL Statements, Known Bugs, The Future
  @subsection TODO List
--- 3663,3674 
  
  @end enumerate
  
! It is commonly known that there are no bugs in the @b{BBDB}. Bugs
! found in defiance of this rule should be submitted using @kbd{M-x
! bbdb-submit-bug-report}.  These bug reports will bbe sent to the
! @code{bbdb-info} mailing list (@pxref{Mailing Lists}) and are
! available from public archives.  Other big brothers may be reading
! your bug reports.
  
  @node TODO List, EOL Statements, Known Bugs, The Future
  @subsection TODO List


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-insert-new-field should check first, Info

2004-10-08 Thread Alex Schroeder
Grr.  Forgot the @cindex Bug Reports...

Alex.


*** bbdb.texinfo06 Aug 2003 11:06:01 +0200  1.51
--- bbdb.texinfo09 Oct 2004 00:28:20 +0200  
***
*** 1046,1051 
--- 1046,1052 
  @ref{Gnus Prep}.  For usage details, see @ref{Gnus Features}. The field used
  can be changed by changing the value of @code{bbdb/gnus-score-field}.
  @item mail-alias
+ @cindex mail-alias definition
  Value used instead of @code{name} for completion.  @xref{Mail Sending
  Interfaces}.
  @item mail-name
***
*** 1659,1666 
--- 1660,1670 
  people that you want to CC the message to, and then execute this command
  to add them to the list.
  
+ @unnumberedsubsec Mailing Lists and Mail Aliases
+ 
  @cindex Mailing lists
  @cindex Mail Aliases
+ @cindex mail-alias usage
  @findex bbdb-define-all-aliases
  @findex bbdb-add-or-remove-mail-alias
  @findex define-mail-alias
***
*** 3659,3676 
  
  @end enumerate
  
! It is commonly known that there are no bugs in the @b{BBDB}. Bugs found
! in defiance of this rule should be submitted to the @code{bbdb-info}
! mailing list (@pxref{Mailing Lists}).  To assist the developers, please
! include the version numbers of the various programs used when the bug
! occurred.  An example report follows.
! 
! @example
! BBDB Version:
! Emacs/XEmacs Version:
! Mail/News reader (Gnus, VM, etc) used:
! Bug Description:
! @end example
  
  @node TODO List, EOL Statements, Known Bugs, The Future
  @subsection TODO List
--- 3663,3675 
  
  @end enumerate
  
! @cindex Bug Reports
! It is commonly known that there are no bugs in the @b{BBDB}. Bugs
! found in defiance of this rule should be submitted using @kbd{M-x
! bbdb-submit-bug-report}.  These bug reports will bbe sent to the
! @code{bbdb-info} mailing list (@pxref{Mailing Lists}) and are
! available from public archives.  Other big brothers may be reading
! your bug reports.
  
  @node TODO List, EOL Statements, Known Bugs, The Future
  @subsection TODO List


---
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB and coding systems

2004-09-03 Thread Alex Schroeder
Graham Gough [EMAIL PROTECTED] writes:

 Tried this, it saved, then the next time the file needed saving I  and
 got the message 

   These default coding systems were tried:
   iso-2022-7bit-unix iso-latin-1
   However, none of them safely encodes the target text.

 Is there any way to identify the characters that are ausing the
 problem?

They should either be highlighted (Emacs 20.3 I think) or point should
be at the first character (Emacs 21 I think).  Switch to the .bbdb
buffer and save manually to see it.  What I *think* has happened is
that you or BBDB has added the cookies without transcoding the file.
The file is therefore still in some other encoding which gets read as
iso-2022-7bit.  Try this:  Remove the cookie from a copy of the file,
save, close the file, and open it again (this is important, don't
reopen it, close it, then open it).  Emacs should the automatically
determine a good encoding.  Check whether the heuristics were right.
If satisfied, use C-x C-m C-f iso-2022-7bit RET to set the encoding
your want to use, and save.  Close it, open it, just to check that it
still works.  Also check what encoding Emacs thinks the file is in
(look at the indicator at the beginning of the modeline).  Then add
the coding cookie again, save, open again, check it still works,
replace .bbdb with the copy.  (Opening .bbdb, deleting the contents,
and using file-insert to insert the copy might not work, because then
you are using the buffer-file-encoding of the original instead of the
copy when saving.)

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fifth law:
OOO  Never accept more work than you can handle in one night of hacking.


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047alloc_id=10808op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: coding issues

2004-09-01 Thread Alex Schroeder
Jochen Kpper [EMAIL PROTECTED] writes:

 The message contained the header
 ,
 | Organization: SFB 378, Computerlinguistik, Universitt des Saarlandes
 `
 which was automatically added to the corresponding bbdb-entry as
 ,
 | =?iso-8859-1?q?SFB_378,_Computerlinguistik,_Universit=E4t?= 
 =?iso-8859-1?q?_des_Saarlandes?=
 `
 How do I convince bbdb to actually put the right (encoded) string into
 the database instead of this obscured version?

How do you get it?  From here to there?  I assume some raw Gnus buffer
instead of the washed article buffer?  In that case you have to do the
decoding yourself...

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fifth law:
OOO  Never accept more work than you can handle in one night of hacking.


---
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47alloc_id808op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb: mule and no mule xemacs: problems

2004-08-16 Thread Alex Schroeder
Ronan Waide [EMAIL PROTECTED] writes:

 Recently I switched from xemacs 21.4.15 no mule to the mule version and
 back, to my horror the entry 
 Rosa Mara Pardo San Gil 
 was changed to
 
 Rosa Mar,Am(Ba Pardo San Gil
 
 How can I convert this back again.

Maybe this is just in iso-2022-7-bit or something?  Then you can
convert it using your favorite editor, or recode, or iconv.  The
question is, why was it not read correctly?  Maybe there is a coding
cookie in the file, now?  My file starts with the following:

;; -*-coding: iso-2022-7bit;-*-

Perhaps switching to no-mule changed this cookie, but switching back
did not?

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fourth law:
OOO  None of your friends and coworkers share your taste in music.


---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink  Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


FOAF

2004-04-29 Thread Alex Schroeder
I've been using the following code with a patched xml.el to extract
people from my BBDB into a FOAF fragment.  The code will be placed on
the Emacs Wiki, so check there for future versions.


(require 'xml)

(defun bbdb-foaf (optional all)
  Print a list of people you know for inclusion in a FOAF file.
The optional argument ALL indicates that you want to export everybody
in your BBDB file.  The default is to export only the people that have
the 'foaf' field defined.  The 'foaf' field should contain the URL of
a FOAF file describing them.

Fields used:

'www'   foaf:homepage
'mbox'  foaf:mbox_sha1sum
'net'   foaf:mbox if no 'mbox' field exists
'name'  foaf:name
'foaf'  rdfs:seeAlso
  (interactive P)
  (pop-to-buffer (get-buffer-create *FOAF*))
  (erase-buffer)
  (insert !-- Beginning of BBDB block --\n)
  (dolist (record (bbdb-records))
(when (or all (bbdb-record-getprop record 'foaf))
  (xml-debug-print-internal
   (list 'foaf:knows nil
 (list 'foaf:Person nil
   (list 'foaf:name nil (bbdb-record-name record))
   (when (bbdb-record-getprop record 'www)
 (list 'foaf:homape nil (bbdb-record-getprop record 'www)))
   (if (bbdb-record-getprop record 'mbox)
   (list 'foaf:mbox_sha1sum nil (bbdb-record-getprop record 'mbox))
 (when (bbdb-record-net record)
   (list 'foaf:mbox nil (car (bbdb-record-net record)
   (when (bbdb-record-getprop record 'foaf)
 (list 'rdfs:seeAlso
   (list (cons 'rdf:resource
   (bbdb-record-getprop record 'foaf)))
   )
  (newline)))
  (insert !-- End of BBDB block --\n))



---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [PB]: bbdb-file encoding

2004-04-13 Thread Alex Schroeder
Dave Love [EMAIL PROTECTED] writes:

 I'd just like to see both code and comment fixed such that I can
 understand it a few months from now.  Can you suggest a change?

 Sorry, you'll have to explain why either needs fixing.  (I can still
 understand them, for what it's worth.)

My problem was that some user asked about BBDB file encodings, and
then I noticed the cookie -*-coding: iso-2022-7bit;-*- in my .bbdb
file and the variable bbdb-file-coding-system's value, 'utf-8-emacs.
I then looked at the bbdb-file-coding-system doc string, and found no
explanation, and later I saw the comment in the source, which also
didn't explain to me why I was getting utf-8-emacs instead of
iso-2022-7bit.  The comment in the source also claims that
utf-8-emacs is somehow superior to iso-2022-7bit in the Unicode
branch, which is something I also don't understand.

My gut feeling was therefore that we should use the following:

 (defconst bbdb-file-coding-system 'iso-2022-7bit
   Coding system used for reading and writing `bbdb-file'.
 This should not be changed by users.)

It would work always, and no fancy coding systems only the Unicode
branch will be able to use.  And when you're using the Unicode branch,
the variable seems to have no effect...  At least I'm seeing a J in
my modeline when I open the .bbdb file.

Does that explain why I think the current code and comment need some
change?  Either the simplification I am suggesting, or some
explanation for the utf-8-emacs preference and a short note on file
cookies (or a ref to the docs, which would be fine by me).

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fourth law:
OOO  None of your friends and coworkers share your taste in music.



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [PB]: bbdb-file encoding

2004-04-07 Thread Alex Schroeder
Dave Love [EMAIL PROTECTED] writes:

 Xavier Maillard [EMAIL PROTECTED] writes:

 So what is the *best* or the *recommended* coding system to use for
 BBDB knowing that my contacts are world wide.

 The one that's set in recent versions (as far as I know),
 i.e. `iso-2022-7bit', at least if you want to be at all portable
 between Emacs and XEmacs as some people apparently do.  The _correct_
 one in Emacs 21 is really `emacs-mule', as etc/MORE.STUFF says, but
 `iso-2022-7bit' happens to DTRT with eight-bit characters.

Do you think the following code and comment in bbdb.el is correct?

;; iso-2022-7bit should be OK (but not optimal for Emacs, at least --
;; emacs-mule would be better) with both Emacs 21 and XEmacs.  Emacs
;; 22 will really need utf-8-emacs.
(defconst bbdb-file-coding-system (if (fboundp 'coding-system-p)
  (if (coding-system-p 'utf-8-emacs)
  'utf-8-emacs
'iso-2022-7bit))
  Coding system used for reading and writing `bbdb-file'.
This should not be changed by users.)


Maybe this explains why I'm getting utf-8-emacs...  I'm using the
unicode branch from CVS Emacs:  GNU Emacs 22.0.0.1 (i686-pc-linux-gnu,
X toolkit, Xaw3d scroll bars) of 2004-02-11 on confusibombus

I'd just like to see both code and comment fixed such that I can
understand it a few months from now.  Can you suggest a change?

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fourth law:
OOO  None of your friends and coworkers share your taste in music.



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [PB]: bbdb-file encoding

2004-02-28 Thread Alex Schroeder
[EMAIL PROTECTED] (Jeffery B. Rancier) writes:

 Alex Schroeder [EMAIL PROTECTED] writes:

 My .bbdb file starts with the following line:

 ;; -*-coding: iso-2022-7bit;-*-

 Whereas bbdb-file-coding-system's value is utf-8-emacs.

 It works anyhow.  :)

Well, in addition to that I (prefer-coding-system 'utf-8) so maybe
that explains it?

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fourth law:
OOO  None of your friends and coworkers share your taste in music.



---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [PB]: bbdb-file encoding

2004-02-27 Thread Alex Schroeder
My .bbdb file starts with the following line:

;; -*-coding: iso-2022-7bit;-*-

Whereas bbdb-file-coding-system's value is utf-8-emacs.

It works anyhow.  :)

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's fourth law:
OOO  None of your friends and coworkers share your taste in music.



---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: BBDB crashes on search

2003-12-08 Thread Alex Schroeder
Michael Below [EMAIL PROTECTED] writes:

 Then it says something like searching and then frobnicating. Right
 after frobnicating, bbdb crashes, and emacs closes. If I call it
 from an xterm, I get the message Speicherzugriffsfehler emacs
 (memory access error emacs) printed into the xterm window. If I have
 BBDB embedded into Gnus, Gnus crashes on opening a message.

No elisp bug (in BBDB) should cause an Emacs crash.  This is a bug in
Emacs, triggered by some elisp in BBDB and some data in your .bbdb
file.  I am sure the Emacs maintainers would be interested in a very
short test case that doesn't involve installing BBDB, but I know how
difficult it is to determine such a test case.  If you can do it,
perfect, if not...  I don't think upgrading BBDB will help.  You could
try a binary search.  Split your .bbdb in two files, see which one
crashes Emacs.  Then split again, until you find the culprit.

Alex.
-- 
.O.  http://www.emacswiki.org/alex/
..O  Schroeder's first law:
OOO  The coffee at the office shall taste terrible.



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: mail alias for multiple recipients

2003-11-14 Thread Alex Schroeder
Jochen Kpper [EMAIL PROTECTED] writes:

 I didn't see a patch:(

I will try again, then.  :)
It adds two index entries and an unnumbered subsection.

Alex.


*** bbdb.texinfo.~1.51.~Wed Aug  6 11:06:01 2003
--- bbdb.texinfoThu Nov 13 03:35:04 2003
***
*** 1046,1051 
--- 1046,1052 
  @ref{Gnus Prep}.  For usage details, see @ref{Gnus Features}. The field used
  can be changed by changing the value of @code{bbdb/gnus-score-field}.
  @item mail-alias
+ @cindex mail-alias definition
  Value used instead of @code{name} for completion.  @xref{Mail Sending
  Interfaces}.
  @item mail-name
***
*** 1659,1666 
--- 1660,1670 
  people that you want to CC the message to, and then execute this command
  to add them to the list.
  
+ @unnumberedsubsec Mailing Lists and Mail Aliases
+ 
  @cindex Mailing lists
  @cindex Mail Aliases
+ @cindex mail-alias usage
  @findex bbdb-define-all-aliases
  @findex bbdb-add-or-remove-mail-alias
  @findex define-mail-alias



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: mail alias for multiple recipients

2003-11-12 Thread Alex Schroeder
Jochen Kpper [EMAIL PROTECTED] writes:

 Alex I wonder where this is documented, though.

 ,[ (info (bbdb)Mail Sending Interfaces) ]
 |If more than one person has the same mail-alias, then that alias
 | expands to the addresses of all of those people; in this way you can
 | maintain mailing lists within the BBDB.
 `

How did you find it?  I used 'i mail-alias RET' and found 
`bbdb-expand-mail-aliases' -- but that was the only match.

Only now that I saw you hand found it, I decided to search again, and
using the node name you provided, I found it.  From the top menu,
'Mailing Lists' is clearly the wrong thing with the right name, and
the node 'Interfaces' (and from there on to 'Mail Sending Interfaces')
is not that obvious.  Even then, the info appears on line 70 with no
subheading indicating where the info is.

(My BBDB from CVS is quite old, but I assume the situation has not
changed much.)  I think we need to improve this.

The following patch has a strange limitation.  When I use 'i
mail-alias' it will only show me the *top* of the node where the
@cindex was used, instead of jumping to the right place.  Does anybody
know why?  I think it is better than the current situation, but I
wonder.

Alex.
-- 
http://www.emacswiki.org/alex/
There is no substitute for experience.



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: mail alias for multiple recipients

2003-11-08 Thread Alex Schroeder
Sarir Khamsi [EMAIL PROTECTED] writes:

 I would like to create a mail alias for multiple recipients, that is,
 a single mail alias would be a simple mailing list. I have been unable
 to figure out how to do this with BBDB (2.34) or Gnus (5.10.3). Any
 suggestions? Is the only way to do it with my ~/.mailrc file? Thanks.

No.  Assume you have two records in your BBDB, A and B.  For both,
use C-o to create a new field called 'mail-alias' and use foo as
the field value.  Now, when you compose your next message, use
foo TAB to expand this to A, B.

I wonder where this is documented, though.

Alex.
-- 
http://www.emacswiki.org/alex/
There is no substitute for experience.



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: Weballized address book

2003-09-01 Thread Alex Schroeder
Harry Putnam [EMAIL PROTECTED] writes:

 Some way of starting emacs and accessing all the functionality of bbdb
 but thru a web intface.

You would have to write it yourself.  There is httpd.el, however,
which allows Emacs to act as a web-server, so a big chunk of work has
already been done.

Alex.
-- 
http://www.emacswiki.org/alex/
There is no substitute for experience.



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: How do I fix BBDB corruption?

2003-08-15 Thread Alex Schroeder
Eric Moncrieff [EMAIL PROTECTED] writes:

 I don't have any other means of updating the BBDB, and I've never seen
 any trouble since I upgraded to 2.34...Until last week.  

I use desktop.el, and so sometimes the first buffer that comes up when
I start an Emacs session is the .bbdb file, and I have inserted
randome characters myself because of typos -- usually by mistyping C-x
C-f and thereby inserting a stray x or f character.  One way to find
parser errors is to use C-M-f to skip sexps.  That also uses the
parser.  If you get data corruption instead -- eg. il is not an arrayp
or something similar (because I deleted the leading n), then I can
M-x toggle-debug-on-error, then search a record via M-x bbdb, and the
backtrace will contain the corrupt entry.  Using these two
techniques, I find practically all BBDB corruptions.

Alex.
-- 
http://www.emacswiki.org/alex/
There is no substitute for experience.



---
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: require subscription to post - an offer to help

2003-03-30 Thread Alex Schroeder
Scott Lawrence [EMAIL PROTECTED] writes:

 In case it's among the filtered messages, I started this thread [1] by
 volunteering to moderate the list - in Mailman 2.0 (which sourceforge
 is using) you can make someone a 'moderator', which gives them the
 ability to approve and deny postings and subscriptions, but not other
 list options.

I apreciate your volunteering.  The only remaining problem I have is
that this makes us very dependant on you.  What will you do when you
go on holidays, or what will we do when you drop of the net?   Can we
just go back to business as usual by removing your name from the
moderator position?

Alex.



---
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


spam

2003-02-26 Thread Alex Schroeder
We've had the discussion before -- the mailing list works fine for
me.  I just filter the crap.  I use statistical spam filtering for
Gnus, but I also have a very simple splitting rule that does away with
all Korean mails.  Try it.  It works.  :) 

Alex.


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: X-Face and Face headers for Emacs...

2003-02-20 Thread Alex Schroeder
I added Steven's code and mine to
http://www.emacswiki.org/cgi-bin/wiki.pl?BbdbFaces

Alex.


---
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Can't use the /texinfo/bbdb.info file.

2003-02-10 Thread Alex Schroeder
I don't see an error description in your mail -- it must have gotten
lost.  Can you send it again?

Alex.


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



X-Face and Face headers for Emacs...

2003-02-03 Thread Alex Schroeder
Here is what I use in order to store both X-Face and Face headers, and
display them.  Works for me.  :)

Alex.


(add-hook 'bbdb-list-hook 'my-bbdb-display-xface)

(defun my-bbdb-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 , ))
  (condition-case nil
  (insert-image (create-image (gnus-convert-face-to-png data) nil t))
(error
 (insert-image (gnus-create-image (uncompface data) nil t :face 
'tooltip
  (insert  )))

(add-hook 'bbdb-notice-hook 'bbdb-auto-notes-hook)
(add-hook 'bbdb-notice-hook 'bbdb-auto-notes-hook)
(setq bbdb-auto-notes-alist '((X-Face (.+ face 0 'replace))
  (Face (.+ face 0 'replace


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: documentation fix

2003-01-31 Thread Alex Schroeder
David S Goldberg [EMAIL PROTECTED] writes:

 bbdb-elide-record is no more...

 bbdb-toggle-records-display-layout is, I'm pretty sure, the right thing.

Thanks.  I applied your patch.

Alex.


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Sorting entries

2003-01-29 Thread Alex Schroeder
[EMAIL PROTECTED] (Christian Gudrian) writes:

 Is there a built-in function or do I have to open the ~/.bbdb-file and
 have it sorted using emacs' functions?

Try M-: (bbdb-resort-database) RET.  Perhaps this function should be
interactive?  Or whatever syncing operation you are using should take
care to insert the records at the right place.

Alex.


---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Archive faces in records?

2003-01-03 Thread Alex Schroeder
Jack Twilley [EMAIL PROTECTED] writes:

 Here is the relevant part of my configuration:

  bbdb-auto-notes-alist '((Organi[sz]ation (.* company \\))
(Newsgroups (.* newsgroups \\))
(X-Face (.+ face 0 'replace))) 

 I know that 'replace will remove any existing face and replace it with
 the new one.  Some folks like Lars have many faces.  I'd like to keep
 them all -- new ones should be added, old ones should be ignored.  I'd
 also like all the faces to be displayed when the record is retrieved.
 Is there a magic way to do this?

I am on Emacs, so I had to write some code to do this myself.  What
exactly did not work?  If you do not use the 'replace argument, I
think you get the faces separated by , .  Does the face display not
handle it?  Or are you getting a different separator?  I think Andreas
Fuchs mentioned a way to change the X-Face separator from ,  to
\n.

I myself switched from keeping all the X-Faces back to just keeping
the latest one.

Alex.


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb-print with weird coding systems

2002-12-23 Thread Alex Schroeder
Ronan Waide [EMAIL PROTECTED] writes:

 I'm still not 100% clear on the right way to solve the coding-sytems
 problem. Ideally, I'd like the BBDB file to be coding-systems agnostic
 and still provide reasonable mapping back into the real world. This
 sort of hints that it should store everything in unicode/utf-8 or
 thereabouts. This is, however, a big change, and I'm reluctant to
 undertake it while in my current spare time? what spare time? frame
 of mind. If anyone else has had a look at this, please let me know.

Well, I come accross coding system trouble every now and then; I did
some work on how the Emacs IRC Client (ERC) handles this -- and I do
not know how to deal with this, either.

Dave Love sent patches for the .bbdb file, and eventhough I do not
know what he did exactly, I no longer have problems with the .bbdb
file.  What I wanted to do these days was to print it.  But printing
works via TeX, and I know zilch about TeX and other coding systems.  I
think we could define all non-ASCII sequences using something like
\catcode`ß=\active\chardefß=FF.  Or we could start using something
like the inputenc package for LaTeX (which we cannot use as-is for
now, because bbdb-print uses TeX, not LaTeX).  Plus it would be a lot
of work...  This is why I preferred to move to plain buffer printing.
There at least, I know what to do (for Emacs).  :)

The real question is, I guess, wether we want to (optionally?) write
the bbdb.tex file as utf8, and use some Unicode/TeX thing -- Omega?
http://omega.cse.unsw.edu.au/
Never tried it, though...  Now that you reminded me of it, I will
investigate, it...  :)

Alex.


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb-print with weird coding systems

2002-12-23 Thread Alex Schroeder
[EMAIL PROTECTED] (Kai Großjohann) writes:

 Really? How is this the case? Or more to the point, what's the set of
 characters in Emacs that can't be represented in Unicode?

 In Emacs, Latin-1 ä and Latin-2 ä are two distinct characters.  I
 think in Unicode there is only one ä.

 There was much talk about `Han unification'.  I have no idea what
 that is, but I /think/ it means that some Chinese characters are
 identified with some Japanese characters.  So from the the Unicode
 you don't know which character it is.  (But applications might wish
 to use different glyphs depending on whether they're showing Chinese
 or Japanese text.)  Note that this is just hearsay -- it might be
 completely wrong.  In Emacs, the Chinese and the Japanese character
 are considered to be distinct.

This is what happened.  There a glyphs that look very similar in
Japanese and new Chinese and traditional Chinese (yes, several
variants exist), and Unicode says that they are represented as the
same byte sequence -- and that the app should use the correct font.
Obviously this requires saving some information somewhere else.  Now
imagine you have a text file with both Japanese and Chinese
characters.  Now you cannot just save the file, and use a font, you
require even more information to render this totally correctly.

What Emacs does, instead, it uses all coding systems, and it uses a
meta coding system.  Two such exist, afaik: ISO-2022 and emacs-mule.
Both work by using an escape sequence (ISO-2022 uses longer escape
sequences, emacs-mule uses some special non-ASCII bytes) and
specifying which low-level encoding follows.  Therefore no information
is lost -- but Emacs has to know all other coding systems.

This is why Emacs treats Unicode as just another coding system -- this
works well, since the work for all the other coding systems has
already been done.  And using only Unicode is lossy.  So what Emacs
lacks, at the moment, is only all the Unicode fancy stuff --
compositions, alternate representations, etc.

 I think the new Unicode-based internal encoding in Emacs will offer
 some way around `Han unification', perhaps by using private extension
 areas in Unicode.

Perhaps.  But perhaps this will just mean that Emacs can decode all
the fancy Unicode stuff, and the internal emacs-mule coding system is
expanded to handle anything it cannot yet represent...  We would have
to ask Handa or other people on emacs-devel to know for sure.

Alex.


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb-print with weird coding systems

2002-12-23 Thread Alex Schroeder
Alex Schroeder [EMAIL PROTECTED] writes:

 Ok, this time I have a patch.

Committed.  :)

Now for the documentation...

Alex.


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



bbdb-print with weird coding systems

2002-12-21 Thread Alex Schroeder
I have a BBDB with data in German and Japanese, so at the beginning of
my .bbdb I have the magic cookie ;; -*-coding: iso-2022-7bit;-*-
bbdb-file-coding-system is set to 'iso-2022-7bit, and I have the
following in my .emacs:

(add-to-list 'file-coding-system-alist
 (cons \\.bbdb\\' bbdb-file-coding-system))

Everything works -- except for printing.  No surprises, there.

So now I am looking for a way to print the stuff via TeX.  If I could
use LaTeX instead of TeX, I could at least
\usemodule[latin1]{inputenc} or whatever the correct thing to use is.
I could then omit all the fields that contain $ signs (eg. X-Faces),
and elide the Japanese entries...  But first this is TeX and not
LaTeX... and then this is still a suboptimal solution.  Does anybody
know of any other bbdb-print solution?  If not, I will just use
ps-print-buffer...  It looks ugly, but at least the data is there.

Alex.


---
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players,  XBox Games,  Flying Saucers,  WebCams,  Smart Putty.
T H I N K G E E K . C O M   http://www.thinkgeek.com/sf/
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb-print with weird coding systems

2002-12-21 Thread Alex Schroeder
Coded my own solution and wrote it all up:

http://www.emacswiki.org/cgi-bin/wiki.pl?BbdbMulePrinting

Alex.


---
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players,  XBox Games,  Flying Saucers,  WebCams,  Smart Putty.
T H I N K G E E K . C O M   http://www.thinkgeek.com/sf/
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: support for several xfaces

2002-10-24 Thread Alex Schroeder
Andreas Fuchs [EMAIL PROTECTED] writes:

  (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.

Where is this information stored in the BBDB?  (get 'face
'field-separator) returns nil on my system...

Alex.


---
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/



Re: support for several xfaces

2002-10-19 Thread Alex Schroeder
Colin Rafferty [EMAIL PROTECTED] writes:

 Micha Wiedenmann wrote:

 bbdb automatically adds the x-face to the bbdb-records, but I don't know
 how to add several xfaces to the face-field. A new xface is appended via
 ,  this destroys both, the old and the new x-faces. 

 (put 'face 'field-separator \n)

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.  :(

This uses the bbdb-list-hook, and adds a little defun there that
contains some code ripped from the gnus files, and which requires the
gnus file gnus-ems and its dependencies.  I use Oort Gnus, so YMMV.

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.  For a BBDB
record, create a new field named `face' and paste the copied cruft.
If you want several faces, separate them via a comma and a space.  I
think the space is invalid within an X-Face, but I could be wrong.

(add-hook 'bbdb-list-hook 'bbdb/gnus-display-xface)

(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 , ))
  (setq pbm (uncompface data))
  (if (gnus-image-type-available-p 'xface)
  (insert-image
   (gnus-create-image
(concat X-Face:  data)
'xface t :ascent 'center :face 'gnus-x-face))
(when pbm
  (insert-image
   (gnus-create-image
pbm 'pbm t :ascent 'center :face 'gnus-x-face
  (insert  )))

It works for me.  If you want to experiment with the elisp, here is
the piece of code I needed to get started.

(let ((default-enable-multibyte-characters nil))
  (insert-image
   (gnus-create-image
(uncompface 
^BC$`[IcggstLPyendqF+b2'zyK#r.mU*'Nms}@4zw%SJ#5!/7SMVjBS7'lb;QK)|IPU5U'o1'522W4TyzB3Ab*IBo^iw]l4|kUbdZuUDO6=Um-.4IzhNiV'B\@K#jy_(wW|Zbk[34flKY^|PrQ?$u2\\fKg^]AYwOX#H32i)
'pbm t :ascent 'center :face 'gnus-x-face)))

Does anybody have a nice piece of code, that will let me add a face to
a record when I hit `:' on a message?

Alex.


---
This sf.net email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
https://www.gotomypc.com/s/OSND/DD
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb: cannot acces the name field this way

2002-10-09 Thread Alex Schroeder

Micha Wiedenmann [EMAIL PROTECTED] writes:

 If you try to create a new field: name with `C-o name REG y Alex RET'
 `bbdb-insert-new-field' (`C-o') calls `bbdb-prompt-for-new-field-value'

 ,[ bbdb-com.el ]
 | (defun bbdb-prompt-for-new-field-value (name)
 |   (cond ((eq name 'net) ...)
 | ((eq name 'address) ...)
 | ((eq name 'notes) (bbdb-read-string Notes: ))
 | ((assoc (symbol-name name) ...))
 | (t
 +  (if (memq name '(name address addresses phone phones net aka AKA))
 +  (error bbdb: cannot redefine the %s field this way name))
 |  (if (bbdb-y-or-n-p
 |   (format \%s\ is an unknown field name.  Define it?  name))
 |  (bbdb-set-propnames
 |   (append (bbdb-propnames) (list (list (symbol-name name)
 |(error unknown field \%s\ name))
 |  (bbdb-read-string (format %s:  name)
 `

 And `bbdb-set-propnames' redefines name as user-field.  I added the
 lines indicated with `+'.  I don't know about problems with the other
 fields (address, addresses, phone, phones, net, aka, AKA) do they cause
 the same problems?

Looks good to me, just like this:

(defun bbdb-record-getprop (record property)
  (if (memq property '(name address addresses phone phones net aka AKA))
  (error bbdb: cannot access the %s field this way property))

Alex.

PS: Hey, what happened to the Newspeak tradition?  We should sprinkle
some doubleplus ungood in these messages...


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: newbie question

2002-09-23 Thread Alex Schroeder

Mario Mommer [EMAIL PROTECTED] writes:

 Maybe I misunderstood something, but... bbdb's usual modus operandi is
 that it starts gathering information, like when I'm reading e-mail it
 saves the addresses, etc. Am I right on this?

No, the usual modus operandi is just an address book.  To add the
author of a mail or posting to the BBDB, hit `:'.  This should get you
started without any other switches and settings.  :)

Alex.


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb: cannot acces the name field this way

2002-08-26 Thread Alex Schroeder

[EMAIL PROTECTED] writes:

 | bbdb: cannot acces the name field this way

 This can only be prevented if I kill the .bbdb-buffer.  Then the
 immediate following search is succesful and all following attempts to
 search fail again.

 I have tracked this down to `;;; user-fields: (name ...)' in my .bbdb
 file. I do not know which function inserted this user-fields but this is
 very confusing. (As I started to use XEmacs/Gnus/BBDB I didn't know how
 to handle this error.)

 ,[ ~/.bbdb ]
 | ;;; file-version: 6
 | ;;; user-fields: (name comment mailer newsgroups)
 | [Bart Simpson nil nil nil nil ([EMAIL PROTECTED]) ((notes
 |  . Do you know me?) (creation-date . 2001-11
 | -05) (timestamp . 2001-11-08) (last-subj . Who is Lisa?) (mailer
 | . Simpson Mail)) nil]
 `

 A a solution to this error I delete the whole `user-fields' line. Is
 this the recommed way? Which functionality is provided by the
 `user-fields' they don't seem to me to match my user-fields as I also
 have a field `creation-date', `xface' and so on.

 Can this line safely be deleted?

Only remove the name element.
Then open the .bbdb file and search for the string (name .  -- there
should be no instances of it.

 Is this a bug, should I make a bug report?

This is a bug.  I think you can recreate this as follows:  Put point
on a record, hit C-o name RET y Alex RET.  This way you created a
comment field (annotation) called name, which is bogus.  BBDB barfs
with if: bbdb: cannot annotate the name field this way.  But if you
then change any field, and save the BBDB, your file contains the name
element.  In my case:

;;; user-fields: (gnus-private gnus-public irc-nick finger-host irc-channel name)

This is the bug.

Alex.


---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: BBDB and gnus nnmail/nnimap split-fancy

2002-08-12 Thread Alex Schroeder

Alexander Kotelnikov [EMAIL PROTECTED] writes:

 (defun bbdb-split ()
   We want people, who are in bbdb not to be splitted to spam

 What is wrong here?

Hehe, you are overwriting an existing function!  Here is the doc of
the original:

bbdb-split is a Lisp function in `bbdb'.
(bbdb-split STRING SEPARATORS)

Return a list by splitting STRING at SEPARATORS.
The inverse function of `bbdb-join'.

Alex.
-- 
http://www.electronicintifada.net/diaries/index.html
http://www.us-israel.org/jsource/US-Israel/hr2506c.html


---
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: spam

2002-06-03 Thread Alex Schroeder

I am not getting that much spam in my BBDB folders.  I see you are
using VM, not Gnus, so I cannot help you with your filtering, but one
of the most effective filters I ever used is the one that goes by
weird coding sets.  At the moment this rule seems to catch most of my
mailing list spam:

(Subject =?ks_c_5601-1987 mail.spam)

Alex.
-- 
http://www.electronicintifada.net/diaries/index.html
http://www.us-israel.org/jsource/US-Israel/hr2506c.html

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: The followup will show the bug.

2002-05-28 Thread Alex Schroeder

David Kågedal [EMAIL PROTECTED] writes:

 Niklas Morberg [EMAIL PROTECTED] writes:
 
 name mismatch: Kai Großjohann changed to Kai Großjohann

 (modify-coding-system-alist 'file (regexp-quote (expand-file-name bbdb-file))
 'iso-8859-1)

I think your .bbdb is encoded in latin-1, but Kai switched his name to
latin-15.  When saving, the latin-15 sz (the name for the beta like
glyph) is saved as latin-1, so next time when BBDB compares the
strings again, the message has the latin-15 variant, and your bbdb has
the latin-1 variant -- again!  The only solution is to save the bbdb
in something that keeps the correct encoding (not latin-1, emacs-mule,
for example).  Or automatically unify all latin encodings.  (Code by
Dave Love.)

Alex.
-- 
http://www.electronicintifada.net/diaries/index.html
http://www.us-israel.org/jsource/US-Israel/hr2506c.html

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb-file-coding-system: what's a safe migration setting?

2002-05-28 Thread Alex Schroeder

Sergei Pokrovsky [EMAIL PROTECTED] writes:

 So, I've remained with the raw encoding, but these are incompatible
 between the Emacsen (20/21).  This is why I avoid emacs-21: it spoils
 .bbdb so badly that opening a gnus article crashes emacs-20.7 (which I
 still prefer for some reasons).

I think you should use iso-2022, which should work on both --
untested.  So, save the .bbdb in e20 as iso-2022-jp (the -jp doesn't
meant that it is for japanese only, I think), and load it in e21.  It
should work.

Alex.
-- 
http://www.electronicintifada.net/diaries/index.html
http://www.us-israel.org/jsource/US-Israel/hr2506c.html

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb-file-coding-system: what's a safe migration setting?

2002-05-28 Thread Alex Schroeder

[EMAIL PROTECTED] (Kai Großjohann) writes:

 So I would like to find a way that BBDB loads the file in the old
 coding system (whatever it was, probably Latin-1 because I have
 (set-language-environment Latin-1) in the init files), and then
 saves it in a better encoding (utf-8? emacs-mule?).

 Is this possible?  How do you folks deal with this?

I would use emacs-mule, or an iso-2022 encoding.  Thus load your
.bbdb, see wether it loads correctly, use C-x C-m c and save with the
new coding system under another name, change the setup (coding: tags,
variable settings), reload the file, check, save as .bbdb.  Restart
Emacs, try BBDB.  Should work now.

Alex.
-- 
http://www.electronicintifada.net/diaries/index.html
http://www.us-israel.org/jsource/US-Israel/hr2506c.html

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Gnus splitting based on bbdb?

2002-04-25 Thread Alex Schroeder

Galen Boyer [EMAIL PROTECTED] writes:

 Is there a way to enable splitting of mail based on bbdb?

http://www.emacswiki.org/cgi-bin/wiki.pl?SplitMailUsingBbdb

 Can this be intermixed with nnmail-split-methods?

Yes, see the Even More Advanced section.

Alex.
-- 
http://www.electronicintifada.net/diaries/index.html
http://www.us-israel.org/jsource/US-Israel/hr2506c.html

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Problems with names containing non-english characters

2002-02-05 Thread Alex Schroeder

Niklas Morberg [EMAIL PROTECTED] writes:

 Be especially careful to delete everything
 containing the infamous \201 character.

 I had a bunch of those as well -- what are they about?

These problems and all that are related to people who used Emacs 20.1
to 20.3, I think, because at that time MULE support was rather buggy.
I think the \201 bugs started decreasing with e20.4, but maybe only
with e20.7...  So I expect that once you remove all the problematic
characters, and keep using e20.7 or e21, the problem should
disappear.  Does it?

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: display entries that dont match a pattern

2002-01-21 Thread Alex Schroeder

Alex Schroeder [EMAIL PROTECTED] writes:

 Alex Schroeder [EMAIL PROTECTED] writes:

 There is, however, no way to search for people without phone numbers,
 or all people without an address matching gnu.  Do you think this is
 important?

Ok, so I was bored.  Now you can also search for stuff *not* matching
something, for example for all people whose name do not contain the
letter a.  I'm still not sure such a thing is actually needed,
though.  Plus I think the user interface is bad.  At the moment you
have to call M-x bbdb-search-invert-set to invert the meaning of the
next search.

I'll leave it up to other people to decide wether such code is worth
having in the BBDB.

Alex.


*** bbdb-com.el.~1.136.~Mon Jan 21 23:02:54 2002
--- bbdb-com.el Mon Jan 21 23:35:09 2002
***
*** 77,85 
  'bbdb-display-layout))
  
  
  (defmacro bbdb-search (records optional name company net notes phone)
!   ;; this macro only emits code for those things being searched for;
!   ;; literal nils at compile-time cause no code to be emitted.
(let (clauses)
  ;; I didn't protect these vars from multiple evaluation because that
  ;; actually generates *less efficient code* in elisp, because the extra
--- 77,109 
  'bbdb-display-layout))
  
  
+ (defvar bbdb-search-invert nil
+   Bind this variable to t in order to invert the result of `bbdb-search'.
+ 
+ \(let ((bbdb-search-invert t))
+\(bbdb-search records foo foo)))
+ 
+ (defun bbdb-search-invert-get ()
+   Return `bbdb-search-invert' and set it to nil.
+ To set it on again, use `bbdb-search-invert-set'.
+   (let ((result bbdb-search-invert))
+ (setq bbdb-search-invert nil)
+ result))
+ 
+ (defun bbdb-search-invert-set ()
+   Set `bbdb-search-invert' to t.
+ This will invert the meaning of the next search command.
+ You will have to call this function again, if you want to
+ do repeated inverted searches.
+   (interactive)
+   (setq bbdb-search-invert t))
+ 
  (defmacro bbdb-search (records optional name company net notes phone)
!   Search RECORDS for optional arguments NAME, COMPANY, NET, NOTES, PHONE.
! This macro only emits code for those things being searched for;
! literal nils at compile-time cause no code to be emitted.
! 
! If you want to reverse the search, bind `bbdb-search-invert' to t.
(let (clauses)
  ;; I didn't protect these vars from multiple evaluation because that
  ;; actually generates *less efficient code* in elisp, because the extra
***
*** 170,183 
 nil))
   (case-fold-search bbdb-case-fold-search)
   (records (, records))
   record)
   (while records
 (setq record (car records))
!(if (or (,@ clauses))
!(setq matches (cons record matches)))
!(setq records (cdr records)))
   (nreverse matches)
- 
  
  ;;;###autoload
  (defun bbdb (string elidep)
--- 194,210 
 nil))
   (case-fold-search bbdb-case-fold-search)
   (records (, records))
+(invert (bbdb-search-invert-get))
   record)
   (while records
 (setq record (car records))
!  (if (or (and invert
!   (not (or (,@ clauses
!  (and (not invert)
!   (or (,@ clauses
!  (setq matches (cons record matches)))
!  (setq records (cdr records)))
   (nreverse matches)
  
  ;;;###autoload
  (defun bbdb (string elidep)

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



bbdb display

2002-01-18 Thread Alex Schroeder

Ronan Waide [EMAIL PROTECTED] writes:

 * Much display handling rewriting, courtesy of Alex Schroeder and
   Robert Fenk. It's so good, I've not even figured it out myself yet.

Heh.  I can't remember contributing any towards it, I assume you meant
somebody else.  I have something to discuss, though: The Extents
vs. Overlays unhappiness and the slow display of many overlapping
overlays in Emacs.  All of this would be solved, if we rewrote the
code such that Text Properties get used.  Here's what this would do:

1. Text properties are very fast on Emacs.  This is the benefit.
2. Text properties are a compatibility layer in XEmacs which get
   translated to extents anyway.  Thus, no drawback here.
3. Text properties stick with the text when the text is copied (killed
   and yanked).  This is a potential drawback.

What do you think?  Currently I don't suffer personally (I have 314
entries and it takes about 3 seconds to display all of them).  Before
starting to work on this, therefore, I'd like to hear from people that
really suffer from this.  I understand that it is meaningless to
actually display hundreds of addresses, but if I remember my
Emacsology correctly, you cannot interrupt Emacs during redisplay,
thus C-g has no effect.  You will have to wait it out.  Is that
correct?  Can somebody suffering from the problem please confirm this?

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: build error

2002-01-15 Thread Alex Schroeder

[EMAIL PROTECTED] (Kai Großjohann) writes:

 | ELISP (defvar xyzzy)
 | xyzzy
 | ELISP (boundp 'xyzzy)
 | nil

Heh, learn a new thing every day.  :)

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Error while trying to edit/delete or add a field on a record.

2002-01-14 Thread Alex Schroeder

Benjamin Rutt [EMAIL PROTECTED] writes:

 Maybe people who want the luxury of running BBDB with multiple emacsen
 can live with running BBDB uncompiled?  Or, they could maintain
 multiple installation dirs and compile for multiple emacsen.

If you run Debian, I think this is what happens, eventually, for the
Debian extensions to Emacs and XEmacs.  They are all in some site-lisp
kind of thing, but elisp sources and compiled elisp files for each
emacsen are stored in different directories.  This confuses oldbies to
no end, but at least installing one copy of the source and several
copies of the byte code work.  I don't think we should cater to this
scenario, though.

The most common case is people use either Emacs or XEmacs (no, no
facts, just IMNSHO).  So all we have to do is test for the most common
goof-up.  Running compiled code from the other emacsen.  And I really
think that either this is an Emacs/XEmacs problem and should be
resolved outside of BBDB, or we can fix the Makefile such that one
tiny little file doesn't get compiled, ever, and all it does is check
that if compiled files exist, they will be run only on an emacsen
compatible with it.  What do you think?

I think such a test-for-right-emacsen file could be really simple
and to use it, all we would do is require it in bbdb-autoloads.el.  Or
something like that.  Or maybe bbdb-autloads.el doesn't get compiled
anyway and we can just add the test to that file instead.  (I don't
know wether it gets compiled or not because I use both Emacs and
XEmacs and run it straight from the source...  :)

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: build error

2002-01-14 Thread Alex Schroeder

Ronan Waide [EMAIL PROTECTED] writes:

 On January 12, [EMAIL PROTECTED] said:
 
 I am not sure, but it seems to me that autoloads are more desireable,
 'cause then we defer the possible need/availability check to runtime.

 Yep, except the compiler warnings I was attempting to hush up are for
 variables, not functions/macros, and autoloading doesn't appear to
 help there... the other option is to defvar the relevant variables,
 but I can't say that appeals to me from an aesthetic point of view.

This is exactly the kind of thing which will screw other code in the
long run.  That other package might test (boundp 'foo) and we used
defvar foo to silence the compiler...  It might work (and many people
do this), but we'll need to really make sure that such a defvar is
harmless.

Personally, compiler warnings which warn about non-existing variables
and functions are ok by me -- my code has plenty of those.  And I
think/hope that's because I compile the code for Emacs and the
variables and functions are XEmacs-only.

Anyway, not an easy decision to make.

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Emacs/XEmacs workarounds

2002-01-13 Thread Alex Schroeder

Chris Beggy [EMAIL PROTECTED] writes:

 From: Alex Schroeder [EMAIL PROTECTED]
 
 Lots of packages define missing functions in order to run on Emacs and
 XEmacs.  Other packages test wethere critical functions are bound or
 not, and then assume they are on Emacs or XEmacs.  :(
 
 I've had a similar problem with one package or another because BBDB
 used to do that as well (don't know wether it still does).

 What's the best solution for library writers then?  Do you know
 of any code examples where this is handled well?

Unfortunately, I don't have a general solution for this.  All I can
offer is some rules to guide would-be elisp authors:

Always use the most specific test.  Here are some examples from
unspecific (avoid) to specific:

  * Testing for Emacs/XEmacs using (featurep 'xemacs).
  * Testing for packages using featurep.
  * Testing for variables using boundp and functions using fboundp.

Here's an example from color-theme.el where I had to test for
Emacs/XEmacs directly because the function define-key exists in both
versions:

(if color-theme-xemacs-p
(define-key map (kbd button2) 'color-theme-install-at-mouse)
  (define-key map (kbd mouse-2) 'color-theme-install-at-mouse))

If you determine that a specific function or variable is lacking,
implementing it may be dangerous and break other things.  It's better
to use your own names, and use defalias.  Here's from color-theme.el,
for example:

(cond ((fboundp 'custom-face-attributes-get)
   (defalias 'color-theme-face-attr-construct
 'custom-face-attributes-get))
  ((fboundp 'face-custom-attributes-get)
   (defalias 'color-theme-face-attr-construct
 'face-custom-attributes-get))
  (t
   (defun color-theme-face-attr-construct (rest ignore)
 (error Unable to construct face attributes

An example of how things can go wrong is in my bug report from
2001-10-05.  BBDB defined the function set-specifier if it was
missing.  ispell tested for set-specifier to execute some XEmacs
specific code.  I think that ispell was was right, because it use the
most specific test and was right in assuming that if set-specifier was
defined, other XEmacs specifier-related machinery would be present
(such as the variable has-modeline-p).

bbdb-gui.el contains the following code:

(or (fboundp 'set-specifier)
(fset 'set-specifier 'ignore))

Therefore, on my Emacs 20.7, I have set-specifier defined.  This
causes a problem with ispell.el, however.  In ispell-command-loop,
there is the following code:

  (and (fboundp 'set-specifier) ; prevent XEmacs modeline hiding
   (set-specifier has-modeline-p (cons (current-buffer) nil)))

This will result in:

Signaling: (void-variable has-modeline-p)

The problem with this code is that it defines a function which exists
in the other emacsen, unlike the example from color-theme.  As you can
see, however, the choices are not always easy to make.  :(

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Error while trying to edit/delete or add a field on a record.

2002-01-12 Thread Alex Schroeder

Galen Boyer [EMAIL PROTECTED] writes:

 I found the issue.  table.el has caused me a few headaches now.
 For some reason, it finds its way into the middle of compilations
 and then the resultant compiled code has issues.  I ran the bbdb
 uncompiled (whew, is it slow) and I was able to perform the
 operations.  I then removed the loading of table.el, shut down
 and restarted Emacs, byte-compiled bbdb, shut down and restarted
 to load the byte-compiled versions and, the problems went away.

Lots of packages define missing functions in order to run on Emacs and
XEmacs.  Other packages test wethere critical functions are bound or
not, and then assume they are on Emacs or XEmacs.  :(

I've had a similar problem with one package or another because BBDB
used to do that as well (don't know wether it still does).

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: record unhas network addresses

2002-01-12 Thread Alex Schroeder

[EMAIL PROTECTED] (Adam C. Finnefrock) writes:

 Is it a crime to have a BBDB entry without a net field?  :)
 Seriously, should I put in bogus e-mail addresses for these records?

No, I have dozens of entries without e-mail addresses in them.  But I
don't send them mail, either.  When I try, I get this:

cond: Current record unhas a network addresses.

Thus I wonder -- when are you getting that message, exactly?

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb + mew

2001-12-27 Thread Alex Schroeder

(Chris Beggy ) [EMAIL PROTECTED] writes:

 I'm currently *just* working on the version to work with 2.3x, the
 CVS version.

That's the way to go!  :)

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: URL naming mode?

2001-11-28 Thread Alex Schroeder

Miroslav Fikar [EMAIL PROTECTED] writes:

 I have tried your function and it worked just fine. However, I have
 not been able to mail or post message since then. And if I commented
 the code, I can mail again. Any clue? (gnus told me something as : no
 methods specified - I do not remember exactly) I mailed to persons not
 included in my database. 

Hm, no idea.  Does goto-address work for you under other
circumstances?

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: URL naming mode?

2001-11-28 Thread Alex Schroeder

Galen Boyer [EMAIL PROTECTED] writes:

 This makes urls clickable which is something I was looking for.
 Thanks alot for that.  Unless I'm missing something, I still
 would like to be able to give a long url a short name and have
 that show up as clickable.  Instead of seeing a clickable
 http://www..., I would instead like to see Cool Site and have
 those words clickable but referencing, http://www...

No, that's broken by design.  :)

Hm.  You could of course write this all up yourself, using
goto-address as a model.  When a BBDB buffer is done, add an overlay
with appropriate look and keymap to the name, makes the real url
invisible, and when clicked it calls a function which retrieves the
real url and calls browse-url on that.

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: URL naming mode?

2001-11-26 Thread Alex Schroeder

Galen Boyer [EMAIL PROTECTED] writes:

 Is there anyway to turn on the following functionality?  When I
 enter something in some notes type field, the fact that I typed a
 url could be parsed and then BBDB could ask me if I would like to
 name that URL.  Then, it could display that clickable name to me
 while storing the underlying url?

Hm, a long time ago I used this.  A short test shows that this still
works.  Perhaps that is enough?  Note that in older XEmacs don't have
goto-address.  I think I submitted it for XEmacs, so maybe it is in the
fsf-compat package or something like that.

(defadvice bbdb-display-records-1 (after bbdb-goto-address)
  Enable goto-advice for displayed records.
  (set-buffer bbdb-buffer-name)
  (goto-address))
(ad-activate 'bbdb-display-records-1)

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Support for multiple display layouts

2001-09-03 Thread Alex Schroeder

Here are some alternatives for a bbdb-display-layout-alist
customization widgets.  I prefer the last one myself.

I stopped fiddling with it before implementing the availability
restriction of properties depending on layout type.  :)

Alex.

(defcustom bbdb-display-layout-alist 
  '((one-line   (order . (phones mail-alias net notes))
(name-end  . 24)
(toggle. t))
(multi-line (indention . 14)
(toggle. t))
(pop-up-multi-line (indention . 14)))
  *An alist describing each display layout.
The format of an element is (LAYOUT-NAME . (OPTION-ALIST)).

Currently htere are three different layout types, which are `one-line',
`multi-line' and `full-multi-line'.   OPTION-ALIST specifies the options
for the layout.  Valid options are:

   --- Availability 
Format  one-linemulti-line  

 (toggle . BOOL) +   +  
 (order . FIELD-LIST)+   +  
 (omit . FIELD-LIST) +   +  
 (name-end . INTEGER)+   -  
 (indention . INTEGER)   -   +

- toggle: controls if this layout is included when toggeling the display
  layout
- order: defines a user specific order for the fields, while t is a place
  holder for all remaining fields
- omit: is a list of fields which should not be displayed or t to exclude all
  fields except those listed in the order option
- name-end: sets the column where the name should end in one-line layout
- indention: sets the level of indetion for multi-line display.

Additionally there are two layouts derived from multi-line, which are
full-multi-line and pop-up-multi-line and supporting the same layout
options.
  :group 'bbdb
  :type '(repeat
  (cons :tag Layout Definition
(choice :tag Layout type
(const one-line)
(const multi-line)
(const full-multi-line)
(symbol))
(repeat :tag Properties
(choice :tag Option
(cons :tag Order
  (const :tag List of fields to order by order)
  (repeat (symbol :tag Field)))
(choice :tag Omit
(cons :tag List of fields to omit
  (const :tag Fields not to display omit)
  (repeat (symbol :tag Field)))
(const :tag Exclude all fields except those 
listed in the order property))
(cons :tag Indentation :value (indention . 14)
  (const :tag Level of indentation for multi-line 
layout indention)
  (number :tag Column))
(cons :tag End of name field :value (name-end . 24)
  (const :tag The column where the name should 
end in a one-line layout name-end)
  (number :tag Column))
(cons :tag Toggle
  (const :tag The layout is included when 
toggling display layout toggle)
  boolean))

(defcustom bbdb-display-layout-alist 
  '((one-line   (order . (phones mail-alias net notes))
(name-end  . 24)
(toggle. t))
(multi-line (indention . 14)
(toggle. t))
(pop-up-multi-line (indention . 14)))
  *An alist describing each display layout.
The format of an element is (LAYOUT-NAME . (OPTION-ALIST)).

Currently htere are three different layout types, which are `one-line',
`multi-line' and `full-multi-line'.   OPTION-ALIST specifies the options
for the layout.  Valid options are:

   --- Availability 
Format  one-linemulti-line  

 (toggle . BOOL) +   +  
 (order . FIELD-LIST)+   +  
 (omit . FIELD-LIST) +   +  
 (name-end . INTEGER)+   -  
 (indention . INTEGER)   -   +

- toggle: controls if this layout is included when toggeling the display
  layout
- order: defines a user specific order for the fields, while t is a place
  holder for all remaining fields
- omit: is a list of fields which should not be displayed or t to exclude all
  fields except those listed in the order option
- name-end: sets the column where the name should end in one-line layout
- indention: sets the level of indetion for multi-line 

Re: Support for multiple display layouts

2001-09-03 Thread Alex Schroeder

Robert Fenk [EMAIL PROTECTED] writes:

 I have just committed a rewritten version of the
 bbdb-format-record-* functions.

I am really starting to like this!

One question:  The default value here contains phones instead of
phone -- does that work?  My head is spinning while looking at all
the code.  :)  Anyway, some documentation must be changed, I'll send
stuff as I notice it.  I am currently working on a better custom
interface for bbdb-display-layout-alist.

(defcustom bbdb-display-layout-alist 
  '((one-line   (order . (phones mail-alias net notes))
(name-end  . 24)
(toggle. t))
(multi-line (indention . 14)
(toggle. t))
(pop-up-multi-line (indention . 14)))

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: posting-style depending on bbdb info

2001-09-02 Thread Alex Schroeder

[EMAIL PROTECTED] (Kai Großjohann) writes:

 Ronan Waide [EMAIL PROTECTED] writes:

 Not quite this, but there's a VM-bolt-on package called personality
 crisis which does this sort of thing. It may be adaptable, or even
 already adapted, for use with Gnus.

 I vaguely recall a name called gnus-pers.el.

I think gnus-posting-styles can also be used for this kind of thing.
There is an example on
http://www.emacswiki.org/cgi-bin/wiki.pl?PostingStyles which examines
the variable `header' -- I guess it would hold the To address, which
you could use to query BBDB for more information...  But it sounds
ugly.

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Omitting fields from being displayed and enhanced editing

2001-08-06 Thread Alex Schroeder

Robert Fenk [EMAIL PROTECTED] writes:

 bbdb-default-display-mode (bbdb-elided-display)
   either one-line, multi-line or 'full
 bbdb-pop-up-default-display-mode (bbdb-pop-up-elided-display)
   either one-line, multi-line or 'full

I don't think the names should end in mode if we are not talking
about minor or major modes.  How about layout instead.

Alex.
-- 
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: hiding fields from display

2001-07-30 Thread Alex Schroeder

Doug Alcorn [EMAIL PROTECTED] writes:

 Is there any way to have an alist of fields to display or fields to
 ignore?  Maybe something with the elided display?  How does all that
 work?

Here's an example from my .emacs:

(setq bbdb-print-elide '(tex-name aka mail-alias creation-date timestamp)
  bbdb-elided-display '(creation-date timestamp))

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb-rfc822-addresses

2001-07-11 Thread Alex Schroeder

Ronan Waide [EMAIL PROTECTED] writes:

  IIRC, `ß' becomes `ss' when you change it's case.
 
 So do I take it then that the conversion of `ß' becomes `ss' is the
 Right Thing, or what?

I don't think that is right.  Afterall, we're talking about
groß vs. GROSS -- and certainly the mails are adressed to
Großjohann and not GROSSJOHANN.

Maybe we don't want to use 8 bits in the headers, though?  Gnus will
encode this correctly, I think.  I don't know about Rmail, though.

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Install, TeX

2001-07-03 Thread Alex Schroeder

Mark Mynsted [EMAIL PROTECTED] writes:

 My question is what is the TeX search path?  I have many TeX tools,
 etc installed, but do not know what this path is.  Where should these
 bbdb TeX files be located?

I have the following in my .bashrc:

export TEXINPUTS=.:~/.TeX:

And this is what I have in my ~/.TeX directory:

ls ~/.TeX
bbdb-cols.tex  bbdb-print-brief.tex  bbdb-print.tex

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



char-int bug

2001-06-15 Thread Alex Schroeder

bbdb-com.el has the following:

;; GNU vs XEmacs again. GAH.
(or (fboundp 'char-int)
(defmacro char-int( c ) (list 'string-to-char c))) ;; ick.

htmlize.el has the following:

(if (fboundp 'char-int)
(defalias 'htmlize-char-int 'char-int)
  (defalias 'htmlize-char-int 'identity))

Therefore, if BBDB is loaded, htmlize will use char-int.
htmlize calls it as follows:

(if ( (htmlize-char-int char) 255) ...

Now, as I am using Emacs, char will actually be an integer!
Therefore, on Emacs with BBDB loaded first and htmlize loaded second,
this will result in something like this:

Signaling: (wrong-type-argument stringp 34)
  string-to-char(34)
  (htmlize-char-int char)

Therefore I propose the following change:

(or (fboundp 'char-int)
(defmacro char-int (c)
  `(if (integerp ,c) ,c (string-to-char ,c

This is my first defmacro.  :)

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: converting the DB

2001-06-12 Thread Alex Schroeder

Enrico Sirola [EMAIL PROTECTED] writes:

 BBDB version 2.00.06 doesn't understand file format version 6.

You must have had a newer version of BBDB installed and now you
reverted back to 2.00.06 (which uses file format version 3 or 4).  The
newer version of BBDB you had before created a .bbdb file for you
using the current file format version 6.  In order to read the .bbdb
file you must get rid of this version and get the latest version from
the sourceforge site.

If you are a total newbie then you must have copied the .bbdb file
from somebody who has a newer BBDB installation.  You can either
update the BBDB as above, or delete the .bbdb file (and loose all your
data).  Only do that if you haven't entered anything, yet.

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: cvs ci 'bbdb/lisp bbdb-com.el,1.110,1.111'

2001-06-11 Thread Alex Schroeder

Ronan Waide [EMAIL PROTECTED] writes:

 Ideally the address editing function should return a true or false
 value (for valid/invalid data) and the calling code should handle
 that appropriately - by which I mean if you're editing an address, it
 remains unchanged, and if you're adding an address, it discards
 whatever you were trying to add. This would then allow you to write a
 smart editing function for your own locale that, for example, doesn't
 allow you to enter addresses with invalid zip/postal codes or
 whatever. Likewise it could be applied to phones, or whatever else I
 guess.

After an attempt at implementing this, I present a patch for review.
It is a bit problematic and requires more thorough testing.

Editing fields happens with bbdb-edit-current-field.  There,
bbdb-record-edit-field-internal is called and the return value is used
to determine wether the BBDB buffer needs to be sorted or not.  The
return value of bbdb-record-edit-field-internal when editing an
address is the return value of bbdb-record-edit-address.  That again
is the value of funcalling the bbdb-address-editing-function.

Therefore, if I changed the meaning of the bbdb-address-edit-default
return value (currently nil means not to resort the DB when an address
is edited), then a lot of changes need to be done: All the editing
functions need to change the meaning of their return values.

If anybody wrote his custom bbdb-address-edit-function, it needs to be
changed as well.

Furthermore, looking at bbdb-record-edit-name, it used to compute
wether the record needs resorting or not.  I changed this such that
any editing of name or company will result in a need to resort.
(Competing semantics for a return value?)

Anyway...  I'll write ChangeLog entries etc. as soon as it is decided
that this is the right way to go.  What do you think?

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
http://www.emacswiki.org/


/home/alex/elisp/bbdb/lisp $ cvs diff
cvs server: Diffing .
Index: bbdb-com.el
===
RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb-com.el,v
retrieving revision 1.111
diff -r1.111 bbdb-com.el
427,430c427,431
  (bbdb-record-edit-address addr str)
  (if L
  (progn (setcdr L-tail (cons addr nil))
 (setq L-tail (cdr L-tail)))
---
;; dont't add addr to L if user didn't enter any data
  (when (bbdb-record-edit-address addr str)
  (if L
  (progn (setcdr L-tail (cons addr nil))
 (setq L-tail (cdr L-tail)))
432c433
L-tail L)))
---
L-tail L
623a625,626
 (defun bbdb-record-edit-affects-sort (field)
   (eq field 'name))
755,756c758,759
   (if (null contents)
   (setq contents (bbdb-prompt-for-new-field-value name)))
---
   (when (null contents)
 (error No data!))
853,854c856,858
(bbdb-record-edit-address a)
a))
---
(if (bbdb-record-edit-address a)
  a
nil)))
887,892c891,897
 (setq need-to-sort
   (bbdb-record-edit-field-internal record (car field) (nth 1 field)))
 (bbdb-change-record record need-to-sort)
 (bbdb-redisplay-one-record record)
 ;; (bbdb-offer-save)
 ))
---
 (setq need-to-sort (bbdb-record-edit-affects-sort (car field))
   changed-p (bbdb-record-edit-field-internal record (car field) (nth 1 
field)))
 (when changed-p
   (bbdb-change-record record need-to-sort)
   (bbdb-redisplay-one-record record)
   ;; (bbdb-offer-save)
   )))
895c900
   (let (fn ln co need-to-sort new-name old-name)
---
   (let (fn ln co new-name old-name)
908,911d912
(setq need-to-sort (or (not (string= fn
 (or (bbdb-record-firstname bbdb-record) 
)))
   (not (string= ln
 (or (bbdb-record-lastname bbdb-record) 
)
927,931d927
 (setq need-to-sort
   (or need-to-sort
   (not (equal (if co (downcase co) )
   (downcase (or (bbdb-record-company bbdb-record)
 ))
948c944,945
 need-to-sort))
---
 ;; return non-nil if there is data
 (or fn ln co)))
977,980c974,975
 (bbdb-address-set-streets addr str)
 (bbdb-address-set-city addr cty)
 (bbdb-address-set-state addr ste)
 (bbdb-address-set-zip addr zip)
---
 ;; Return nil if no data was entered.  If data was entered, update
 ;; the record.
982,987c977,983
 ;; user didn't enter anything. this causes a display bug. this
 ;; is a temporary fix. Ideally, we'd simply discard the entire
 ;; address entry, but that's going to require bigger hacking.
 (bbdb-address-set-country 

Re: cvs ci 'bbdb/lisp bbdb-com.el,1.110,1.111'

2001-06-10 Thread Alex Schroeder

Waider [EMAIL PROTECTED] writes:

 (bbdb-address-edit-default): If no data is entered for the address,
   enter a spurious country name. This is a temporary hack to get
   around a problem in address display when the address has no data. 

Hi Waider,

What is the problem, exactly?  Seeing this I am not sure wether I
should upgrade.  I have many people in my .bbdb without addresses (and
I have never noticed any significant bugs in address display).
Curious minds want to know.  :)

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: cvs ci 'bbdb/lisp bbdb-com.el,1.110,1.111'

2001-06-10 Thread Alex Schroeder

Alex Schroeder [EMAIL PROTECTED] writes:

 What is the problem, exactly?  Seeing this I am not sure wether I
 should upgrade.  I have many people in my .bbdb without addresses (and
 I have never noticed any significant bugs in address display).
 Curious minds want to know.  :)

Ah... sorry for not checking it.  Now I see that when I enter an
address location without any data, the trailing empty line is eaten
-- the address doesn't even contain a newline, eventhough it should.

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
http://www.emacswiki.org/

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Cannot extract an address component...

2001-03-28 Thread Alex Schroeder

Robert Fenk [EMAIL PROTECTED] writes:

 My guess: One of the headers (From,To,Reply-To), probably
 the Reply-To header is not extracted correctly, as the
 closing "" seems to be missing.
 
 Do a  "M-: (mail-fetch-field "Reply-To") RET"
 Does it return the complete header content?
 
 Remove this header and check whether it works then?

When I do this in the summary buffer, I get nil.
When I do this in the article buffer, I get "[EMAIL PROTECTED]".

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"There are more than 30 color themes available in  color-theme.el."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Gnus completion wishes

2001-03-21 Thread Alex Schroeder

ShengHuo ZHU [EMAIL PROTECTED] writes:

 Alex Schroeder [EMAIL PROTECTED] writes:
 
  On a related note, Gnus related: I often resend messages (S D r from
  the summary buffer).  How can I use the force?
 
 (require 'message)
 (define-key message-minibuffer-local-map [(tab)] 'bbdb-complete-name)

Thanks, works.  :)

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Emacsen v21 do not support proportional fonts; use XEmacs or wait for v21."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Minor ZIP code nits in 2.2

2001-03-19 Thread Alex Schroeder

Norman Walsh [EMAIL PROTECTED] writes:

 1. If you try to enter a zip code (maybe only a purely numeric zip?)
 with a hyphen, BBDB insists that it be US ZIP+4. But I have an
 international address that includes a hyphenated zip that doesn't
 match ZIP+4.

Take a look at bbdb-legal-zip-codes.  I'm not sure what regexp you are
missing, but the "correct" thing to do is to add it to the list.  Such
as 

(add-to-list bbdb-legal-zip-codes "[0-9][0-9][0-9][0-9]-[0-9][0-9]")

Or to disable zip code checking by setting bbdb-check-zip-codes-p to
nil.

Anyway, if you think that your zip code format make sense for other
people, mail it to the list and ask somebody with write permission to
add it.  :)

 2. BBDB insists that all addresses have a ZIP code. But international
 addresses don't always.

Just add the empty string to the list:

(add-to-list bbdb-legal-zip-codes "")

Actually, this was suggested on the list before, maybe somebody with
write access can make sure the empty string is part of
bbdb-legal-zip-codes in CVS?

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Emacs 21 will be out when it comes out.  No beta available."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Gnus completion wishes

2001-03-19 Thread Alex Schroeder

Patrick Campbell-Preston [EMAIL PROTECTED] writes:

 You know your variable/function names are getting too long when they
 don't need *any* explanatory documentation...

LOL!

On a related note, Gnus related: I often resend messages (S D r from
the summary buffer).  How can I use the force?

I guess a simple defadvice would suffice...  But maybe somebody
already has the magic mumbo jumbo?

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Use M-x customize-face to change the colors used for syntax coloring."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: where is the configure script?

2001-02-25 Thread Alex Schroeder

Ronan Waide [EMAIL PROTECTED] writes:

 I'm a mean and nasty militant CVS freak who thinks that generated
 files shouldn't be in CVS[1], and people working from CVS should have
 developer tools.

Ahh...  Mea culpa.  Enlighten me, though: How do I generate it?  All I
ever compile myself is Emacs, and the only two things from CVS I use
are Gnus and BBDB.  :)

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"There are more than 30 color themes available in  color-theme.el."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb-autoload.el

2001-02-25 Thread Alex Schroeder

Ronan Waide [EMAIL PROTECTED] writes:

  regenerate bbdb-autoloads.el recently because of changes in CVS.
 
 Tidy! I may keep this for the mythical FAQ also.

I just checked the INSTALL file -- bbdb-autoloads.el is not mentioned
at all.  If you read the installation instructions for Emacs without
make, it'll fail.  Maybe I'll take a look at that one...  :)

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Check the Emacs Lisp List: http://www.anc.ed.ac.uk/~stephen/emacs/ell.html"

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb-autoload.el

2001-02-25 Thread Alex Schroeder

 I just checked the INSTALL file -- bbdb-autoloads.el is not mentioned
 at all.  If you read the installation instructions for Emacs without
 make, it'll fail.  Maybe I'll take a look at that one...  :)

Then again, maybe not.  :)  There is no need to recreate
bbdb-autoloads.el for tar ball people.  I should go back to
downloading the tar ball.

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Your .emacs is either in C:\ or in the directory of %HOME% under Win32."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: xemacs and autoloads

2001-02-17 Thread Alex Schroeder

Ronan Waide [EMAIL PROTECTED] writes:

 Yah; it's the gratuituous differences that annoy me. Like overlays
 vs. extents, for example, and the completely incompatible menuing
 systems.

Yaaahrg!  I've written layers to handle both two or three times and
I'm getting s tired!

But back to this one:

(if (featurep 'bbdb-autoloads) (error "Already loaded"))

I've often wondered at this sort of code.  Eshell has it, too.

I think that it should be possible to load and reload all lisp files
to you heart's content.  Therefore I suggest you remove it and see
wether it breaks.  My guess is, nothing breaks.

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"The bidirectional gnu.emacs.help mail gateway at gnu.org, isn't."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: texinfo patch

2001-02-13 Thread Alex Schroeder

When I updated my CVS today, I missed the following patch:

 +2001-02-06  Alex Schroeder  [EMAIL PROTECTED]
 +
 + * texinfo/bbdb.texinfo (Customization Parameters): Documented
 + bbdb-check-zip-codes-p, bbdb-address-formatting-alist, and
 + bbdb-continental-zip-regexp.
 +
 + * lisp/bbdb.el (bbdb-address-formatting-alist): defcustom.
 +
 + * lisp/bbdb-com.el (bbdb-expand-mail-aliases): defcustom.
 + (bbdb-check-zip-codes-p): defcustom.
 + (bbdb-legal-zip-codes): defcustom.
 + (bbdb-address-editing-function): defcustom.

Just making sure it didn't get lost.  :)

Alex.

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Zip code bug?

2001-02-12 Thread Alex Schroeder

[EMAIL PROTECTED] (Kai Grojohann) writes:

 On 11 Feb 2001, Alex Schroeder wrote:
 
  [EMAIL PROTECTED] (Kai Grojohann) writes:
  
  It's not quite clear to me how to recognize those.  But BBDB should
  provide support for it.  I think.
  
  Well, if there is any need, somebody will write it up and post it.
 
 I doubt that auto-grokking these things is the way to go, since there
 are so many different address formats.  Implement fifteen address
 formats, and somebody is sure to show you the sixteenth one which you
 haven't thought of.

Well, we can make it as robust as necessary -- just because
bbdb-address-is-continental uses the zip code doesn't mean other
identifying functions must use it as well.  If a new proposed format
works only for the PR China, then by all means the identfying function
should check the country name.

But I'm not going to write it, because I know nobody there.  :)

 Here's a different approach: an address is just a sequence of lines.
 But it is possible to mark up part of an address as the street name,
 or the (house) number, or the zip code, or whatever.  Then the address
 will always look right.

Hm, assume there is a line saying "CH-8004 Zuerich" -- what will you
tag it?  Both zip and city, I assume.  How are you going to export it
to another tool that actually has specific fields for zip and city?
If we lived only in Emacs, there would be no need for pseudo
relational attributes...

Therefore: *Fine by me* -- these palm guys ought to be using Emacs,
anyway, hehehe.  :]

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Your .emacs is either in C:or in the directory of %HOME% under Win32."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: problem when adding new net addresses noticed in read news..

2001-02-08 Thread Alex Schroeder

Conrad Sauerwald [EMAIL PROTECTED] writes:

 I've included a patch to explain.  Not completely bleeding edge cvs,
 as you can see.  I'm sure someone can fix this in a more elegant way.

Ah...  Sorry for reporting a reported bug...  :)

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Use M-x customize-face to change the colors used for syntax coloring."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



bbdb-annotate-message-sender bug?

2001-02-08 Thread Alex Schroeder

I have a CVS version of BBDB about 1 day old, using GNU Emacs 20.7 and
Gnus 5.8.8 from CVS about 1 day old.  I get mail from somebody with a
new mail address.  I hit `:' and surely enough, I get asked:

Add address X to Y? (y or n)

When I answer `n' I get asked, wether I want to create a new record.
When I answer `y', however, nothing happens.  The address X is not
added to the record Y.  Any ideas?  A quick look at
bbdb-annotate-message-sender didn't help...  :)

Looking at the following code:

   (when (and (not (bbdb-y-or-n-p (concat the-first-bit
  the-next-bit
  "\"? ")))
  (bbdb-y-or-n-p
   (format "Create a new record for %s? "
   (bbdb-record-name record
 ;; else add a new record with the same name
 (setq record
   (bbdb-create-internal name nil net
 nil nil nil))
 nil))

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Use M-x customize-face to change the colors used for syntax coloring."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



bbdb-add-or-remove-mail-alias

2001-02-08 Thread Alex Schroeder

I just discovered the wonders of bbdb-add-or-remove-mail-alias --
didn't even know it existed.  I guess the reason I missed it was that
it was not in the most obvious place...  How about the following
patch, then?  (I know that bbdb-add-or-remove-mail-alias is listed
further down in the BBDB mode help, but I practically never read stuff
down there unless I know the functionality I'm looking for.)

Alex.

Index: bbdb.el
===
RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb.el,v
retrieving revision 1.134
diff -c -r1.134 bbdb.el
*** bbdb.el 2001/02/08 16:29:40 1.134
--- bbdb.el 2001/02/09 00:06:08
***
*** 2188,2193 
--- 2188,2195 
  Letters no longer insert themselves.  Numbers are prefix arguments.
  You can move around using the usual cursor motion commands.
  \\bbdb-mode-map
+ \\[bbdb-add-or-remove-mail-alias]\t Add new mail alias to visible records or \
+ remove it.
  \\[bbdb-edit-current-field]\t Edit the field on the current line.
  \\[bbdb-record-edit-notes]\t Edit the `notes' field for the current record.
  \\[bbdb-delete-current-field-or-record]\t Delete the field on the \

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Zip code bug?

2001-02-07 Thread Alex Schroeder

Mats Lfdahl [EMAIL PROTECTED] writes:

 May I suggest a change in the regular expression that determines
 whether a zip code is US or continental?

You are right of course; in Switzerland and Portugal four digits are
used, and in Germany and France five digits are used (those are the
countries I know about, anyway).

You could therefore set bbdb-continental-zip-regexp to something like
this:
"^\\s *\\([A-Z][A-Z]?\\s *-\\s *\\)?[0-9][0-9][0-9] ?[0-9][0-9]?"

If you find that it works well, the default could be changed.  At the
moment I don't feel to sure about it...  :) And I won't be testing it
because I have all Swiss addresses with the CH- prefix in my BBDB...

 Another thought is, in the absence of zip code country prefix, to look
 at the country field. If it is a European country it should be
 displayed as a continental address. But then one would need a list of
 countries so that might not be a good idea.

The sample code I had for Brazilian and Japanese addresses used an
identifying function that relied on the country names.  You could look
at the mail archive to find the URL of the world post friends (or
whatever the organisation is called) -- they have the "standard" for
all countries of the world, and then you could code the identifying
function and the formatting function for either one.  But it's a lot
of work...  :)

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"The bidirectional gnu.emacs.help mail gateway at gnu.org, isn't."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Zip code bug?

2001-02-06 Thread Alex Schroeder

I propose the following documentation for the zip code related stuff
in BBDB, and the transformation of some defvars into defcustom.

Alex.


/home/alex/elisp/bbdb $ cvs diff -u
cvs server: Diffing .
Index: ChangeLog
===
RCS file: /cvsroot/bbdb/bbdb/ChangeLog,v
retrieving revision 2.68
diff -u -r2.68 ChangeLog
--- ChangeLog   2001/02/05 11:39:06 2.68
+++ ChangeLog   2001/02/06 20:12:52
@@ -1,3 +1,16 @@
+2001-02-06  Alex Schroeder  [EMAIL PROTECTED]
+
+   * texinfo/bbdb.texinfo (Customization Parameters): Documented
+   bbdb-check-zip-codes-p, bbdb-address-formatting-alist, and
+   bbdb-continental-zip-regexp.
+
+   * lisp/bbdb.el (bbdb-address-formatting-alist): defcustom.
+
+   * lisp/bbdb-com.el (bbdb-expand-mail-aliases): defcustom.
+   (bbdb-check-zip-codes-p): defcustom.
+   (bbdb-legal-zip-codes): defcustom.
+   (bbdb-address-editing-function): defcustom.
+
 2001-02-05  Robert Fenk  [EMAIL PROTECTED]
 
* lisp/Makefile.in (bbdb-hooks.elc): removed need to load VM.
cvs server: Diffing bits
cvs server: Diffing bits/bbdb-filters
cvs server: Diffing bits/bbdb-filters/doc
cvs server: Diffing bits/bbdb-filters/doc/formatted
cvs server: Diffing html
cvs server: Diffing html/images
cvs server: Diffing html/patches
cvs server: Diffing lisp
Index: lisp/bbdb-com.el
===
RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb-com.el,v
retrieving revision 1.94
diff -u -r1.94 bbdb-com.el
--- lisp/bbdb-com.el2001/02/02 14:20:04 1.94
+++ lisp/bbdb-com.el2001/02/06 20:13:13
@@ -332,15 +332,19 @@
 
 ;;; Parsing other things
 
-(defvar bbdb-expand-mail-aliases t
-  "If non-nil, expand mail aliases in bbdb-complete-name")
+(defcustom bbdb-expand-mail-aliases t
+  "If non-nil, expand mail aliases in bbdb-complete-name"
+  :group 'bbdb-record-use
+  :type 'boolean)
 
-(defvar bbdb-check-zip-codes-p t
+(defcustom bbdb-check-zip-codes-p t
   "If non-nil, require legal zip codes when entering an address.
 The format of legal zip codes is determined by the variable
-`bbdb-legal-zip-codes'.")
+`bbdb-legal-zip-codes'."
+  :group 'bbdb-record-creation
+  :type 'boolean)
 
-(defvar bbdb-legal-zip-codes
+(defcustom bbdb-legal-zip-codes
   '(;; Matches 1 to 6 digits.
 "^[ \t\n]*[0-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[ \t\n]*$"
 ;; Matches 5 digits and 3 or 4 digits.
@@ -357,7 +361,9 @@
 ;; (result is ("SE" (133 36)))
 "^[ \t\n]*\\([A-Z]+\\)[ \t\n]*-?[ \t\n]*\\([0-9]+\\)[ \t\n]+\\([0-9]+\\)[ 
\t\n]*$")
   "List of regexps that match legal zip codes.
-Wether this is used at all depends on the variable `bbdb-check-zip-codes-p'.")
+Wether this is used at all depends on the variable `bbdb-check-zip-codes-p'."
+  :group 'bbdb-record-creation
+  :type '(repeat regexp))
 
 (defun bbdb-parse-zip-string (string)
   "Check wether STRING is a legal zip code.
@@ -935,11 +941,13 @@
 (bbdb-address-set-country addr country)
 nil))
 
-(defvar bbdb-address-editing-function 'bbdb-address-edit-default
+(defcustom bbdb-address-editing-function 'bbdb-address-edit-default
   "Function to use for address editing.
 The function must accept a BBDB address as parameter and allow the
 user to edit it.  This variable is called from `bbdb-record-edit-address'.
-The default value is the symbol `bbdb-address-edit-default'.")
+The default value is the symbol `bbdb-address-edit-default'."
+  :group 'bbdb-record-creation
+  :type 'function)
 
 (defun bbdb-record-edit-address (addr optional location)
   "Edit an address ADDR.
Index: lisp/bbdb.el
===
RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb.el,v
retrieving revision 1.132
diff -u -r1.132 bbdb.el
--- lisp/bbdb.el2001/02/05 11:18:14 1.132
+++ lisp/bbdb.el2001/02/06 20:13:38
@@ -1021,21 +1021,23 @@
 
 ;;; Address formatting.
 
-(defvar bbdb-address-formatting-alist
+(defcustom bbdb-address-formatting-alist
   '((bbdb-address-is-continental . bbdb-format-address-continental)
 (nil . bbdb-format-address-default))
   "Alist of address identifying and address formatting functions.
 The key is an identifying function which accepts an address.  The
 associated value is a formatting function which inserts the formatted
 address in the current buffer.  If the identifying function returns
-non-nil, the formatting function is called.  The nil key is a default
-value will allways calls the associated formatting function.  Therefore
-you should always have (nil . bbdb-format-address-default) as the last
-element in the alist.
+non-nil, the formatting function is called.  When nil is used as the
+car, then the associated formatting function will always be called.
+Therefore you should always have (nil . bbdb-format-address-default) as
+the last element 

void-function replace-in-string

2001-02-03 Thread Alex Schroeder

The latest CVS seems to have an XEmacsism...  The function
replace-in-string is not in Emacs 20.7.

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"gnu.emacs.help is for GNU Emacs, comp.emacs.xemacs is for XEmacs."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: Zip code bug?

2001-01-30 Thread Alex Schroeder

Mats Lfdahl [EMAIL PROTECTED] writes:

 BBDB does not accept an empty zip code field when I'm entering an
 address. Because of this, if I don't know the zip code I can't enter
 the address at all.

Oops, you are right.

You can either set bbdb-check-zip-codes-p to nil (that should disable
checking), or you can add the empty string to bbdb-legal-zip-codes.

Ronan, the following might be appropriate:

Index: bbdb-com.el
===
RCS file: /home/cvsroot/emacs/bbdb2/lisp/bbdb-com.el,v
retrieving revision 1.7
diff -c -r1.7 bbdb-com.el
*** bbdb-com.el 2000/11/07 23:59:07 1.7
--- bbdb-com.el 2001/01/30 22:43:34
***
*** 338,344 
  `bbdb-legal-zip-codes'.")
  
  (defvar bbdb-legal-zip-codes
!   '(;; Matches 1 to 6 digits.
  "^[ \t\n]*[0-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[ \t\n]*$"
  ;; Matches 5 digits and 3 or 4 digits.
  "^[ \t\n]*\\([0-9][0-9][0-9][0-9][0-9]\\)[ \t\n]*-?[ 
\t\n]*\\([0-9][0-9][0-9][0-9]?\\)[ \t\n]*$"
--- 338,346 
  `bbdb-legal-zip-codes'.")
  
  (defvar bbdb-legal-zip-codes
!   '(;; The empty string
! "^$"
! ;; Matches 1 to 6 digits.
  "^[ \t\n]*[0-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[ \t\n]*$"
  ;; Matches 5 digits and 3 or 4 digits.
  "^[ \t\n]*\\([0-9][0-9][0-9][0-9][0-9]\\)[ \t\n]*-?[ 
\t\n]*\\([0-9][0-9][0-9][0-9]?\\)[ \t\n]*$"


Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"gnu.emacs.help is for GNU Emacs, comp.emacs.xemacs is for XEmacs."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: bbdb search problem

2001-01-29 Thread Alex Schroeder

(I removed the original poster from the CC because this mail is code
related...)

Ronan Waide [EMAIL PROTECTED] writes:

 As best I can tell, your .bbdb file has a notes field called "name" in
 at least one of the records. This is colliding with BBDB's "real" name
 field, causing the stacktrace above.

Hehe, hadn't thought of the possibility.  Looking at the code, though,
I'm confused:

  (let ((fields all-fields) done tmp)
(if (bbdb-record-raw-notes record)
(while (and (not done) fields)
  (setq tmp (bbdb-record-getprop
 record (car fields))

I then started to grep for all-fields -- but found practically
nothing:

cd /home/alex/elisp/bbdb/lisp/
grep -n -e all-fields *.el /dev/null
bbdb-com.el:80:  (let ((fields all-fields) done tmp)
bbdb-com.el:131: '((all-fields (cons 'notes

grep finished (matches found) at Sun Jan 28 20:15:16

Anybody know how this variable is set?  Maybe it's a bug: instead of
using all-fields, this code should use bbdb-propnames, IMHO.

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Put (global-font-lock-mode 1) in your .emacs for syntax coloring."

___
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/



Re: archived since March 1997 [was: Re: Archive for this List?]

2001-01-15 Thread Alex Schroeder

[EMAIL PROTECTED] (Marc A. Tamsky) writes:

 Anyone who can add it to the apparently "blessed" mail archive site
   http://www.mail-archive.com/bbdb-info%40xemacs.org/
 please mail me.  If you have another use for it, please feel free to
 contact me as well.

Well, you can do that yourself, as you are using Gnus: mark the
messages you want to send and hit S D r (I think) in order to resend
them.  Resend the mails to [EMAIL PROTECTED]

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Use M-x customize-face to change the colors used for syntax coloring."


___
bbdb-info mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/bbdb-info



Re: Zip Codes Revisited...

2000-11-08 Thread Alex Schroeder

Alex Schroeder [EMAIL PROTECTED] writes:

 Ronan Waide [EMAIL PROTECTED] writes:
 
  is this: go ahead with the zips-as-strings conversion (does this mean
  we need BBDB v6 file format? I guess so...), and modify the validation
  code to work on the strings - i.e. it doesn't try to parse the
  zipcodes into a list or whatever, but it does try to make sure that
  the string conforms to something good - and then make the entire
  validation option switchable. bbdb-validate-zip-codes-p, for
  example.

I've sent the patch to Ronan, so it will probably appear in CVS soon.

The most important thing is that Zip Codes will be plain strings.  In
order to make this change explicit, I introduced a new file version.
Zip codes will be checked if the new variable bbdb-check-zip-codes-p
is t (the default).  Checking is done by matching the string will all
the regexps in the new variable bbdb-legal-zip-codes.

It looks like this, now:

 (defvar bbdb-legal-zip-codes
   '(;; Matches 1 to 6 digits.
 "^[ \t\n]*[0-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[ \t\n]*$"
 ;; Matches 5 digits and 3 or 4 digits.
 "^[ \t\n]*\\([0-9][0-9][0-9][0-9][0-9]\\)[ \t\n]*-?[ 
\t\n]*\\([0-9][0-9][0-9][0-9]?\\)[ \t\n]*$"
 ;; Match zip codes for Canada, UK, etc. (result is ("LL47" "U4B")).
 "^[ \t\n]*\\([A-Za-z0-9]+\\)[ \t\n]+\\([A-Za-z0-9]+\\)[ \t\n]*$"
 ;; Match zip codes for continental Europe.  Examples "CH-8057"
 ;; or "F - 83320" (result is ("CH" "8057") or ("F" "83320")).
 ;; Support for "NL-2300RA" added at request from Carsten Dominik
 ;; [EMAIL PROTECTED]
 "^[ \t\n]*\\([A-Z]+\\)[ \t\n]*-?[ \t\n]*\\([0-9]+ ?[A-Z]*\\)[ \t\n]*$"
 ;; Match zip codes from Sweden where the five digits are grouped 3+2
 ;; at the request from Mats Lofdahl [EMAIL PROTECTED].
 ;; (result is ("SE" (133 36)))
 "^[ \t\n]*\\([A-Z]+\\)[ \t\n]*-?[ \t\n]*\\([0-9]+\\)[ \t\n]+\\([0-9]+\\)[ 
\t\n]*$")
   "List of regexps that match legal zip codes.
 Wether this is used at all depends on the variable `bbdb-check-zip-codes-p'.")

(I just noted that the explanatory comments still refer to the old
datastructure cruft...)

Here's the ChangeLog for all the stuff.

   * lisp/bbdb-com.el (bbdb-check-zip-codes-p): New variable.
   (bbdb-legal-zip-codes): New variable.
   (bbdb-parse-zip-string): Use the two new variables instead of
   hard-coding valid zip string regepxs.
   (bbdb-create-internal): Doc change.  Check wether zip code is
   stringp.
 
   * lisp/bbdb-migrate.el (bbdb-migration-features): Added
   description for version 6.
   (bbdb-migration-spec): Added version 5-6 stuff.
   (bbdb-unmigration-spec): Added version 6-5 stuff.
   (bbdb-migrate-zip-codes-to-strings): New function with code from
   bbdb-address-zip-string.
   (bbdb-unmigrate-zip-codes-to-strings): New function with code from
   bbdb-parse-zip-string.
   (bbdb-migrate-add-country-field): Doc typo.
   (bbdb-unmigrate-add-country-field): Doc typo.
 
   * lisp/bbdb-print.el (bbdb-print-format-address-continental): Use
   bbdb-address-zip instead of bbdb-address-zip-string.
   (bbdb-print-format-address-default): Ditto.
 
   * lisp/bbdb.el (bbdb-file-format): Set to 6.
   (bbdb-address-zip-string): defalised to bbdb-address-zip.
   (bbdb-continental-zip-regexp): New option.
   (bbdb-address-is-continental): Use bbdb-continental-zip-regexp.
   (bbdb-format-address-continental): Use bbdb-address-zip instead of
   bbdb-address-zip-string.
   (bbdb-format-address-default): Ditto.

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"Emacsen v21 do not do colors on a tty; use XEmacs or wait for Emacs 21."

___
bbdb-info mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/bbdb-info



Re: Zip Codes Revisited...

2000-11-01 Thread Alex Schroeder

Ronan Waide [EMAIL PROTECTED] writes:

 is this: go ahead with the zips-as-strings conversion (does this mean
 we need BBDB v6 file format? I guess so...), and modify the validation
 code to work on the strings - i.e. it doesn't try to parse the
 zipcodes into a list or whatever, but it does try to make sure that
 the string conforms to something good - and then make the entire
 validation option switchable. bbdb-validate-zip-codes-p, for
 example.

I got myself a new tarball yesterday and I'll check the ol' patch I
had a few weeks back.  With a bit of tweaking this should be a
no-brainer.

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html
"M-x apropos is your friend, C-h a is not the same thing."

___
bbdb-info mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/bbdb-info



Re: non-american american zip codes in 2.2

2000-09-25 Thread Alex Schroeder

[EMAIL PROTECTED] (David S. Goldberg) writes:

 So I've finally got 2.2 running the way I want, and I just tried out
 the syncBBDB which worked quite well other than the inevitable
 duplicate records.  While cleaning them out I notice that any zip code
 I've got that starts with 0, and there are a good number of them as I
 live in a region of the country in which most zip codes start with 0,
 the leading 0 is gone.  A look through the manuals indicates that zip
 codes are either an integer if "american", which I presumably have
 set, or a list of strings if "non-american" which I apparently want to
 have set (much as I set bbdb-north-american-phone-numbers-p to nil).
 But I can't find any variable or whatever to specify the non-american
 zip codes.  How do I do this?

There is no way to do this.  There has been some talk and there have
been suggestions, but the current state of the art continues to be the
following, AFAIK:

When you enter a zip code, it is compared to a number of regexps.
Whatever regexp matches determines the fate of the zip code.
Here is a summary of what happens in the function
`bbdb-parse-zip-string':

;; Matches 1 to 6 digits.
((string-match "^[ \t\n]*[0-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[ \t\n]*$" string)

- stored as integer

;; Matches 5 digits and 3 or 4 digits.
((string-match "^[ \t\n]*\\([0-9][0-9][0-9][0-9][0-9]\\)[ \t\n]*-?[ 
\t\n]*\\([0-9][0-9][0-9][0-9]?\\)[ \t\n]*$" string)

- stored as list of two integers

;; Match zip codes for Canada, UK, etc. (result is ("LL47" "U4B")).
((string-match
  "^[ \t\n]*\\([A-Za-z0-9]+\\)[ \t\n]+\\([A-Za-z0-9]+\\)[ \t\n]*$"
  string)

- stored as lust of two strings

;; Match zip codes for continental Europe.  Examples "CH-8057"
;; or "F - 83320"
((string-match
  "^[ \t\n]*\\([A-Z]+\\)[ \t\n]*-?[ \t\n]*\\([0-9]+ ?[A-Z]*\\)[ \t\n]*$" string)
 (list (substring string (match-beginning 1) (match-end 1))
   (substring string (match-beginning 2) (match-end 2

- stored as lust of two strings

;; Match zip codes from Sweden where the five digits are grouped 3+2
((string-match
  "^[ \t\n]*\\([A-Z]+\\)[ \t\n]*-?[ \t\n]*\\([0-9]+\\)[ \t\n]+\\([0-9]+\\)[ 
\t\n]*$" string)

- stored as list of string with second element again a list
   of two strings

;; Add some error messages
((string-match "-[^-]+-" string)
 (error "too many dashes in zip code."))
(( (length string) 3)
 (error "not enough digits in zip code."))
(t (error "not a valid zip code."

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html


___
bbdb-info mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/bbdb-info



Re: zip codes as plain strings -- patch and file format change?

2000-07-19 Thread Alex Schroeder

Kevin Davidson [EMAIL PROTECTED] writes:

  Without checking everywhere zips get used, I think you can get away
  with not changing the file format - just make the zip a list of a
  single string.  ("like this")

Hm well, the main goal I had was to get rid of all the zip parsing and
zip to string conversion cruft...

  for elisp and Perl (nobody uses anything else, do they ?)

Python!  :)

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html


___
bbdb-info mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/bbdb-info



`bbdb-current-field' is sometimes off by one

2000-06-06 Thread Alex Schroeder

Hi all,

Has anybody noticed bugs in the BBDB 2.2 when trying to delete a
field?  The problem seems to be that bbdb-current-field tries to
identify which fields are being displayed on a line.

In a record which looks like this:

  Tel P: phone
   home: street1
 street2
 city, state  zip
 country
AKA: aka
   tex-name: tex-name
 mail-alias: mail-alias

I cannot delete the mail-alias field.  When I press d on the tex-name
field, however, I am prompted wether I want to delete the mail alias
field.

It seems that the line-count in `bbdb-current-field' is off by one,
but I have not been able to debug this (yet)...  So currently this is
just a bug report.  :)

Alex.
-- 
http://www.geocities.com/kensanata/emacs.html


___
bbdb-info mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/bbdb-info