>== Auszüge aus der Nachricht von Gaute Hope vom 2014-09-18 23:10: > Excerpts from Ruthard Baudach's message of September 18, 2014 22:15: > > Works, but the hook seems to be called – or at least > > ask_many_with_completions asks when > > > > 1) sup enters compose mode > > 2) sup calls the external editor > > 3)4) two times when sup regains control – only the second answer is > > attached to compose-mode text > > 5) after initializing sendmail by hitting y > > It is probably called every time the message needs to be generated. If > you could figure out a way to save the state for the message then you > could just return the previously selected one on the subsequent calls. For sure. At the moment my drafted solution is: ----------->%-------------------- # signature.rb -- generate signature unless $signature $signature = BufferManager.ask_many_with_completions :sign, "Choose signature: ", ["One","Two","Three"] end 'Signature: ' + $signature ----------->%-------------------- # sendemail.rb – send mail $signature = nil IO.popen(account.sendmail, "w:UTF-8") { |p| p.puts message } if $? return true else return false end ----------->%-------------------- Now I just needed a discard-message and a safe-draft hook to set the signature to nil in these cases, and everything was fine! I'm afraid I have to tackle sup core code to get this working. I'll report back if I get it to work, Happy supping, Ruthard -- Signature: One