> On Fri, Dec 18, 2015 at 04:32:23AM +0000, Raf Czlonka wrote:
>On Fri, Dec 18, 2015 at 01:02:54AM GMT, Roger wrote:
>
>> Woo. Although I use mutt, didn't realize abook could finally sort by
>> last names.
>
>It's not in the man page but it is in the "interactive" help available
>from within abook - simply press '?'.
>
>> However, I prefer (like many other applications) to enter the first
>> and last names into separate fields.  More definitive sorting when
>> dealing with people's names having three names. (ie. Sir Bleekin Blah)
>
>What about people with two first and two last names for example? :^)
>
>> Also with separate fields, I can explicitly see the last name. (ie.
>> surname)
>>
>> The following abookrc entries almost does this, except I have no idea
>> how to print the last and first names within the listing view.
>>
>> File: .abookrc --- Snip --- field name_last = "Last Name", string
>> field name_first = "First Name", string
>>
>> view CONTACT = name_last, name_first, name, email
>>
>> set sort_field=name_last --- Snip ---
>
>Look for 'index_format' in the manual.
>

Ah wonderful, I skipped over that definition.

File:.abook/abookrc
--- Snip ---
# Declare a few custom fields
field name_last = "Last Name", string
field name_first = "First Name", string

# Define how fields should be displayed in tabs
view CONTACT = name_last, name_first, name, email

# Format of entries lines in list
#set index_format=" {name:22} {email:40} {phone:12|workphone|mobile}"
set index_format=" {name_last:22} {name_first:10} {name:22} {email:40} 
{phone:12|workphone|mobile}"

set address_style=us
set sort_field=name_last
--- Snip ---


File:.abook/addressbook
--- Snip ---
[32]
name=Roger TheGreat
name_last=TheGreat
name_first=Roger
--- Snip ---


Finally, an easier and more common method for viewing addressbook entries!  
(This was one of those low priority tasks on my TODO lists.)

-- 
Roger
http://rogerx.freeshell.org/

------------------------------------------------------------------------------
_______________________________________________
Abook-devel mailing list
Abook-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/abook-devel

Reply via email to