Re: bbdb-completing-read-mails and tab-completion

2015-04-27 Thread Peter Münster
On Sun, Apr 26 2015, Roland Winkler wrote:

 [...]
 But bbdb-completing-read-mails does not use something like
 REQUIRE-MATCH.

Thanks for your explanation, Roland. Now I understand.
In my situation, it doesn't matter, because I know, that an
email-address is required in the end, so I would always continue
completing until the completion is complete.

-- 
   Peter


--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-completing-read-mails and tab-completion

2015-04-26 Thread Peter Münster
On Sun, Apr 26 2015, Roland Winkler wrote:

 I am sorry, the code is broken.  A bad hack to make it work
 *somehow* is to use a prompt for bbdb-completing-read-mails that
 looks like a mail header, for example

   (bbdb-completing-read-mails Resend-message(s)-to: )

This is not a *bad* hack, this is actually *the* solution, thanks!


 Different question: What is your use case?  Why do you want to
 advice gnus-summary-resend-message?  Why can't you use
 bbdb-complete-mail in some gnus buffer?  (I do not know many details
 about gnus.)

gnus-summary-resend-message asks in the minibuffer for the destination
address, and that's the place, where I want to use the bbdb-tab-completion.
With your hack, it works just fine, no need to fix anything.

Thanks,
-- 
   Peter


--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-completing-read-mails and tab-completion

2015-04-26 Thread Roland Winkler
On Sun Apr 26 2015 Peter Münster wrote:
 gnus-summary-resend-message asks in the minibuffer for the destination
 address, and that's the place, where I want to use the bbdb-tab-completion.
 With your hack, it works just fine, no need to fix anything.

I am glad you are satisfied.  Still I believe that partially
completed email addresses are not very meaningful return values in
such a context.

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: bbdb-completing-read-mails and tab-completion

2015-04-26 Thread Peter Münster
On Sun, Apr 26 2015, Roland Winkler wrote:

 Still I believe that partially completed email addresses are not very
 meaningful return values in such a context.

Sorry, I don't understand...  Why partially?  After completion, gnus
gets the right address.

-- 
   Peter


--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: bbdb-completing-read-mails and tab-completion

2015-04-26 Thread Roland Winkler
On Sun Apr 26 2015 Peter Münster wrote:
 On Sun, Apr 26 2015, Roland Winkler wrote:
 
  Still I believe that partially completed email addresses are not very
  meaningful return values in such a context.
 
 Sorry, I don't understand...  Why partially?  After completion, gnus
 gets the right address.

Say, I have bbdb-completion-list bound to '(lf-name) so that
bbdb-complete-mail uses the last name for completion.

Now if there are two records for Joe Andersen and Dave Anderson and
I type and, bbdb-complete-mail and also bbdb-completing-read-mails
will complete this to anders which is the common part of Andersen
and Anderson.  (That's called partial completion.  Emacs does it all
the time.)  But a meaningful return value for
bbdb-completing-read-mails would only be one or multiple comma-separated
valid email addresses.  In general, that's why completing-read has
an optional arg REQUIRE-MATCH.  If that's non-nil you must enter a
valid completion.  Partially completed values are not valid as
return values.

But bbdb-completing-read-mails does not use something like
REQUIRE-MATCH.

Roland

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: bbdb-completing-read-mails and tab-completion

2015-04-26 Thread Roland Winkler
On Sat Apr 25 2015 Peter Münster wrote:
 When using bbdb-completing-read-mails like this:
 
 --8---cut here---start-8---
 (defadvice gnus-summary-resend-message (before pm/resend-with-bbdb act)
   Resend message with bbdb address completion.
   (interactive
(list (bbdb-completing-read-mails Resend message(s) to: 
 --8---cut here---end---8---
 
 the tab-completion fails with this message:
 
 Not a valid buffer position for mail completion
 
 How could I make it work please?

I am sorry, the code is broken.  A bad hack to make it work
*somehow* is to use a prompt for bbdb-completing-read-mails that
looks like a mail header, for example

  (bbdb-completing-read-mails Resend-message(s)-to: )

The real problem is:

bbdb-completing-read-mails is derived from bbdb-complete-mail which
is used in an ordinary buffer instead of a minibuffer, and
bbdb-complete-mail can also perform partial completion.  Yet I
believe in the context of bbdb-completing-read-mails, partial
completion doesn't make much sense as a return value for this
function.  I assume this must have been an old problem, already
present in BBDB 2.  Right now I am not sure whether / how this can
be solved cleanly by defining a suitable wrapper around
bbdb-complete-mail.

Currently, BBDB 3 uses bbdb-completing-read-mails only for its MH-E
interface.  But I am not aware of anybody using this interface,
which is probably why this problem went unnoticed for so long.

Different question: What is your use case?  Why do you want to
advice gnus-summary-resend-message?  Why can't you use
bbdb-complete-mail in some gnus buffer?  (I do not know many details
about gnus.)

Roland

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/