From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.bugs Subject: bug#26066: 26.0.50; vc-git-status gives wrong result Date: Mon, 10 Apr 2017 09:35:28 +0200 Message-ID: <87fuhgd8an.fsf@zigzag> References: <9bf82bf1-fefa-ab84-bac1-cf748ae5ccfb@gmail.com> <87efxy59wx.fsf@users.sourceforge.net> <0d87686b-c7d2-deab-ebe4-ab1c8aa4faca@yandex.ru> <29d4a5ae-0ca0-3a86-6b9a-ab616803f39e@gmail.com> <4741bddf-9765-0d94-d0cd-b94e3e4914e1@yandex.ru> <8530cd03-0158-f198-9b14-ade983e1c7f4@gmail.com> <022c0e0a-e039-24ef-66ff-82bcedbacd93@yandex.ru> <7fccafd3-e2c2-204a-05a0-a930a4cbb7e4@gmail.com> <85978a9c-8b2f-484b-1330-be915fe05085@yandex.ru> <39da25d7-95d1-5b23-f5b1-c6b996aaece7@gmail.com> Reply-To: 26066@debbugs.gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1491809634 3184 195.159.176.226 (10 Apr 2017 07:33:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Apr 2017 07:33:54 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Jonathan Ganc To: 26066@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 10 09:33:51 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxTpe-0000li-U0 for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Apr 2017 09:33:51 +0200 Original-Received: from localhost ([::1]:32808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxTpk-0006AU-Uf for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Apr 2017 03:33:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxTox-0005mB-6p for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2017 03:33:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxTou-0001eD-3L for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2017 03:33:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42296) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cxTot-0001dy-W4 for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2017 03:33:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cxTot-000642-HN for bug-gnu-emacs@gnu.org; Mon, 10 Apr 2017 03:33:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thien-Thi Nguyen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Apr 2017 07:33:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26066 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26066-submit@debbugs.gnu.org id=B26066.149180955323273 (code B ref 26066); Mon, 10 Apr 2017 07:33:03 +0000 Original-Received: (at 26066) by debbugs.gnu.org; 10 Apr 2017 07:32:33 +0000 Original-Received: from localhost ([127.0.0.1]:40495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxToP-00063J-AV for submit@debbugs.gnu.org; Mon, 10 Apr 2017 03:32:33 -0400 Original-Received: from mail.agora-net.com ([67.59.132.6]:55873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxToN-00063B-ML for 26066@debbugs.gnu.org; Mon, 10 Apr 2017 03:32:31 -0400 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.82) (envelope-from ) id 1cxToM-0002nK-Mg; Mon, 10 Apr 2017 03:32:30 -0400 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1cxTrR-00061E-Mb; Mon, 10 Apr 2017 09:35:41 +0200 Mail-Followup-To: 26066@debbugs.gnu.org In-Reply-To: <39da25d7-95d1-5b23-f5b1-c6b996aaece7@gmail.com> (Jonathan Ganc's message of "Mon, 10 Apr 2017 00:41:15 -0400") X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@gnuvola.org X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131439 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Jonathan Ganc () Mon, 10 Apr 2017 00:41:15 -0400 + (while (string-match "\\(..\\) [^\0]+\0" status next-match) + (push (match-string 1 status) code-list) + (setq next-match (match-end 0))) + (setq code-list (nreverse code-list)) You can also use something like: (mapcar (lambda (s) (substring s 0 2)) (split-string status "\0")) to compute the value of =E2=80=98code-list=E2=80=99. Might be quicker, too. =2D-=20 Thien-Thi Nguyen ----------------------------------------------- (defun responsep (query) (pcase (context query) (`(technical ,ml) (correctp ml)) ...)) 748E A0E8 1CB8 A748 9BFA =2D-------------------------------------- 6CE4 6703 2224 4C80 7502 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAljrNcQACgkQZwMiJEyAdQLNuACgn/yzkHpitD6NitcHEYnDrs/z LFkAniQNn+RHPUabYX6PG8dpmGex053o =F6Uc -----END PGP SIGNATURE----- --=-=-=--