Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8212E431FAE for ; Mon, 11 Aug 2014 13:38:53 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hzXnYoG1yy3J for ; Mon, 11 Aug 2014 13:38:48 -0700 (PDT) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 46249431FB6 for ; Mon, 11 Aug 2014 13:38:42 -0700 (PDT) Received: by mail-wi0-f179.google.com with SMTP id f8so4817448wiw.12 for ; Mon, 11 Aug 2014 13:38:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:user-agent:date:message-id :mime-version:content-type; bh=ouhEPtOPMnADPP/+25P0gJ/ASzWG51ShCx4T2z/IXf0=; b=OkaYXSvZJU/8Bp8dwj3/3IB8wVsZTzyofsfq820IZolF0oadkDPMoXEq9k8iriu6W/ HVm8M9EsMQ4rrQOlmNa87NwUa5/z+c1MGKRPuZd6gFD0eQlu5RFdXRZOmi6uzr5eoIro YfXOZftHppES1GA1GQ7upCNv9UogPwNPCdxxU6ZN+d/10pu5ktuav6JFsrzyOt8jpjdg 3586yDaqkqzwad7PWObloPjFYvJgQWRqkSExytCfYGz1mqP78n7CzJc5Ecbu/UcM7kOo ou/i/SNP7luLle0OGwOQn/W5GEdZFp4oSLGp0odvw3jrMPYMTNSU7VydTDtZ8+VfCeNp +eGw== X-Gm-Message-State: ALoCoQm7Afkcz9jnMPw1mtAUg3sOhXf4wbFroXNtCToZYefTOlolfQE+QbboqqSAJa4Boqwdl2D4 X-Received: by 10.195.11.132 with SMTP id ei4mr160528wjd.133.1407789520710; Mon, 11 Aug 2014 13:38:40 -0700 (PDT) Received: from moritz-x230 (port-92-204-16-141.dynamic.qsc.de. [92.204.16.141]) by mx.google.com with ESMTPSA id bf3sm47754706wib.18.2014.08.11.13.38.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Aug 2014 13:38:39 -0700 (PDT) From: Moritz Ulrich To: notmuch@notmuchmail.org Subject: `notmuch-escape-boolean-term': Broken for non-ascii characters User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) Date: Mon, 11 Aug 2014 22:38:16 +0200 Message-ID: <874mxiu5hj.fsf@tarn-vedra.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Mailman-Approved-At: Tue, 12 Aug 2014 03:47:09 -0700 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2014 20:38:53 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I recently adopted notmuch as my primary way to read mail, so thank you for this great tool! Unfortunately, I ran into a problem of the Emacs side of the project when used in a non-ascii environment: Having a tag named 'uni-k=C3=B6ln', the tag:-completion doesn't work. This is caused by `notmuch-escape-boolean-term' errornously escaping the above string: (notmuch-escape-boolean-term "uni-k=C3=B6ln") =3D> "\"uni-k=C3=B6ln\"" This is caused by `string-match' with the following errornously matching my tag: (string-match "[^!#-'*-~]" "uni-k=C3=B6ln") =3D> 5 (string-match "[^!#-'*-~]" "uni-koln") =3D> nil I'm not exactly sure how to tackle this - the Regexp was crafted to match (, ), " if I understand it correct. A simple way would be just adding more characters as a sort-of whitelist. A nicer solution would be converting it from [^...] to [...] to explicitly mark letters that needs to be escaped. Cheers, Moritz Ulrich --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJT6Sm9AAoJEKnhzHnsv6Qyp/MP/2AxFLNbuE8OazOaqDuNWR// fegXTAYkLHYYsd+pzLQgFuqC2mF4vh0hFM3cWJJTyoASzUBEM239nj1jLuloDSVv YcGBo+HBO4cqir9ly2UTLH9SkcEghx5zScfjVIygjZWwIFZRCjsfyXD5rK74Cv38 4pi/LTEfX4CulQv3LwAGGZtN0ez+GP1fS7nWDNxUVO+tREJYg4S2sinSOmBPKaua lgkWEAXTJDj12FUijkR9RHcE5TviVXaW2n4mf833hvvbhHslaRic7fbmX56Sny40 UaLkeJtoTF61yfoL2gazo5LjqQbBrrOzvGa5xHZhwtEnFNY9qlu8lxtdonhr63eK esVCaA+Q2D1lhw4JEPXgy1NcPHEp5x3CP/Dno8eXzK5+s2f85oFVX4cZREm+STc1 7MWxSWOBshn8+QtStK4a4RIGgLnq5XoH8QBWi/Vh1ug30DBRsMfnXbLbiz6DrWf6 koV3DnWcaVxbVQKXaSl/4DGzfbr1C4DO4S5nnjM40Aa1zfaUz64qxATKff0ZsIqN yN/Fll2SXJEdSRTH3F1sFrxWbVl7/5Taf9xyOsggjF5EPGXR9Ykxks9K+sTT3f1e Bp3EM4UZyyPepwTUU/KfgufC6yL6/GxEtx4KSuAlfvBoDCQpJyQ6OYyUjwruGIoH 3K5sXP5xLAQVX4FyMxVe =9eCy -----END PGP SIGNATURE----- --=-=-=--