Subject: Re: bug#59314: 29.0.50; EUDC and message-mode header completion

From: Eric Abrahamsen <[email-masked]>
Date: Mon, 21 Nov 2022 16:15:06 -0800

Thomas Fitzsimmons <[email-masked]> writes:

[...]

> That's the extent of my email completion setup.  I think the only reason
> this setup doesn't generalize (assuming an EUDC EBDB backend in your
> case) is that other people like different UIs, e.g., when the same
> prefix expands to multiple possible addresses (as you alluded to), what
> UI should one use to select?  I use the UI provided by EUDC.
>
> Anyway, tonight I did manage to add ERT tests for the EUDC LDAP backend.
> Can you try:
>
> make -C test lisp/net/eudc-tests.log

No love!

Running 11 tests (2022-11-21 16:04:40-0800, selector `(not (or (tag :unstable) (tag :nativecomp)))')
   passed   1/11  eudc--plist-member (0.000396 sec)
   passed   2/11  eudc-lax-plist-get (0.000433 sec)
   passed   3/11  eudc-plist-get (0.000417 sec)
   passed   4/11  eudc-plist-member (0.000390 sec)
   passed   5/11  eudc-test-make-address (0.000151 sec)
   passed   6/11  eudc-test-rfc5322-quote-phrase (0.000067 sec)
   passed   7/11  eudc-test-rfc5322-valid-comment-p (0.000760 sec)
  skipped   8/11  eudcb-bbdb (0.000102 sec)
   passed   9/11  eudcb-ecomplete (0.007451 sec)
Loading eudcb-ldap...
Parsing results...
Parsing results... done
Parsing results...
Parsing results... done
Test eudcb-ldap backtrace:
  signal(error ("No match"))
  apply(signal (error ("No match")))
  (setq value-640 (apply fn-638 args-639))
  (unwind-protect (setq value-640 (apply fn-638 args-639)) (setq form-
  (if (unwind-protect (setq value-640 (apply fn-638 args-639)) (setq f
  (let (form-description-642) (if (unwind-protect (setq value-640 (app
  (let ((value-640 'ert-form-evaluation-aborted-641)) (let (form-descr
  (let* ((fn-638 #'equal) (args-639 (condition-case err (let ((signal-
  (let ((ldap-process (start-process "slapd" "*slapd*" "/usr/sbin/slap
  (closure (t) nil (let ((value-636 (gensym "ert-form-evaluation-abort
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name eudcb-ldap :documentation "Test the L
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
  ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
  eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/net/eudc-tests.el" "
  command-line()
  normal-top-level()
Test eudcb-ldap condition:
    (error "No match")
   FAILED  10/11  eudcb-ldap (1.024022 sec) at lisp/net/eudc-tests.el:271
Parsing /home/eric/dev/emacs/test/lisp/net/eudc-resources/mailrc...
Parsing /home/eric/dev/emacs/test/lisp/net/eudc-resources/mailrc... done
   passed  11/11  eudcb-mailabbrev (0.002174 sec)

Ran 11 tests, 9 results as expected, 1 unexpected, 1 skipped (2022-11-21 16:04:41-0800, 1.151547 sec)

1 unexpected results:
   FAILED  eudcb-ldap

1 skipped results:
  SKIPPED  eudcb-bbdb

> on your machine to confirm they work for you?  You need /usr/sbin/slapd
> installed.
>
> I'll work on adding EUDC BBDB backend tests, and I may write an EBDB
> EUDC backend.
>
> Once I have that, I'll be able to extract all the configuration
> resources (like .mailrc, ecompleterc, etc.) into a tarball.  Then we can
> use that tarball to debug/redesign out-of-the-box completion scenarios,
> starting from "emacs -Q + tarball", "emacs -Q + EBDB + tarball",
> "emacs -Q + BBDB + tarball", etc.
>
> Without starting from "emacs -Q", it's impossible for me to know what I
> might break in other people's configurations, when making changes to
> message-mode's default completion code.

I've already said this, but I don't think we should be pushing things in
a direction that relies any external package or its particular behavior.
The capf machinery should be enough, and that's very clearly defined.

Eric