unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Wen Riccardi-Zhu <dwrz@dwrz.net>
To: Sandra Snan <sandra.snan@idiomdrottning.org>, notmuch@notmuchmail.org
Subject: Re: Address Completion in Emacs
Date: Sat, 09 Dec 2023 02:05:39 +0000	[thread overview]
Message-ID: <87y1e4xh8s.fsf@main.dwrz.net> (raw)
In-Reply-To: <87jzpok5qb.fsf@ellen.idiomdrottning.org>

Thank you, Sandra! With your advice, I was able to figure out that corfu
was overriding the Tab key from notmuch. If I disable it,
notmuch-address-expand-name works (with orderless and vertico). I'll see
if I can find a way to pipe it into corfu somehow.

Sandra Snan <sandra.snan@idiomdrottning.org> writes:

> David, I have message-completion-alist set to this value:
>
> (("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):" 
>   .  notmuch-address-expand-name) 
>  ("^\\(Newsgroups\\|Followup-To\\|Posted-To\\|Gcc\\):" . 
>  message-expand-group) ("^\\([^ :]*-\\)?\\(To\\|B?Cc\\|From\\):" . 
>  message-expand-name)) 
>
> That way, when I hit tab in the sender field, which is bound to 
> message-tab, it'll run notmuch-address-expand-name which can find 
> pretty much everyone I've ever heard of.
>
> I additionally have an old BBDB that I've been using for ages that 
> I can access with ESC TAB which is set to bbdb-complete-mail but I 
> literally only have 16 people in there (I just checked). I use 
> them for my most common faves so I can get their most canonical 
> address with just a few letters.
>
> As for weeding through the list of candidates, there are packages 
> such as orderless and vertico that can enhance all calls to 
> completing-read, including the one in notmuch-address-expand-name. 
> After using it a while it does a good job at giving me the 
> relevantest ones at the top and letting me filter through them 
> further.
>
> Corfu and company-mode, I have never heard of! So this is more of 
> an answer to the "alternatively" part you asked.
>
> Sandra
>
>
> David Wen Riccardi-Zhu <dwrz@dwrz.net> writes:
>
>> Hello,
>>
>> I had working address completion in Emacs with company-mode, but
>> recently switched to corfu. Has anyone been able to get address
>> completion to work with it?
>>
>> Alternatively, I'm wondering how the internal completion style works. Is
>> there a function I can call to get internal address completion to kick
>> in?
>>
>> Lastly, is it possible to remove addresses from the list of candidates?
>> I have a few addresses that were consistently recommended even though
>> they had typos in them.
>>
>> I have this in my config:
>>
>> (setq notmuch-address-command 'internal
>>   notmuch-address-internal-completion '(sent nil)
>>   notmuch-address-save-filename "~/org/contacts/notmuch-contacts"
>>   ;; ... 
>> )
>>
>> Can I manually clean up my notmuch-contacts file? 
>>
>> If yes, is it possible to add newlines to the file, to make it easier to
>> search and edit?
>>
>> Thank you!
>>
>> David
>>
>> -- 
>> dwrz|朱为文
>> _______________________________________________
>> notmuch mailing list -- notmuch@notmuchmail.org
>> To unsubscribe send an email to notmuch-leave@notmuchmail.org

-- 
dwrz|朱为文\r

  reply	other threads:[~2023-12-09  2:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-08 13:26 Address Completion in Emacs David Wen Riccardi-Zhu
2023-12-08 16:40 ` Sandra Snan
2023-12-09  2:05   ` David Wen Riccardi-Zhu [this message]
2023-12-09  8:26     ` Keith Amidon
  -- strict thread matches above, loose matches on Subject: below --
2014-12-12  8:22 Address completion " Lele Gaifax
2014-12-12 12:14 ` David Edmondson
2014-12-12 12:45   ` Lele Gaifax
2014-12-12 13:08     ` David Edmondson
2014-12-14 17:27 ` Tomi Ollila

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://notmuchmail.org/

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

  git send-email \
    --in-reply-to=87y1e4xh8s.fsf@main.dwrz.net \
    --to=dwrz@dwrz.net \
    --cc=notmuch@notmuchmail.org \
    --cc=sandra.snan@idiomdrottning.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://yhetil.org/notmuch.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).