From: pierre@baillet.name (Pierre Baillet)
Subject: [sup-talk] Contact Manager and fullname aliasing
Date: Sat, 24 Nov 2007 19:38:49 +0100 [thread overview]
Message-ID: <6205b42d0711241038j3f1b75e6s3ad7a2d7f4d5b316@mail.gmail.com> (raw)
In-Reply-To: <1195843961-sup-2106@south>
Hi,
This is my first implementation. Interestingly enough, most of the code
modified is in person.rb because this class already seems to store the full
name of contacts. Can the full name stored in it be overwritten by sup when
it receives new emails ? If this is the case, maybe we should add another
field there to indicate that the fullname has been modified by the user and
that sup shouldn't change it. I wanted to avoid to duplicate the full names
between person and contact but maybe i'm too lazy... At the same time, no
data migration is needed to add an extra field in the person or contact.txt:)
The Contact Manager now has an Array instead of a hash. One problem might
happen : duplicate aliases. How can i warm the user that the alias he just
typed already exists ? This should be done in #update_alias of
#alias_contact. The method contact_for aalias has been modified and now
includes a grep. I don't know when this method is called, but i always take
the first elements returned. What if the aalias passed as parameter yields
no match ? Last method implementation yielded nil. Can this happen ?
I aliased everything to "a" like before, and made sup ask for the alias and
the full name (my mutt has this bound on "a" too...).
Let me know what you think of all this :)
--
Pierre.
On Nov 23, 2007 7:56 PM, William Morgan <wmorgan-sup at masanjin.net> wrote:
> Hi Pierre,
>
> Excerpts from Pierre Baillet's message of Thu Nov 22 00:57:08 -0800 2007:
> > I'd like to alter the way the ContactManager work so that it could be
> > able to save contact which don't have an alias but for which the #name
> > has been modified:
>
> Sounds great.
>
> > The problem is that the contact manager is not able to handle
> > alias-less contacts and hence any modification to a Person during the
> > run of Sup is never saved for unaliased contacts (I actually patched
> > my sup to allow fullname modification before understanding that sup
> > will never save these changes :p).
>
> I think the best solution is to alter the contact manager such that it
> can handle contacts without aliases. I think it currently stores
> everything as a hash from alias to Person object, so you'll have to add
> an array instead.
>
> On the UI side, we can mimic Mutt-style alias prompts. Press 'l' and it
> asks you for the person name (pre-filled with the name from the email),
> and then asks you for the alias, allowing you to hit enter for none.
> Something like that.
>
> > Another idea would be to force all displays to use aliases instead of
> > real names when displaying emails. This is probably simple to
> > implement because there is no need to rework on the Contact Manager,
> > but i still think that "full name" (this full name is used in TO:
> > headers) and "alias" (this alias is only used internally) should be
> > different
>
> I agree that it's better that the two fields are different.
>
> --
> William <wmorgan-sup at masanjin.net>
> _______________________________________________
> sup-talk mailing list
> sup-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/sup-talk
>
--
Pierre Baillet <pierre at baillet.name>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/sup-talk/attachments/20071124/157e6dd2/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: contact_manager.patch
Type: application/octet-stream
Size: 4344 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/sup-talk/attachments/20071124/157e6dd2/attachment.obj
next prev parent reply other threads:[~2007-11-24 18:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-22 8:57 Pierre Baillet
2007-11-23 18:56 ` William Morgan
2007-11-24 18:38 ` Pierre Baillet [this message]
2007-12-21 18:23 ` William Morgan
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6205b42d0711241038j3f1b75e6s3ad7a2d7f4d5b316@mail.gmail.com \
--to=pierre@baillet.name \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox