Re: [BBDB] ChangeLog 2011-02-27

2011-03-01 Thread Roland Winkler
On Mon Feb 28 2011 Antoine Levitt wrote:
 Perfect, I just tried it and it works very nicely. There's a typo though:
 
 Index: bbdb-mua.el

Thanks!

Roland

--
Free Software Download: Index, Search  Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-complete-name return value

2011-03-01 Thread Ted Zlatanov
On Mon, 28 Feb 2011 18:50:20 -0500 Stefan Monnier monn...@iro.umontreal.ca 
wrote: 

 The only thing I need to clarify is sorting.  Right now shorter string
 wins.  In the new method, higher score should win.

SM I think it's easier if lower scores win, so it's consistent with the
SM current use of `length'.  It's really not a big issue: just negate the
SM values you put on the property and you're done.

I thought that would be easier too, but it's counter-intuitive.  Well,
here's the patch.  It doesn't check that the completion score is a
number but otherwise seems OK to me.  A string with a completion score
always wins over one without.

Ted

=== modified file 'lisp/minibuffer.el'
*** lisp/minibuffer.el  2011-02-12 18:30:13 +
--- lisp/minibuffer.el  2011-03-01 15:39:33 +
***
*** 704,710 
  (when last
(setcdr last nil)
;; Prefer shorter completions.
!   (setq all (sort all (lambda (c1 c2) ( (length c1) (length c2)
;; Prefer recently used completions.
(let ((hist (symbol-value minibuffer-history-variable)))
  (setq all (sort all (lambda (c1 c2)
--- 704,719 
  (when last
(setcdr last nil)
;; Prefer shorter completions.
!   (setq
!all
!(sort all
!  (lambda (c1 c2)
!(let ((s1 (get-text-property 0 :completion-score c1))
!  (s2 (get-text-property 0 :completion-score c2)))
!  (cond ((and s1 s2) ( s1 s2))
!(s1 t)
!(s2 nil)
!(t ( (length c1) (length c2
;; Prefer recently used completions.
(let ((hist (symbol-value minibuffer-history-variable)))
  (setq all (sort all (lambda (c1 c2)




--
Free Software Download: Index, Search  Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/