]> granicus.if.org Git - neomutt/commitdiff
Simple search: Allow [~+%] to be \-escaped. Closes #2426.
authorRocco Rutte <pdmef@gmx.net>
Tue, 20 Nov 2007 14:03:22 +0000 (15:03 +0100)
committerRocco Rutte <pdmef@gmx.net>
Tue, 20 Nov 2007 14:03:22 +0000 (15:03 +0100)
ChangeLog
doc/manual.xml.head
pattern.c

index 3c7557b0c57e88719ccce9d6cb15f75204bd6a34..3066a675a50dfc7b280798679b019d14b7abd4d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2007-11-20 08:45 +0000  Rocco Rutte  <pdmef@gmx.net>  (3dd709959912)
+
+       * configure.ac, strsep.c: Add glibc implementation of strsep() in case
+       a system misses it. Closes #2989.
+
+2007-11-20 08:44 +0000  Rocco Rutte  <pdmef@gmx.net>  (a177e28ebcd4)
+
+       * lib.h, mbyte.c: Alternate fix for not calling
+       bind_textdomain_codeset() to fix Solaris build.
+
+2007-11-19 15:32 +0100  Rocco Rutte  <pdmef@gmx.net>  (033eba2d6834)
+
+       * rfc3676.c: Make f=f handler multibyte-aware by not buffering flowed
+       content until it's finished. We now write out content as we read it
+       (which simplifies the code quite a bit) and properly flow multibyte
+       paragraphs. This should improve DelSp=yes handling where a flowed
+       paragraph may not have spaces at all except trailing ones for
+       flowable paragraphs (after concatenating lines we didn't have access
+       to the original break points any longer). We still split content by
+       ASCII space (this should be safe as f=f itself uses ASCII space to
+       mark flowable lines (even for languages that aren't expected to use
+       spaces, see DelSp). Closes #862.
+
+2007-11-15 13:17 +0100  Rocco Rutte  <pdmef@gmx.net>  (a0161768f631)
+
+       * ChangeLog, doc/makedoc-defs.h, doc/makedoc.c: Fix more documentation
+       build issues. Define USE_SASL (for $smtp_authenticators) in makedoc-
+       defs.h, include it in makedoc.c to force doc rebuild if makedoc-
+       defs.h changes.
+
 2007-11-15 12:32 +0100  Rocco Rutte  <pdmef@gmx.net>  (8c5357e2b31c)
 
        * parse.c, protos.h, send.c: Properly parse and validate Message-IDs
index 967ec4f700cf99006c09a277bdc88a7c526568d5..fb5952d79b8d92c6c280f8dadd7d298bc0b66c5a 100644 (file)
@@ -3943,8 +3943,11 @@ This example matches all mails which only has recipients from Germany.
 
 <para>
 Mutt supports two versions of so called ``simple searches'' which are
-issued if the pattern entered for searching, limiting and similar
-operations does not actually contain a pattern modifier.
+issued if the query entered for searching, limiting and similar
+operations does not seem to be a valid pattern (i.e. it does not contain
+one of these characters: ``~'', ``='' or ``&percnt;''). If the query is
+supposed to contain one of these special characters, they must be escaped
+by prepending a backslash (``\'').
 </para>
 
 <para>
index ee167cc867cf6aa823e985d097795db6c20f90e1..089499d16e1ee47c34cd14634ce75d8531b6a653 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -1238,12 +1238,25 @@ static void quote_simple(char *tmp, size_t len, const char *p)
 void mutt_check_simple (char *s, size_t len, const char *simple)
 {
   char tmp[LONG_STRING];
+  int do_simple = 1;
+  char *p;
+
+  for (p = s; p && *p; p++)
+  {
+    if (*p == '\\' && *(p + 1))
+      p++;
+    else if (*p == '~' || *p == '=' || *p == '%')
+    {
+      do_simple = 0;
+      break;
+    }
+  }
 
   /* XXX - is ascii_strcasecmp() right here, or should we use locale's
    * equivalences?
    */
-  
-  if (!strchr (s, '~') && !strchr (s, '=') && !strchr (s, '%')) /* yup, so spoof a real request */
+
+  if (do_simple) /* yup, so spoof a real request */
   {
     /* convert old tokens into the new format */
     if (ascii_strcasecmp ("all", s) == 0 ||