From: Tomi Ollila <tomi.ollila@iki.fi>
To: "Jörg Volbers" <joerg@joergvolbers.de>, notmuch@notmuchmail.org
Subject: Re: Address Completion
Date: Mon, 10 Apr 2017 21:38:12 +0300 [thread overview]
Message-ID: <m2o9w42jmz.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87pogl8c2i.fsf@joergvolbers.de>
On Mon, Apr 10 2017, Jörg Volbers <joerg@joergvolbers.de> wrote:
> Hello,
>
> If I press <TAB> looking for an address while writing mail,
> vanilla notmuch offers me one preselected candidate. Since I use
> ivy-mode, this canididate narrows down the list of all candidates,
> forcing me to delete the initial input (C-a C-k) before I can
> select among this list.
Do you use 'internal completion or separate command to find completions ?
If internal, the first choice would be to install `company' package from
ELPA (I don't know how it works with separate command -- which I use,
with selection-menu). Company-mode provides nice popup where to choose
completions from.
If that is not an option, someone(tm) could provide a patch which, based
on (fboundp 'ivy-read) uses either ivy-read or completing-read, with their
specific options for completion (what I saw about ivy-read that looks
pretty good). OTOH, if someone(tm) can show (completing-read ...) which
works good as is, or when wrapped with ivy, such patches might just be
tolerated(tm).
FWIW, I've used the following code in my notmuch setup like forever...:
require 'selection-menu)
(setq notmuch-address-selection-function
(lambda (prompt collection initial-input)
(selection-menu "Send To:" (cons initial-input collection) t)))
Tomi
> I currently override this behavior by setting
> notmuch-address-selection-function to my own function:
>
> (defun jv-notmuch--address-selection (prompt collection
> initial-input)
> (completing-read
> prompt collection nil nil orig 'notmuch-address-history))
> (setq notmuch-address-selection-function
> #'jv-notmuch--address-selection)
>
> This works as intended.
>
> Now my question: Is this something specific to ivy-mode, and would
> it be possible to add an option which simulates the above behavior
> (basically, using the pre-set variable 'orig' instead of
> (car-options) in notmuch-address-expand-name), so that I do not
> need to insert my own function which adds no functionality?
>
> Thanks (also for CC me via PM)
>
> And by the way, notmuch really is great, thank you for this
> software!
>
> Jörg
>
>
> --
> http://www.joergvolbers.de
> https://fu-berlin.academia.edu/jvolbers
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
next prev parent reply other threads:[~2017-04-10 18:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-09 22:12 Address Completion Jörg Volbers
2017-04-10 18:38 ` Tomi Ollila [this message]
2017-04-11 7:45 ` Jörg Volbers
-- strict thread matches above, loose matches on Subject: below --
2010-04-20 21:33 Address completion Sebastian Spaeth
2010-04-21 3:49 ` Dirk Hohndel
2010-04-21 8:08 ` Sebastian Spaeth
2010-04-21 14:11 ` Sebastian Spaeth
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=m2o9w42jmz.fsf@guru.guru-group.fi \
--to=tomi.ollila@iki.fi \
--cc=joerg@joergvolbers.de \
--cc=notmuch@notmuchmail.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).