Re: spacebar land mines

2007-12-16 Thread Reiner Steib
On Sun, Dec 16 2007, [EMAIL PROTECTED] wrote:

> R> This is not BBDB specific in any way, see...
> R> | y-or-n-p is a built-in function in `C source code'.
>
> Actually at that point it is using bbdb-y-or-n-p, which acted
> differently for the second question too. 

I doubt that `bbdb-y-or-n-p' acts differently compared to `y-or-n-p'
in Emacs, since (fboundp 'yes-or-no-p-dialog-box) is always nil in
Emacs...

--8<---cut here---start->8---
;;; internal kludge to force queries to always happen with the mouse rather
;;; than basing the decision on the last-input-event; bind this, don't set it.
(defvar bbdb-force-dialog-boxes nil)

(defun bbdb-y-or-n-p (prompt)
  (prog1
  (funcall
   (cond ((and bbdb-force-dialog-boxes
   (fboundp 'yes-or-no-p-dialog-box))
  (when (and (fboundp 'raise-frame)
 (not (frame-visible-p (selected-frame
(raise-frame (selected-frame)))
  'yes-or-no-p-dialog-box)
 (t 'y-or-n-p))
   prompt)
(message " ")))
--8<---cut here---end--->8---

Thus, in Emacs, this is simply...
--8<---cut here---start->8---
(defun bbdb-y-or-n-p (prompt)
  (prog1
  (y-or-n-p prompt)
(message " ")))
--8<---cut here---end--->8---

> Anyways, it is stuffing the ballot box because the user will just be
> hitting the spacebar over and over reading his mails, with eyes
> nowhere near the minibuffer to realize he just signed on the dotted
> line...

If you don't like SPC for y-or-n-p, remove the binding from
`query-replace-map' as suggested in the previous posting.

(Disclaimer: I'm only a BBDB user.  The BBDB developers might have a
different opinion.)

Bye, Reiner.
-- 
   ,,,
  (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: spacebar land mines

2007-12-15 Thread jidanni
R> This is not BBDB specific in any way, see...
R> | y-or-n-p is a built-in function in `C source code'.

Actually at that point it is using bbdb-y-or-n-p, which acted
differently for the second question too. Anyways, it is stuffing the
ballot box because the user will just be hitting the spacebar over and
over reading his mails, with eyes nowhere near the minibuffer to
realize he just signed on the dotted line...

-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: spacebar land mines

2007-12-15 Thread Reiner Steib
On Sat, Dec 15 2007, [EMAIL PROTECTED] wrote:

> I have discovered the biggest problem with BBDB.
[...]
> Well, all I can say is: don't take spacebar for an answer ever,
> require a real y/n. 

This is not BBDB specific in any way, see...

,[ ` f y-or-n-p RET' ]
| y-or-n-p is a built-in function in `C source code'.
| (y-or-n-p prompt)
| 
| Ask user a "y or n" question.  Return t if answer is "y".
| Takes one argument, which is the string to display to ask the question.
| It should end in a space; `y-or-n-p' adds `(y or n) ' to it.
| No confirmation of the answer is requested; a single character is enough.
| Also accepts Space to mean yes, or Delete to mean no.  (Actually, it uses
| the bindings in `query-replace-map'; see the documentation of that variable
| for more information.  In this case, the useful bindings are `act', `skip',
| `recenter', and `quit'.)
| 
| Under a windowing system a dialog box will be used if `last-nonmenu-event'
| is nil and `use-dialog-box' is non-nil.
`

Bye, Reiner.
-- 
   ,,,
  (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/