From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.213.7.146 with SMTP id d18cs314167ebd; Sun, 17 Jan 2010 04:44:19 -0800 (PST) Received: by 10.224.24.78 with SMTP id u14mr2368733qab.106.1263732258275; Sun, 17 Jan 2010 04:44:18 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 6si9662647qwk.21.2010.01.17.04.44.17; Sun, 17 Jan 2010 04:44:18 -0800 (PST) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 9C09518582DC; Sun, 17 Jan 2010 07:44:17 -0500 (EST) Received: from mail-ew0-f222.google.com (mail-ew0-f222.google.com [209.85.219.222]) by rubyforge.org (Postfix) with ESMTP id 3096A18582BF for ; Sun, 17 Jan 2010 07:36:29 -0500 (EST) Received: by ewy22 with SMTP id 22so2471097ewy.19 for ; Sun, 17 Jan 2010 04:36:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:subject:from:to :date:message-id:user-agent:content-transfer-encoding; bh=qeX5qkikA0vwbg3ODmzgotgM39/JFjMhg9R2ETrskp8=; b=gOJMXyS8OJ2umh0o+JanMRqQiLp+W+kJZ+zvSrAQ/x5reXj//2QEJBcgmdiJHfTfOf lOg7cWBdcVMmMXmE6Bzg+mpcmc7Vi/oBo/IOEAJDqkaADjaOuAOZlCrrc8EESZRitG2L oxxjrel6ghJ+mqMkRgMV4OKyIbEDmnfAzYVJE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:subject:from:to:date:message-id:user-agent :content-transfer-encoding; b=cX6Dn2P9OZClWkuVgIGdELLbS6tR0qOzT6zcAG7CzkuFt5hmtKKJXQ3D+ynjTUrZr9 BGdiSIY6VxBODyBRlTMO1wEHjFaAedDUTpn6+tRy2J7Hn2jpLn1asUQeiNITVHbv1EDC poUv0l2vJaGBTe3xZjzJJXiuhFy3dT3sbRlNk= Received: by 10.213.24.9 with SMTP id t9mr2404632ebb.92.1263731788323; Sun, 17 Jan 2010 04:36:28 -0800 (PST) Received: from elly (80.174.61.131.dyn.user.ono.com [80.174.61.131]) by mx.google.com with ESMTPS id 14sm2217580ewy.11.2010.01.17.04.36.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 17 Jan 2010 04:36:27 -0800 (PST) From: Israel Herraiz To: sup-talk Date: Sun, 17 Jan 2010 13:36:16 +0100 Message-Id: <1263731685-sup-8287@duck> User-Agent: Sup/git Subject: [sup-talk] Missing the save index option (patch attached) X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org Hi all, since the last changes to get rid of the save option and to migrate to the Xapian index, I am really missing the save index option. Currently, when Sup exits, all the changes to the index are flushed, and in my case it takes ages because I am a heavy email load user. For me that is a problem, because my Sup is always open, and I usually suspend my laptop. From time to time, my laptop won't wake up, and I am forced to do an unclean reboot. When I open again Sup, all the changes I did (archiving threads, etc) are lost because the index was not flushed. I know that I can use the XAPIAN_FLUSH_THRESHOLD option, but if I use that option, when the threshold is reached it interrupts me while I am dealing with my email, and I have to wait some seconds until the index is flushed. This behavior is very annoying. I don't know if someone else in this list is also missing the possibility of flushing the index from Sup. I have done the attached changes to my Sup, that recovers a sort-of the old save index option. I am sending to the list just in case the patch is useful for others too. If there are not strong objections to this change, I suggest to merge it with Sup. Cheers, Israel --- lib/sup/modes/thread-index-mode.rb | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index a5bd344..3a1bb76 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -37,6 +37,7 @@ EOS k.add :toggle_spam, "Mark/unmark thread as spam", 'S' k.add :toggle_deleted, "Delete/undelete thread", 'd' k.add :kill, "Kill thread (never to be seen in inbox again)", '&' + k.add :flush_index, "Flush all changes now", '$' k.add :jump_to_next_new, "Jump to next new thread", :tab k.add :reply, "Reply to latest message in a thread", 'r' k.add :reply_all, "Reply to all participants of the latest message in a thread", 'G' @@ -449,6 +450,12 @@ EOS multi_kill [t] end + def flush_index + @flush_id = BufferManager.say "Flushing index..." + Index.save_index + BufferManager.clear @flush_id + end + ## m-m-m-m-MULTI-KILL def multi_kill threads UndoManager.register "killing #{threads.size.pluralize 'thread'}" do -- 1.6.6 _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk