* In-buffer completion of BBDB mail addresses with corfu
@ 2022-10-25 14:43 Arash Esbati
2022-10-25 16:04 ` Eric S Fraga
0 siblings, 1 reply; 8+ messages in thread
From: Arash Esbati @ 2022-10-25 14:43 UTC (permalink / raw)
To: ding
Hi all,
I'm playing with corfu instead of company-mode and it occurred to me
that I don't get any in-buffer completion in 'To' field when I hit TAB
from my BBDB database. I looked at message.el and it seems to have some
functions to this purpose (message-completion-function, message-tab,
message-expand-name, ...) but it doesn't work for me.
This is the value of `completion-at-point-functions' for me while
writing this message.
,----
| completion-at-point-functions is a variable defined in ‘minibuffer.el’.
|
| Its value is
| (eudc-capf-complete message-completion-function t)
| Local in buffer *unsent mail*; global value is
| (tags-completion-at-point-function)
`----
Before adding something like this to my .gnus:
(add-hook 'message-mode-hook
(lambda ()
(add-to-list 'completion-at-point-functions
(cape-company-to-capf 'company-bbdb))))
Does message.el has a prefabbed Capf for BBDB or any other trick to make
this work?
Best, Arash
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: In-buffer completion of BBDB mail addresses with corfu
2022-10-25 14:43 In-buffer completion of BBDB mail addresses with corfu Arash Esbati
@ 2022-10-25 16:04 ` Eric S Fraga
2022-10-26 7:01 ` Arash Esbati
0 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2022-10-25 16:04 UTC (permalink / raw)
To: ding
On Tuesday, 25 Oct 2022 at 16:43, Arash Esbati wrote:
> I'm playing with corfu instead of company-mode and it occurred to me
A data point: after playing around a lot with eudc, capf, etc.,
including corfu as the interface, I have gone back to company mode as
the only completion mechanism that works well with message mode.
If you do get things sorted, please do post your configuration as I
wouldn't mind trying again. Company mode is really good but I find it
less effective on a small relatively under-powered PDA type of computer
that I use when commuting.
--
Eric S Fraga via gnus (Emacs 29.0.50 2022-10-25) on Debian 11.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: In-buffer completion of BBDB mail addresses with corfu
2022-10-25 16:04 ` Eric S Fraga
@ 2022-10-26 7:01 ` Arash Esbati
2022-10-26 7:58 ` Eric S Fraga
0 siblings, 1 reply; 8+ messages in thread
From: Arash Esbati @ 2022-10-26 7:01 UTC (permalink / raw)
To: ding
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> If you do get things sorted, please do post your configuration as I
> wouldn't mind trying again. Company mode is really good but I find it
> less effective on a small relatively under-powered PDA type of computer
> that I use when commuting.
Having a closer look, I think I have to tell EUDC how to DTRT by setting
`eudc-server' and `eudc-protocol'. For me, this snippet works:
(add-hook 'message-mode-hook
(lambda ()
(setq-local eudc-server 'localhost)
(setq-local eudc-protocol 'bbdb)))
Best, Arash
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: In-buffer completion of BBDB mail addresses with corfu
2022-10-26 7:01 ` Arash Esbati
@ 2022-10-26 7:58 ` Eric S Fraga
2022-10-26 9:03 ` Arash Esbati
0 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2022-10-26 7:58 UTC (permalink / raw)
To: ding
Thank you. I never set eudc-protocol. I'll give this a try.
--
Eric S Fraga via gnus (Emacs 29.0.50 2022-10-25) on Debian 11.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: In-buffer completion of BBDB mail addresses with corfu
2022-10-26 7:58 ` Eric S Fraga
@ 2022-10-26 9:03 ` Arash Esbati
2022-10-26 10:04 ` Eric S Fraga
0 siblings, 1 reply; 8+ messages in thread
From: Arash Esbati @ 2022-10-26 9:03 UTC (permalink / raw)
To: ding
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Thank you. I never set eudc-protocol. I'll give this a try.
It seems I missed this part in EUDC manual[1]. It should be enough to
set `eudc-server-hotlist' like this:
(setq eudc-server-hotlist '(("localhost" . bbdb)))
No need to play with `eudc-protocol'.
Best, Arash
Footnotes:
[1] https://www.gnu.org/software/emacs/manual/html_mono/eudc.html#Emacs_002donly-Configuration
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: In-buffer completion of BBDB mail addresses with corfu
2022-10-26 9:03 ` Arash Esbati
@ 2022-10-26 10:04 ` Eric S Fraga
2022-10-26 11:10 ` Arash Esbati
0 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2022-10-26 10:04 UTC (permalink / raw)
To: ding
On Wednesday, 26 Oct 2022 at 11:03, Arash Esbati wrote:
> (setq eudc-server-hotlist '(("localhost" . bbdb)))
I had this already. And, you're right, no need for explicit setting of
eudc-protocol.
I think I need a thorough cleanup of my configuration files as I cannot
get the cap framework to work just as I want it. For message mode
buffers, I will stick to company for the near term.
Thank you,
eric
--
Eric S Fraga via gnus (Emacs 29.0.50 2022-10-25) on Debian 11.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: In-buffer completion of BBDB mail addresses with corfu
2022-10-26 10:04 ` Eric S Fraga
@ 2022-10-26 11:10 ` Arash Esbati
2022-10-26 14:38 ` Eric S Fraga
0 siblings, 1 reply; 8+ messages in thread
From: Arash Esbati @ 2022-10-26 11:10 UTC (permalink / raw)
To: ding
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> On Wednesday, 26 Oct 2022 at 11:03, Arash Esbati wrote:
>> (setq eudc-server-hotlist '(("localhost" . bbdb)))
>
> I had this already. And, you're right, no need for explicit setting of
> eudc-protocol.
Thanks for checking.
> I think I need a thorough cleanup of my configuration files as I cannot
> get the cap framework to work just as I want it.
Just to wrap this up, this is what I'm doing now:
(setq eudc-server-hotlist '(("localhost" . bbdb)))
(add-hook 'message-mode-hook
(lambda ()
(setq-local completion-at-point-functions
(delq 'message-completion-function
completion-at-point-functions))))
A strange *complition* buffer popped up for me after the first
completion in the header field, so I remove
`message-completion-function' from `completion-at-point-functions'. I
didn't try to find out why, maybe later.
Best, Arash
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: In-buffer completion of BBDB mail addresses with corfu
2022-10-26 11:10 ` Arash Esbati
@ 2022-10-26 14:38 ` Eric S Fraga
0 siblings, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2022-10-26 14:38 UTC (permalink / raw)
To: ding
On Wednesday, 26 Oct 2022 at 13:10, Arash Esbati wrote:
> Just to wrap this up, this is what I'm doing now:
Thank you for this. I will try exactly what you have done when I get a
chance.
--
Eric S Fraga via gnus (Emacs 29.0.50 2022-10-25) on Debian 11.4
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-10-26 14:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 14:43 In-buffer completion of BBDB mail addresses with corfu Arash Esbati
2022-10-25 16:04 ` Eric S Fraga
2022-10-26 7:01 ` Arash Esbati
2022-10-26 7:58 ` Eric S Fraga
2022-10-26 9:03 ` Arash Esbati
2022-10-26 10:04 ` Eric S Fraga
2022-10-26 11:10 ` Arash Esbati
2022-10-26 14:38 ` Eric S Fraga
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 NNTP newsgroup(s).