unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Address Completion
@ 2017-04-09 22:12 Jörg Volbers
  2017-04-10 18:38 ` Tomi Ollila
  0 siblings, 1 reply; 7+ messages in thread
From: Jörg Volbers @ 2017-04-09 22:12 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]

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.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Address completion
@ 2010-04-20 21:33 Sebastian Spaeth
  2010-04-21  3:49 ` Dirk Hohndel
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Spaeth @ 2010-04-20 21:33 UTC (permalink / raw)
  To: Notmuch development list

Oh my goodness. I just tried
http://github.com/dme/notmuch/raw/dme-play/emacs/notmuch-address.el
together with the latest version of my "addrlookup" tool (which does the
same as jkr's notmuch_addresses.py) and it just works, even in current
cworth/master.

Address completion for to: and cc: headers based on my notmuch database,
sweet! Thanks David. I only need to reverse the sort order of addrlookup
as this uses most-to-least likely (which is more intuitive than eudc's
least-to-most likely sort order).

BTW, addrlookup now first tries to find matches that I previously sent
mails to and failing that it will try to find matches for all from:
addresses that match the search.

It would be trivial to include cworth's 3rd pass (or rather the 1st one)
of checking entries with an "address book" tag first. Which would
satisfy his entry in the notmuch TODO :-). which tag would make most
sense? And if a message had such a tag, would that mean the to: or the
from: is in the address book? Carl? It's your idea :-)

Sebastian

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-11  8:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-09 22:12 Address Completion Jörg Volbers
2017-04-10 18:38 ` Tomi Ollila
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

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).