unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexander Adolf <alexander.adolf@condition-alpha.com>
To: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] EUDC email addresses via completion-at-point in message-mode
Date: Fri, 15 Apr 2022 23:23:28 +0200	[thread overview]
Message-ID: <61482bcaa1c337ba55f6268fbc313100@condition-alpha.com> (raw)
In-Reply-To: <m3fsmgpl1v.fsf@fitzsim.org>

Hello Thomas,

Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:

> [...]
> It looks like the default binding for TAB in message-mode-map is
> message-tab; so I tested by rebinding TAB to message-tab.  It worked,
> except I was expecting case sensitive results.  Can you please change
> `completion-ignore-case' to nil?  And figure out what to do with
> `completion-table-with-cache''s IGNORE-CASE argument accordingly, if
> necessary?

Ah, well spotted! Thanks for noticing; consider it fixed. "Thou shalt
not impose your will on users more than necessary." ;-)

I have simply removed completion-ignore-case from the setq-local call,
as it shouldn't have been there (probably a left-over from the first
attempts when I was still trying to force things).

The IGNORE-CASE argument to completion-table-with-cache should stay at
t, as it signals whether the function being called
(eudc-query-with-words) is case sensitive (it is not).

> I had to run (message-tab) repeatedly to get the final result if
> multiple results were available, whereas with eudc-expand-try-all bound
> to TAB, I get a "Multiple matches found; choose one:" prompt.  I guess
> that's just a different UI style for completion-at-point?  FWIW, I think
> I prefer eudc-expand-try-all's behaviour.

Does changing the value of the variable message-expand-name-standard-ui
change anything for you? There are a couple of completion-specific
variables changing the behaviour [1], and 3rd party packages might have
an effect, too.

[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Completion-Options.html

That said, the patch leaves it entirely to the user to configure the
user interface and its behaviour.

> I have one bbdb entry and one LDAP server in the hotlist.  It seems like
> the LDAP operation happens every time I call (message-tab).  Is that
> expected? 

Yes.

> Is the completion table caching meant to prevent this? 

Yes.

> I don't like the idea that hitting TAB several times per email address
> will result in several calls to the LDAP server. Can
> completion-at-point be made to have the same behaviour as
> eudc-expand-try-all, which only results in each backend being queried
> once?
> [...]

That's what I had hoped would be the result of using the function
completion-table-with-cache. From the docstring: "...saves the last
argument-result pair from FUN, so that several lookups with the same
argument (or with an argument that starts with the first one) only need
to call FUN once." The thing is, I cannot control how many times the
function completion-at-point calls functions on
completion-at-point-functions, nor how often completion-at-point is
called itself, which is determined by the user-interface on top of
completion-at-point.

If anyone gas further insight, any hints are highly appreciated.


  --alexander



  reply	other threads:[~2022-04-15 21:23 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-09 16:24 [PATCH] EUDC email addresses via completion-at-point in message-mode Alexander Adolf
2022-04-12 21:12 ` Thomas Fitzsimmons
2022-04-13 14:44   ` Alexander Adolf
2022-04-14  0:26     ` Thomas Fitzsimmons
2022-04-15 21:23       ` Alexander Adolf [this message]
2022-04-14 13:02     ` Eric S Fraga
2022-04-14 13:27       ` Thomas Fitzsimmons
2022-04-14 13:52         ` Eric S Fraga
2022-04-15 21:39           ` Alexander Adolf
2022-04-17 12:12             ` Eric S Fraga
2022-04-15 21:35       ` Alexander Adolf
2022-04-17 12:20         ` Eric S Fraga
2022-04-17 13:58           ` Thomas Fitzsimmons
2022-04-17 17:21             ` Eric S Fraga
2022-04-14 14:02     ` Stefan Monnier
2022-04-15 21:58       ` Alexander Adolf
2022-04-15 22:57         ` Eric Abrahamsen
2022-04-14  1:44 ` Eric Abrahamsen
2022-04-14 13:04   ` Eric S Fraga
2022-04-14 15:17     ` Eric Abrahamsen
2022-04-14 15:26       ` Stefan Monnier
2022-04-15 16:31         ` Eric Abrahamsen
2022-04-15 17:17           ` Stefan Monnier
2022-04-15 22:30           ` Alexander Adolf
2022-04-15 22:16   ` Alexander Adolf
2022-04-15 22:58     ` Stefan Monnier
2022-04-26 14:39 ` Alexander Adolf
2022-04-26 18:58   ` Filipp Gunbin
2022-04-28 17:15     ` Alexander Adolf
2022-04-29 14:43       ` Thomas Fitzsimmons
2022-05-02 17:10         ` Alexander Adolf
2022-05-03 18:03           ` Thomas Fitzsimmons
2022-05-05 16:32             ` Alexander Adolf
2022-05-05 16:57               ` Thomas Fitzsimmons
2022-05-10 21:16                 ` Thomas Fitzsimmons
2022-05-16 12:35                   ` Alexander Adolf
2022-04-29 23:04       ` Filipp Gunbin
2022-05-02 21:38         ` Alexander Adolf
2022-05-02 22:32           ` Filipp Gunbin
2022-05-03 16:18             ` Alexander Adolf
2022-05-03 16:22   ` Alexander Adolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=61482bcaa1c337ba55f6268fbc313100@condition-alpha.com \
    --to=alexander.adolf@condition-alpha.com \
    --cc=emacs-devel@gnu.org \
    --cc=fitzsim@fitzsim.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).