sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit e624fea237e262a3b22e944b0eb343e028b02272
parent e5a66aa238dceb12c34dec43853f03ade24e1a21
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date:   Fri,  9 Apr 2010 13:22:08 -0700

Merge branch 'master' into maildir

Diffstat:
M lib/sup/crypto.rb | 2 +-
M lib/sup/index.rb | 33 +++++++++++++++++----------------
2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
@@ -194,7 +194,7 @@ private
 
   def run_gpg args, opts={}
     args = HookManager.run("gpg-args", { :args => args }) || args
-    cmd = "#{@cmd} #{args}"
+    cmd = "LC_MESSAGES=C #{@cmd} #{args}"
     if opts[:interactive] && BufferManager.instantiated?
       output_fn = Tempfile.new "redwood.output"
       output_fn.close
diff --git a/lib/sup/index.rb b/lib/sup/index.rb
@@ -313,22 +313,6 @@ EOS
       end
     end
 
-    ## if we see a label:deleted or a label:spam term anywhere in the query
-    ## string, we set the extra load_spam or load_deleted options to true.
-    ## bizarre? well, because the query allows arbitrary parenthesized boolean
-    ## expressions, without fully parsing the query, we can't tell whether
-    ## the user is explicitly directing us to search spam messages or not.
-    ## e.g. if the string is -(-(-(-(-label:spam)))), does the user want to
-    ## search spam messages or not?
-    ##
-    ## so, we rely on the fact that turning these extra options ON turns OFF
-    ## the adding of "-label:deleted" or "-label:spam" terms at the very
-    ## final stage of query processing. if the user wants to search spam
-    ## messages, not adding that is the right thing; if he doesn't want to
-    ## search spam messages, then not adding it won't have any effect.
-    query[:load_spam] = true if subs =~ /\blabel:spam\b/
-    query[:load_deleted] = true if subs =~ /\blabel:deleted\b/
-
     ## gmail style "is" operator
     subs = subs.gsub(/\b(is|has):(\S+)\b/) do
       field, label = $1, $2
@@ -346,6 +330,23 @@ EOS
       end
     end
 
+    ## if we see a label:deleted or a label:spam term anywhere in the query
+    ## string, we set the extra load_spam or load_deleted options to true.
+    ## bizarre? well, because the query allows arbitrary parenthesized boolean
+    ## expressions, without fully parsing the query, we can't tell whether
+    ## the user is explicitly directing us to search spam messages or not.
+    ## e.g. if the string is -(-(-(-(-label:spam)))), does the user want to
+    ## search spam messages or not?
+    ##
+    ## so, we rely on the fact that turning these extra options ON turns OFF
+    ## the adding of "-label:deleted" or "-label:spam" terms at the very
+    ## final stage of query processing. if the user wants to search spam
+    ## messages, not adding that is the right thing; if he doesn't want to
+    ## search spam messages, then not adding it won't have any effect.
+    query[:load_spam] = true if subs =~ /\blabel:spam\b/
+    query[:load_deleted] = true if subs =~ /\blabel:deleted\b/
+    query[:load_killed] = true if subs =~ /\blabel:killed\b/
+
     ## gmail style attachments "filename" and "filetype" searches
     subs = subs.gsub(/\b(filename|filetype):(\((.+?)\)\B|(\S+)\b)/) do
       field, name = $1, ($3 || $4)