ChangeLog 2011-01-16 (was: (error "Attempt to split minibuffer window"))

2011-01-16 Thread Roland Winkler
On Sat Jan 15 2011 Stefan Monnier wrote:
> > The spirit of the current approach in BBDB for displaying buffers is
> > still the one which I guess was implemented years ago. I guess the
> > above makes more sense. Yet implementing this properly might break
> > again some backward compatibility... (And it might take a little
> > while since I need to understand better how something like
> > special-display-regexp is supposed to work.)
> 
> No need for you to understand it: just fallback to display-buffer or
> pop-to-buffer if your current code fails.

The updated code should do that.

> > Do I understand correctly that the idea underlying your patch is
> > that the only file the user loads explicitly is bbdb-autoloads.el?
> 
> Yes.

Now loading bbdb-autoloads.el should be sufficient.

2011-01-16  Roland Winkler  
* README: Updated.

* lisp/Makefile: In bbdb-autloads.el, add BBDB lisp directory to
load-path.

* lisp/bbdb.el (bbdb-pop-up-buffer): Use condition-case, in case
split-window fails.
(bbdb-records, bbdb-mode, bbdb-version, bbdb-initialize): Add
autoload cookie.

BBDB is avaiable at
http://cvs.savannah.gnu.org/viewvc/bbdb/?root=bbdb
To check it out, use
cvs -d:pserver:anonym...@cvs.sv.gnu.org:/sources/bbdb co bbdb

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: (error "Attempt to split minibuffer window")

2011-01-15 Thread Roland Winkler
> > The spirit of the current approach in BBDB for displaying buffers is
> > still the one which I guess was implemented years ago. I guess the
> > above makes more sense. Yet implementing this properly might break
> > again some backward compatibility... (And it might take a little
> > while since I need to understand better how something like
> > special-display-regexp is supposed to work.)
> 
> No need for you to understand it: just fallback to display-buffer or
> pop-to-buffer if your current code fails.

Good to hear, thanks!

> > The reason I am asking is that currently bbdb.el loads
> > bbdb-autoloads.el and there are no autoload magic cookies in
> > bbdb.el. Therefore, having only the above patch would not simplify
> > anything. But with the above patch plus autoload cookies added to
> > bbdb.el loading bbd-autoloads.el should indeed be sufficient.
> 
> I'll trust you on that.  I've always only loaded the bbdb-autoload file
> and never noticed a problem with it.  But that's probably because
> I mostly use BBDB as an address-book and don't hook it into Gnus or
> something like that.

I'll update this accordingly.

Roland

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: (error "Attempt to split minibuffer window")

2011-01-15 Thread Roland Winkler
On Fri Jan 14 2011 Stefan Monnier wrote:
> > No surprise! -- I've never used a minibuffer-only frame.  What kind
> > of behavior would you consider appropriate?  Use a new frame?
> 
> Call display-buffer or pop-to-buffer (this has the major advantage of
> letting the user customize the resulting behavior via
> special-display-regexp).  There can probably be other circumstances
> where split-window fails (dedicated window, maybe, and unsplittable
> frames).  So better do it for all failure cases than only the ones you
> know about.

I've looked at your suggestions more closely. 

The spirit of the current approach in BBDB for displaying buffers is
still the one which I guess was implemented years ago. I guess the
above makes more sense. Yet implementing this properly might break
again some backward compatibility... (And it might take a little
while since I need to understand better how something like
special-display-regexp is supposed to work.)

Oh well, this new BBDB is still in an alpha stage!

> PS: BTW, I suggest the patch below to let users initialize BBDB in their
> .emacs with a single `load' (i.e. without messing with load-path
> themselves):
> 
>  bbdb-autoloads.el: $(DEPSRCS)
>   @-$(RM) $@;
>   @echo "(provide 'bbdb-autoloads)" > $@;
> + @echo "(add-to-list 'load-path (or (file-name-directory
> load-file-name) (car load-path)))\n\n" >> $@;

Do I understand correctly that the idea underlying your patch is
that the only file the user loads explicitly is bbdb-autoloads.el?

The reason I am aksing is that currently bbdb.el loads
bbdb-autoloads.el and there are no autoload magic cookies in
bbdb.el. Therefore, having only the above patch would not simplify
anything. But with the above patch plus autoload cookies added to
bbdb.el loading bbd-autoloads.el should indeed be sufficient.

Roland

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: (error "Attempt to split minibuffer window")

2011-01-15 Thread Roland Winkler
On Sat Jan 15 2011 Stefan Monnier wrote:
> > No surprise! -- I've never used a minibuffer-only frame.  What kind
> > of behavior would you consider appropriate?  Use a new frame?
> 
> Call display-buffer or pop-to-buffer (this has the major advantage of
> letting the user customize the resulting behavior via
> special-display-regexp).  There can probably be other circumstances
> where split-window fails (dedicated window, maybe, and unsplittable
> frames).  So better do it for all failure cases than only the ones you
> know about.

Thanks, I'll do that!

Roland

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: (error "Attempt to split minibuffer window")

2011-01-15 Thread Roland Winkler
On Fri Jan 14 2011 Stefan Monnier wrote:
> When I invoke M-x bbdb from my minibuffer-only frame, BBDB burps with
> the above error.  The Elisp backtrace is:
> 
>   split-window(# 0)
>   bbdb-pop-up-buffer(t nil)
>   bbdb-display-records-internal((...) multi-line nil t nil)
>   bbdb-display-records((...) multi-line nil t)
>   bbdb("" multi-line)
>   call-interactively(bbdb t nil)
>   execute-extended-command(nil)
>   call-interactively(execute-extended-command nil nil)

No surprise! -- I've never used a minibuffer-only frame.  What kind
of behavior would you consider appropriate?  Use a new frame?
Probably this should be customizable... Are there other emacs
packages dealing with a similar problem that I can look at?

> PS: BTW, I suggest the patch below to let users initialize BBDB in their
> .emacs with a single `load' (i.e. without messing with load-path
> themselves):

Thanks! I have not yet looked into the Makefile more carefully.
There is probably more that should be cleaned up.

Roland

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


(error "Attempt to split minibuffer window")

2011-01-14 Thread Stefan Monnier
When I invoke M-x bbdb from my minibuffer-only frame, BBDB burps with
the above error.  The Elisp backtrace is:

  split-window(# 0)
  bbdb-pop-up-buffer(t nil)
  bbdb-display-records-internal((...) multi-line nil t nil)
  bbdb-display-records((...) multi-line nil t)
  bbdb("" multi-line)
  call-interactively(bbdb t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

This is with the CVS code from nongnu.org.


Stefan


PS: BTW, I suggest the patch below to let users initialize BBDB in their
.emacs with a single `load' (i.e. without messing with load-path
themselves):

--- Makefile.~1.2.~ 2010-12-15 01:24:53.0 -0500
+++ Makefile2011-01-14 21:06:59.0 -0500
@@ -88,6 +88,7 @@
 bbdb-autoloads.el: $(DEPSRCS)
@-$(RM) $@;
@echo "(provide 'bbdb-autoloads)" > $@;
+   @echo "(add-to-list 'load-path (or (file-name-directory load-file-name) 
(car load-path)))\n\n" >> $@;
@echo "" >> $@;
@$(emacs) -batch -l autoload \
--eval '(setq generated-autoload-file "'`pwd`'/$@")' \


--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/