Re: [alot] announcing v0.3.3

Subject: Re: [alot] announcing v0.3.3

Date: Tue, 11 Sep 2012 09:47:28 +0200

To: Sepp Tannhuber, notmuch@notmuchmail.org

Cc:

From: Patrick Totzke


Hi Sepp, welcome to alot :)

Quoting Sepp Tannhuber (2012-09-10 19:55:00)
> 1. As vi user I alway type gg/G to jump to the top/bottom. Is there a command that I can
>    configure this way? I have not found a jump to top/bottom command in the manual.
Short Answer:
This is not yet possible with the current design, no.
It is something i'd also like to see though and i have already a few ideas ho to do this.

Long version/dev info:
First of all, i only recently added the ability to interpret "gg" (or other multi-key strokes)
at all.. so thats done.
Now both for thread and search mode we use a toplevel `urwid.ListBox` widget iirc,
and those do not directly support "focus topmost line". But they do allow to
move the focus to some index and so implementing such a `MoveCommand` should not be hard.
One reason I have not bothered to implement this so far is that in the long run,
I want to have urwid Tree widgets as top level widgets in thread buffers.
This would also allow "move to next sibling/parent" and so on.

> 2. Mutt has a nice feature, the Attach: pseudo header. It can be used to attach files from
>    within the editor. I use this small vi macro to attach files:
>      " mutt: insert attachment with ranger
> 
>      fun! RangerMuttAttach()
>      if filereadable('/tmp/chosendir')
>      silent !ranger --choosefiles=/tmp/chosenfiles --choosedir=/tmp/chosendir "$(cat /tmp/chosendir)"
>      else
>      silent !ranger --choosefiles=/tmp/chosenfiles --choosedir=/tmp/chosendir
>      endif
>      if filereadable('/tmp/chosenfiles')
>      call append(3, map(readfile('/tmp/chosenfiles'), '"Attach: ".escape(v:val,"     \\")'))
>      call system('rm /tmp/chosenfiles')
>      endif
>      redraw!
>      endfun
>      map <C-a> :call RangerMuttAttach()<CR>
>      imap <C-a> <ESC>:call RangerMuttAttach()<CR>a
>    I would like to use the same with alot. Is it possible?

Nice idea!
So you can of course use this method to set an "Attach" header, but as of now
alot will not interpret and remove this when reading the edited text.
I guess one would also want that in the other direction if one really uses this feature:
When re-editing the message body, the editable headers part of the text should include
an Attach header line that lists the current attachments..

> 3. I have followed the instructions to use abook for contact completion. I have used abook with mutt as well.
>    So I have put these two lines in my config:
>      [[[abook]]]
>        type = abook
>    But I did not find a way how to use it. Can anybody tell me?

It will be used for tabcompletion when you compose a mesage.
When you see the "to>" prompt, type in some prefix of a (realname part of a)
contact from abook and hit <tab>.

Cheers,
/p
signature.asc (application/pgp-signature)

Thread: