Discussions of development and use of the Sup email client
 help / color / mirror / Atom feed
From: Eric Weikl <eric.weikl@gmx.net>
To: Ruthard Baudach <ruthard.baudach@web.de>
Cc: supmua <supmua@googlegroups.com>
Subject: Re: [sup] how to write interactive hook
Date: Thu, 18 Sep 2014 11:34:55 +0200	[thread overview]
Message-ID: <1411032610-sup-4800@alderaan> (raw)
In-Reply-To: <1410717805-sup-9254@ruthard-lappi>

Hi Ruthard,

On 09/14/2014 20:07:27, Ruthard Baudach wrote:
> But how can I write an interactive hook?

As Gaute pointed out, you can prompt the user for information using the
BufferManager methods like ask_yes_no or ask_many_with_completions. I
use this for a primitive follow-up hook. You can get the idea from this
gist:

https://gist.github.com/anonymous/b1c2beb9ccddd2787e12

It's not perfect and I'm happy if anyone has ideas for improvement, BTW
:-)

Cheers,
Eric


  parent reply	other threads:[~2014-09-18  9:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14 18:07 Ruthard Baudach
2014-09-17 18:46 ` [sup] " Matthieu Rakotojaona
2014-09-18  5:51   ` Gaute Hope
2014-09-18 17:46   ` Ruthard Baudach
2014-09-18 18:58     ` Gaute Hope
2014-09-18  9:34 ` Eric Weikl [this message]
2014-09-18 20:06 ` Ruthard Baudach
2014-09-18 20:15 ` Ruthard Baudach
2014-09-18 21:10   ` [sup] " Gaute Hope
2014-09-19 18:41     ` Ruthard Baudach
2014-09-21 17:20       ` Gaute Hope
2014-10-01 20:46         ` Ruthard Baudach
2014-10-06 12:05           ` Gaute Hope

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=1411032610-sup-4800@alderaan \
    --to=eric.weikl@gmx.net \
    --cc=ruthard.baudach@web.de \
    --cc=supmua@googlegroups.com \
    /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