Fabien Penso <[EMAIL PROTECTED]> writes:

> I use bbdb/cvs. When I compose a new message, hiting TAB displays the
> bbdb entry for the matches it found, and the bbdb buffer takes half of
> the size of my Emacs, which annoyes me a lot. I have to manually close
> it.
> 
> How can I either choose to display it on a 4 lines large buffer, the
> same way it does when I read a mail from someone which is already in my
> bbdb, or how can I not display any entry at all ?

The latter is easy:

;; Whether `bbdb-complete-name' (M-TAB in mail-mode) will update the *BBDB* 
;; buffer to display the record whose email address has just been inserted.
(setq bbdb-completion-display-record nil)  

Choosing the window size looks a little trickier given the current
state of bbdb-complete-name and bbdb-display-records-1 - but you might
try writing a hook function to be invoked from bbdb-list-hook (which
is called after the *BBDB* buffer is filled in) to shrink the window
for you, although of course this would get called every time, not just
during completion, so it's not quite what you asked for.
 
> I have tried shrink-window-if-larger-than-buffer after a C-x o, but it
> looks like the bbdb buffer doesn't want to be skrinked...

Then again, this sounds odd; it certainly works for me.  But then I
know exactly which Emacs, mail-user-agent, and bizarre customisations
I'm using!

Speaking of bizarre customisations, here's a bit of brute force from
my .emacs which helps me out in exactly situations like this - it is
deliberately non-symmetrical in that the exact result depends on which
window is selected when it is invoked.  

(defun pcp-resize-windows () 
  "Resize all windows in the current frame, by first balancing their
sizes and then shrinking any window larger than its contents."
  (interactive)
  (balance-windows)
  (other-window 1)  ;; shrink the current window last
  (walk-windows 'shrink-window-if-larger-than-buffer)
  (other-window -1))

;; a suitable binding for it
(define-key ctl-x-4-map "w" 'pcp-resize-windows)

Do let me know if you find it useful; I might feel a warm glow.

Patrick  
                   C-c C-f C-b C-a C-k C-k C-c C-c



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

Reply via email to